I’ve created an xml file that contains file paths, some of them being environmental variables.
I’m trying to use the XML to grab and use them but when i take them from the xml it becomes a string, not a cmdlet…is there a way to use them as a command and not a string?
So $spec.techspec.section contains the name of a cmdlet? If so, you’d just use PowerShell’s Call operator (&), which allows you to execute strings or ScriptBlock objects. For example: