Powershell : How to Import Exchange Cmdlets from a Server to your Machine

Tired of logging to role specific servers like, exchange servers every time to execute just a powershell query? Now its time to upgrade urself, as you can import all exchange, Active directory cmdlets to your machine and can be machine independent, no need to download the modules or install any role on your machine. Just get a machine and start to rumble!

~ One of the most used scripts by me, have fun 😀

Please note : You’ll need to modify the highlighted part in below script per your organization’s configurations.

$domain= 'labdomainn\Prateek'
$pass=ConvertTo-SecureString -String 'somepassw@rd123' -AsPlainText -Force
$creds=New-Object System.Management.Automation.pscredential -ArgumentList $domain, $pass
$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://ExchangeServerName/PowerShell/ -Authentication Kerberos -Credential $creds
Import-PSSession $s

Happy Learning ! 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s