Get-MountPointsAndUserDisks (Roaming Profiles on VHDX): Unterschied zwischen den Versionen

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche
K (Admin verschob die Seite Get-UserDiskSize (Roaming Profiles on VHDX) nach Get-MountPointsAndUserDisks (Roaming Profiles on VHDX), ohne dabei eine Weiterleitung anzulegen)
 
(Eine dazwischenliegende Version des gleichen Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
== Get all Mountpoints and also all UserDisks (Roamin Profiles on VHDX) ==
+
<span style="font-size:20px;"><span style="color:red">'''-> This function/script is moved to [https://github.com/R-Studio/PSTools GitHub]!'''</span></span><br>
 +
== Get all Mountpoints and also all UserDisks (Roaming Profiles on VHDX) ==
 
<source lang="powershell">
 
<source lang="powershell">
 
Function Get-MountPointsAndUserDisks {
 
Function Get-MountPointsAndUserDisks {
Zeile 20: Zeile 21:
 
}
 
}
 
</source>
 
</source>
 
  
  

Aktuelle Version vom 21. Februar 2020, 16:17 Uhr

-> This function/script is moved to GitHub!

Get all Mountpoints and also all UserDisks (Roaming Profiles on VHDX)

Function Get-MountPointsAndUserDisks {
    param(
        [string]$ComputerName
    )
 
    If (!($ComputerName)) {
        $ComputerName = $env:COMPUTERNAME
    }
 
    Get-WmiObject Win32_Volume -Filter "DriveType='3'" -ComputerName $ComputerName | ForEach {
        New-Object PSObject -Property @{
            Name = $_.Name
            Label = $_.Label
            FreeSpace_GB = ([Math]::Round($_.FreeSpace /1GB,2))
            TotalSize_GB = ([Math]::Round($_.Capacity /1GB,2))
        }
    }
}