Welcome to My-PowerShell.com – your friendly source for Windows PowerShell scripts, tips and code examples.
More information about Powershell http://en.wikipedia.org/wiki/Windows_PowerShell.
How to Find Inactive AD Users (0)
2/28/12 •
Search for people who haven’t logged on to a domain in the past 180 days: $180days = (get-date).adddays(-180) get-aduser -filter * -properties lastlogondate | sort -property lastlogondate | Where-Object { $_.lastlogondate -le $180days } | export-csv c:\temp\inactiveUsers.csv
Recent Posts
Determine the Number of Active Users on Exchange 2010 Client Access Servers with PowerShell (0)
1/25/12 •
It’s always good to know how many active connections are currently open on each of your Client Access Servers (CAS). The following PowerShell function will grab performance counter data from each server to determine the number of active OWA (Web access) and RPC (Outlook) connections: In this example we will be looking at 2 CAS [...]
Listing Users With Forwarding Enabled (0)
11/30/11 •
This command lists mailboxes with auto forwarding enabled: Get-Mailbox | where {$_.ForwardingAddress -ne $null} | ft name,forwardingaddress
Powershell Script to Get 20 Top Largest Mailboxes (0)
11/28/11 •
The example how to find 20 biggest mailboxes: Get-MailboxStatistics -server SERVERNAME |sort-object -Property totalitemsize -des |select-object Displayname, ItemCount, totalItemSize -first 20 If you have more than one mailbox server, use the following example: Get-MailboxDatabase | Get-MailboxStatistics |sort-object -Property totalitemsize -des |select-object Displayname, ItemCount, totalItemSize -first 20
Powershell Script to Get Exchange 2007 Version (0)
11/25/11 •
It’s not easy to tell which version and build is installed on Exchange 2007. Use the following Powershell cmdlet: Get-ExchangeServer | fl name,edition,admindisplayversion You can also determine the installed version of Exchange 2007 by examining the value for each installed role in the Registry at: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Exchange\v8. 0\<Role>\ConfiguredVersion ConfiguredVersion is a string value in the format of [...]
Older Posts
Featured Categories
Exchange 2010»
1/25/12 •
Determine the Number of Active Users on Exchange 2010 Client Access Servers with PowerShell11/30/11 •
Listing Users With Forwarding Enabled11/28/11 •
Powershell Script to Get 20 Top Largest Mailboxes11/25/11 •
Powershell Script to Get Exchange 2007 Version11/10/11 •
Configure Task Scheduler to Run an Exchange PowerShell Script
