Output message in json
Would limit new console output to systems that do not already support EnhancedSessionTransportType. The vast majority of systems supports it and should not print additional messages.
This commit is contained in:
parent
ba562f273b
commit
431d91593a
@ -22,7 +22,10 @@ try {
|
||||
if($present) {
|
||||
Hyper-V\Set-VM -VM $VM -EnhancedSessionTransportType $Type
|
||||
}else{
|
||||
Write-OutputMessage "This version of HyperV does not support EnhancedSessionTransportType, ignoring."
|
||||
$message = @{
|
||||
"EnhancedSessionTransportTypeSupportPresent"=$false;
|
||||
} | ConvertTo-Json
|
||||
Write-OutputMessage $message
|
||||
}
|
||||
} catch {
|
||||
Write-ErrorMessage "Failed to assign EnhancedSessionTransportType to ${Type}:${PSItem}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user