Open
Description
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