Much simpler solution:
Get-PSDrive C | Select-Object Used,Free
and for remote computers (needs Powershell Remoting
)
Invoke-Command -ComputerName SRV2 {Get-PSDrive C} | Select-Object PSComputerName,Used,Free
Much simpler solution:
Get-PSDrive C | Select-Object Used,Free
and for remote computers (needs Powershell Remoting
)
Invoke-Command -ComputerName SRV2 {Get-PSDrive C} | Select-Object PSComputerName,Used,Free