posted on August 31st 2015, at 11:45
by lunarg
Powershell can also handle queries through WMI, allowing you retrieve all kinds of system information from local and remote systems running Windows. This also includes information about volumes, logical drives and shares.

For this to work on remote systems, you need to have Remote Management enabled. Starting from Server 2012, this is already enabled by default.

The commands use the Get-WmiObject cmdlet to retrieve the information. If no computer name is specified, the information will be retrieved from the system running the cmdlet. In order to connect to a remote system, run the cmdlet while specifying the computer name of the remote host with the -ComputerName parameter.

For example, t  ...
 
last updated on August 31st 2015, at 11:45 by lunarg

Cross-reference shares with the volume they are on (one-liner version).

/media/mime/48/txt.png
Get-SharesVolumes-1L.ps1
Text file
520 B
 
last updated on August 31st 2015, at 11:45 by lunarg

Cross-reference shares with the volume they are on.

/media/mime/48/txt.png
Get-SharesVolumes.ps1
Text file
939 B
 
last updated on August 31st 2015, at 11:44 by lunarg

Cross-reference shares with the logical disk they are on (one-liner)

/media/mime/48/txt.png
Get-SharesDrives-1L.ps1
Text file
359 B
 
last updated on August 31st 2015, at 11:44 by lunarg

Cross-reference shares with the logical disk they are on.

/media/mime/48/txt.png
Get-SharesDrives.ps1
Text file
676 B
 
 
« May 2024»
SunMonTueWedThuFriSat
   1234
567891011
12131415161718
19202122232425
262728293031
 
Links
 
Quote
« If the batteries of a TV remote run out, why do we press the buttons so much harder? »