mirror of
https://github.com/jamesstringerparsec/Easy-GPU-PV.git
synced 2024-08-30 18:22:17 +00:00
Update CopyFilesToVM.ps1
This commit is contained in:
parent
5627d3b843
commit
03d65cfcac
@ -1,11 +1,10 @@
|
||||
Function Add-VMGpuPartitionAdapterFiles {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$VMname = "GPU-P",
|
||||
[string]$VMname = "GPU-P",
|
||||
[string]$hostname = $ENV:COMPUTERNAME,
|
||||
[string]$DriveLetter = "X:"
|
||||
)
|
||||
|
||||
$path = (Get-VM -VMName $VMname | Select-Object -Property VMId | Get-VHD).path
|
||||
$VHDpath = (Get-VM -VMName $VMname | Select-Object -Property VMId | Get-VHD).path
|
||||
$Unique = (Mount-VHD -Path $path -PassThru | Get-Disk | Get-Partition | Get-Volume | Where-Object size -GT 10GB)
|
||||
Get-Volume -UniqueId $unique.UniqueId | Get-Partition | Add-PartitionAccessPath -AccessPath $DriveLetter
|
||||
|
||||
@ -57,6 +56,8 @@ foreach ($d in $drivers) {
|
||||
}
|
||||
}
|
||||
Get-Volume -UniqueId $unique.UniqueId | Get-Partition | Remove-PartitionAccessPath -AccessPath $driveLetter
|
||||
Dismount-vhd -Path $path
|
||||
Dismount-vhd -Path $VHDpath
|
||||
|
||||
}
|
||||
|
||||
Add-VMGpuPartitionAdapterFiles
|
||||
|
Loading…
Reference in New Issue
Block a user