Requirement: Validate it is powershell v2
http://stackoverflow.com/questions/10812843/is-there-a-way-of-validating-a-powershell-script https://msdn.microsoft.com/en-us/library/system.management.automation.psparser%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
@ferventcoder thoughts on this one? Requirement, note, guideline, suggestion
Requirement
This one likely requires System.Management.Automation.
Once we know if it is valid powershell #107, we can likely further validate the PowerShell meets v2 standards.
@ferventcoder do we get this for "free" by using the System.Management.Automation.dll that is specific to PowerShell Version 2? Anything that came after in later versions of PowerShell wouldn't validate, or am I hoping for too much :smile:
Not for free. But I think you can tell it to validate to that version.
To get it for free, you would probably need to run it under .NET 2.0. Even then I'm not sure if you would get the correct validation.