Quest Software’s free ActiveRoles Management Shell for Active Directory PS-Snapin simplifies a lot of the AD related functions through Powershell. Following is a list of some commonly used user related actions.

Finding non-expiring passwords
get-QADUser -PasswordNeverExpires

Finding disabled accounts
get-qaduser -disabled

Enabling disabled accounts
enabled-qaduser -identity

 

You can run powershell commands on your Exchange 2010 server from machines whether or not they have the Exchange Management Tools installed using implicit remoting.

Even when you run the Exchange Management Shell on your exchange server, you’re essentially creating a powershell remoting session. The following steps take place in the background when you click the EMS icon:

  • Load the Microsoft.Exchange.Management.PowerShell.E2010 snap-in gets loaded
  • The RemoteExchange.ps1 script is dot sourced
  • The Connect-ExchangeServer function is executed
  • You can set up implicit remoting from any maching using powershell v2. This imports the commands from your exchange server to your local powershell session so you don’t need any Exchange tools installed.

    First we create a session using the New-PSSession cmdlet:

    $s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://<CAS FQDN>/PowerShell/ -Authentication Kerberos

    Then, import the session using the Import-PSSession cmdlet:

    Import-PSSession $s

    The Exchange Management Shell commands are now imported into the local PowerShell session.

    You could use the same method to setup a scheduled task from your machine to run a commands on your exchange server.

    [source: ]

    © 2012 !NSFW Suffusion theme by Sayontan Sinha