Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 136

Exchange report email

$
0
0

Hi,

Not sure if this is the right place to discuss this, but I'm trying to create a report with mount point free space on two servers and DAG whitespace.

For mount points I have this script:

$servernames = servername

Get-WmiObject -computer $servernames win32_volume|where-object {$_.caption -ne $null -and $_.label -ne “System Reserved” -and $_.drivetype -eq 3}|select-object __SERVER,Name,

@{Name="Capacity(GB)";expression={[math]::round(($_.Capacity/ 1073741824),2)}},

@{Name="FreeSpace(GB)";expression={[math]::round(($_.FreeSpace / 1073741824),2)}},

@{Name="Free(%)";expression={[math]::round(((($_.FreeSpace / 1073741824)/($_.Capacity / 1073741824)) * 100),0)}}

and for exchange dag information I use this

Get-MailboxDatabase -Status dag01* | select name,@{Name="InUse";Expression={$_.DatabaseSize- $_.AvailableNewMailboxSpace }} | select name,{$_.InUse.toGB()} | sort-object name

First question is how do I report the mount points script to two servers, I've tried adding two names to $servernames but that doesnt work.

Second question is how do I add both together so I can email the script out.

Thanks for looking and sorry again if on the wrong forum!


Viewing all articles
Browse latest Browse all 136

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>