$Session = New-PSSession -ConfigurationName
Microsoft.Exchange
-ConnectionUri http://exchangeservername/PowerShell/?SerializationLevel=None
Invoke-Command –Session $Session –ScriptBlock {Get-Help
Get-Mailbox}
but you will not be abble to import the exchange cmdles through this pssession because it will throw an error.
to import the cmdlest you need to have a different pssession without "SerializationLevel=None"
$Session2 = New-PSSession -ConfigurationName
Microsoft.Exchange
-ConnectionUri http://exton.office.orange.intra/PowerShell
Import-PSSession $Session2
No comments:
Post a Comment