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?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shaun VermaakTechnical SpecialistCommented:
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

sara2000Author Commented:
Thank you for this. IS there any way I can email the report .
Shaun VermaakTechnical SpecialistCommented:
$smtpServer = "mailserver01"
$smtpFrom = ""
$smtpTo = ""
$messageSubject = "Subject"
$message = New-Object System.Net.Mail.MailMessage $smtpfrom, $smtpto
$message.Subject = $messageSubject
$message.IsBodyHTML = $true

$message.Body = 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)) }} | ConvertTo-Html

$smtp = New-Object Net.Mail.SmtpClient($smtpServer)

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sara2000Author Commented:
Thanks Shaun, I have no experience in scripts , hope you do not mind.  How do I run this remotely (from another server)?
Shaun VermaakTechnical SpecialistCommented:
No problem. Save in PS1 file and run
Invoke-Command -ComputerName ServerName01 -FilePath "C:\Temp\Script.ps1"

Open in new window

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.