[PSS2014] Intellisense for XML - script writing

Post feature requests, product enhancement ideas, and other product-specific suggestions here. Do not post bug reports.
Forum rules
Do not post any licensing information in this forum.
This topic is 9 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
aaronta
Posts: 6
Last visit: Thu Apr 16, 2020 3:09 pm

[PSS2014] Intellisense for XML - script writing

Post by aaronta »

Hard to explain what I meant just on the subject line...

but basically, I am using an XML file for setting global variables (i.e. SMTP Servers, script admin email address, etc etc.) by using this:
PowerShell Code
Double-click the code block to select all.
[xml]$Glbl = GC C:\common\SCRIPTS\GlobalVars\Settings.xml

now, the problem here is, the variable $glbl doesn't populate with the settings from the XML file. So to get round this in PowerGUI and Powershell ISE, you would run that part of the script first and then the variable would populate, allowing you to use Intellisense while you're writing your script.

Picture of what I mean, just in case I'm terrible at explaining
Image
This topic is 9 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked