Backup Bitlocker Keys Script

Enable PSRemoting psexec \\Computername -s powershell Enable-PSRemoting -Force   Then Backup key to Active Directory $s = New-PSSession Computername Invoke-Command -Session $s -Scriptblock {$keyID = Get-BitLockerVolume -MountPoint c: | select -ExpandProperty keyprotector | where {$_.KeyProtectorType …

User Folder size Exchange 2007

Output to file if the Folder list is too long Get-MailboxFolderStatistics -identity <username> | sort-object folderSize -descending | Select-Object Name,FolderPath,@{name=”Items”;expression={$_.ItemsInFolder}}, @{name=”Size (MB)”;expression={$_.FolderSize.ToMB()}} | ConvertTo-HTML –head $a –body “<H2><font color=white>$UserMailbox Mailbox Size</font color></H2>”| Out-File C:\Test.html Output …

Scripts for exchange 2007 – Find User mailbox sizes with database names

Scripts for exchange 2007 – Find User mailbox sizes with database names Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | Select-Object database,DisplayName,@{label=”TotalItemSize(MB)”;expression={$_.TotalItemSize.Value.ToMB()}},ItemCount | Export-CSV C:\UserMailboxes.csv

Scripts for exchange 2007 – Find MailboxDatabase Sizes

Scripts for exchange 2007 – Find MailboxDatabase Sizes Get-MailboxDatabase | Select Server, StorageGroupName, Name, @{Name=”Size (GB)”;Expression={$objitem = (Get-MailboxDatabase $_.Identity); $path = “`\`\” + $objitem.server + “`\” + $objItem.EdbFilePath.DriveName.Remove(1).ToString() + “$”+ $objItem.EdbFilePath.PathName.Remove(0,2); $size = ((Get-ChildItem $path).length)/1048576KB; …