Thanks Luc,
I'm getting the following error
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $script
= @"driverquery"@Get-Datacenter -Name MyDC | Get-VM | %{ $output = Invoke-VMScr
ipt -VM $_ -ScriptText $script $_ | Select Name,@{N="vShield Agent present";E={
$output -match "vsepflt"}}}
Unrecognized token in source text.
At line:1 char:11
+ $script = <<<< @"driverquery"@Get-Datacenter -Name MyDC | Get-VM | %{ $outp
ut = Invoke-VMScript -VM $_ -ScriptText $script $_ | Select Name,@{N="vShield
Agent present";E={$output -match "vsepflt"}}}
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordEx
ception
+ FullyQualifiedErrorId : UnrecognizedToken