mirror of
https://github.com/jamesstringerparsec/Easy-GPU-PV.git
synced 2024-08-30 18:22:17 +00:00
Fix compatibility with Powershell 7+
This commit is contained in:
parent
51ae8d6390
commit
b8a2d9efde
@ -4210,8 +4210,13 @@ VirtualHardDisk
|
||||
#endregion VHD Interop
|
||||
}
|
||||
"@
|
||||
|
||||
#ifdef for Powershell V7 or greater which looks for assemblies in same path as powershell dll path
|
||||
if ($PSVersionTable.psversion.Major -ge 7){
|
||||
Add-Type -TypeDefinition $code -ErrorAction SilentlyContinue
|
||||
}
|
||||
else {
|
||||
Add-Type -TypeDefinition $code -ReferencedAssemblies "System.Xml","System.Linq","System.Xml.Linq" -ErrorAction SilentlyContinue
|
||||
}
|
||||
}
|
||||
|
||||
Function Modify-AutoUnattend {
|
||||
|
Loading…
Reference in New Issue
Block a user