Link to home
Start Free TrialLog in
Avatar of sara2000
sara2000

asked on

mount point report

I am looking for a powershell script to get report of mount points on few server.
Expert out there, Can you please share me he script?
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia image

Please try
Get-WmiObject Win32_Volume | ForEach {
    New-Object PSObject -Property @{
        Name = $_.Name
        Label = $_.Label
        FreeSpace_GB = ([Math]::Round($_.FreeSpace /1GB,2))
        TotalSize_GB = ([Math]::Round($_.Capacity /1GB,2))
    }
}

Open in new window

Avatar of sara2000
sara2000

ASKER

Thank you for this. IS there any way I can email the report .
ASKER CERTIFIED SOLUTION
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Shaun, I have no experience in scripts , hope you do not mind.  How do I run this remotely (from another server)?
No problem. Save in PS1 file and run
Invoke-Command -ComputerName ServerName01 -FilePath "C:\Temp\Script.ps1"

Open in new window