You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PS>Invoke-ScriptAnalyzer-Path c:\tmp\test1.ps1
Invoke-ScriptAnalyzer : Parse error in file c:\tmp\test1.ps1: Could not find the module 'xActiveDirectory' at line 3 column 5.
At line:1 char:1+Invoke-ScriptAnalyzer-Path c:\tmp\test1.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ParserError: (ModuleNotFoundDuringParse:String) [Invoke-ScriptAnalyzer], ParseException
+ FullyQualifiedErrorId : Parse error in file c:\tmp\test1.ps1: Could not find the module 'xActiveDirectory' at line 3 column 5.,Microsoft.Windows.PowerShell.ScriptAna
lyzer.Commands.InvokeScriptAnalyzerCommand
Invoke-ScriptAnalyzer : Parse error in file c:\tmp\test1.ps1: Undefined DSC resource 'xADDomain'. Use Import-DSCResource to import the resource at line 5 column 9.
At line:1 char:1+Invoke-ScriptAnalyzer-Path c:\tmp\test1.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ParserError: (ResourceNotDefined:String) [Invoke-ScriptAnalyzer], ParseException
+ FullyQualifiedErrorId : Parse error in file c:\tmp\test1.ps1: Undefined DSC resource 'xADDomain'. Use Import-DSCResource to import the resource at line 5 column 9.,Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands.InvokeScriptAnalyzerCommand
This happens because powershell parser cannot find the relevant symbols. However, if the module xActiveDirectory were to be in PSModulePath, the parser wouldn't throw this error.
The text was updated successfully, but these errors were encountered:
Consider a file named, test1.ps1, with the following content.
This happens because powershell parser cannot find the relevant symbols. However, if the module xActiveDirectory were to be in PSModulePath, the parser wouldn't throw this error.
The text was updated successfully, but these errors were encountered: