Created
October 27, 2017 19:38
-
-
Save ryanwebjackson/de4f7f6640d92e61edd74c7440422652 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$rootDriveAsString = Get-PSDrive | |
| Where-Object { $_.Provider.Name -eq "FileSystem" } | |
| Where-Object { (Get-WmiObject Win32_OperatingSystem).SystemDirectory.Contains($_.Root) -and $_.Root -ne "" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment