I'm working on a remote powershell script. I can get the powershell to work with a basic Get-Host, but when I try add the Exchange Snapin I get errors.
The above works correctly
When I attempt this code:
This is the errors I'm getting from the above script.
urred while searching for domain controllers in domain server.com: There is no such object on the server.
At C:\Program Files\Microsoft\Exchange Server\bin\Exchange.ps1:19 char:32
+ $global:AdminSessionADSettings. <<<< ViewEntireForest = $false + CategoryInfo : InvalidOperation: (:) , RuntimeException + FullyQualifiedErrorId : PropertyAssignmentException Any ideas on what I can do to get this script working?
You will get errors doing it this way
You need to create a session against the Exchange endpoint. This gives you a restricted & constrained endpoint eg can't use filters 'cos use of literals is not allowed.
You need to import the session – then you can work with the Exchange cmdlets as if they were local
The remote server has Exchange Server 2007 not 2010. Not sure if that is part of my issue.
You must be logged in to reply to this topic.