Hello,
I'm playing arround with the Cache Export for Powershell studio.
I've followed the blogs and created a cacheexport file from our on premis Exchange server (we use this server to onboard and offboard mailboxes).
When I load the cache in Powershell Studio I can see that the get-mailbox en get-remotemailbox commands are recognized by Powershell Studio (turned blue).
But as soon as I run the script (a simple get-mailbox) the output is as follows:
>> Remote Execute (GetRemoetMailbox.ps1) Script...
>> Remote Computer: SVRAPP0114
>> Platform: V5 64Bit (STA)
ERROR: The term 'Get-Mailbox' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
ERROR: included, verify that the path is correct and try again.
ERROR: + CategoryInfo : ObjectNotFound: (Get-Mailbox:String) [], CommandNotFoundException
ERROR: + FullyQualifiedErrorId : CommandNotFoundException
ERROR: + PSComputerName : SVRAPP0114
ERROR:
PowerShell Remote Host SVRAPP0114: Script completed
>> Script Ended
Normaly I run this on the server itself in a Exchange Management Shell (So not in the default Powershell).
Is this the reason? But why is the command recognized in Powershell Studio?
Any idea what I am doing wrong?
Best regards,
Sander
CacheExport
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: CacheExport
You cannot run Exchange commands remotely. You need to either install the shell or use a remote connection and import the session.
https://blogs.technet.microsoft.com/samdrey/2018/04/06/how-to-load-remote-powershell-session-on-exchange-2010-2013-2016-exchange-online-o365-2/
https://blogs.technet.microsoft.com/samdrey/2018/04/06/how-to-load-remote-powershell-session-on-exchange-2010-2013-2016-exchange-online-o365-2/
Re: CacheExport
If i'm not mistaken, a PSSession is not possible with Powershell Studio.
Or is this now possible?
Or is this now possible?
Re: CacheExport
I was making an application for our Servicedesk so they can reset passwords etc for users.
This was the question:
I've tried doing
Enter-PSSession-computername SVRDC04
Set-Locationc:
Import-Moduleactivedirectory
This works in a powershell console, but when I put it in the startup.pss I get an error that Enter-PSSession is not implemented
This was the Answer:
Enter-PSSession cmdlet is intended for the console and is not supported by our internal hosts at this time.
If you would like to see this implemented, I recommend posting a feature request here:
https://www.sapien.com/requests
As an alternative, you could try using Invoke-Command.
This was the question:
I've tried doing
Enter-PSSession-computername SVRDC04
Set-Locationc:
Import-Moduleactivedirectory
This works in a powershell console, but when I put it in the startup.pss I get an error that Enter-PSSession is not implemented
This was the Answer:
Enter-PSSession cmdlet is intended for the console and is not supported by our internal hosts at this time.
If you would like to see this implemented, I recommend posting a feature request here:
https://www.sapien.com/requests
As an alternative, you could try using Invoke-Command.