diff --git a/os-discovery-tool/getWindowsOsInvToIntersight.ps1 b/os-discovery-tool/getWindowsOsInvToIntersight.ps1 index de0f0a2..af4ff75 100644 --- a/os-discovery-tool/getWindowsOsInvToIntersight.ps1 +++ b/os-discovery-tool/getWindowsOsInvToIntersight.ps1 @@ -294,8 +294,8 @@ Function GetDriverDetails { foreach($cmd in $nvidiasmi) { # Determine if Graphics driver or compute driver is installed - $command = "'$cmd' --query-gpu=driver_model.current --format=csv,no header" - $mode = Invoke-Command -ComputerName $hostname -ScriptBlock ([ScriptBlock]::Create("& $command")) + $command = "& `"$cmd`" --query-gpu=driver_model.current --format=csv,noheader" + $mode = Invoke-Command -ComputerName $hostname -ScriptBlock {Invoke-Expression $using:command} if($mode -contains "WDDM") {