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
Script analyzer is throwing file: '
message: 'The variable 'VMDet' is assigned but never used. (PSUseDeclaredVarsMoreThanAssignments)'
at: '665,62'
source: 'PSScriptAnalyzer'
Cheers
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Hi Guys,
Script Analyzer is flagging a few variables as not used anywhere in the script.
These variables are only used during an Invoke-Command line when is calling them like below
Invoke-Command -Session $S -ScriptBlock {$VMDet = Get-VM $VM}
$VMDetails = Invoke-Command -Session $S -ScriptBlock {$VMDet}
Script analyzer is throwing file: '
message: 'The variable 'VMDet' is assigned but never used. (PSUseDeclaredVarsMoreThanAssignments)'
at: '665,62'
source: 'PSScriptAnalyzer'
Cheers
The text was updated successfully, but these errors were encountered: