package-validator icon indicating copy to clipboard operation
package-validator copied to clipboard

Requirement: Validate it is powershell v2

Open ferventcoder opened this issue 10 years ago • 7 comments

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 avatar Nov 23 '15 17:11 ferventcoder

@ferventcoder thoughts on this one? Requirement, note, guideline, suggestion

gep13 avatar Jan 19 '16 09:01 gep13

Requirement

ferventcoder avatar Jan 19 '16 14:01 ferventcoder

This one likely requires System.Management.Automation.

ferventcoder avatar Jan 19 '16 14:01 ferventcoder

Once we know if it is valid powershell #107, we can likely further validate the PowerShell meets v2 standards.

ferventcoder avatar Jan 25 '16 17:01 ferventcoder

@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:

gep13 avatar Feb 17 '16 20:02 gep13

Not for free. But I think you can tell it to validate to that version.

ferventcoder avatar Feb 17 '16 20:02 ferventcoder

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.

AdmiringWorm avatar Mar 05 '17 04:03 AdmiringWorm