Question

Online PowerShell?


Userlevel 1
Badge +1
  • Top Contributor
  • 7 replies

Does anyone know of an ability to run PowerShell scripts on Exchange or AAD Online?   I’ve got some scripts I want to run for our offboarding process but not sure how that would work to pass credentials.  If anyone has gotten this to work and has a code example, it would be most helpful.

 

Thank You


7 replies

Userlevel 7
Badge +16

Hello @EdK Have you taken a look at the Freshservice Powershell Orchestration Application?

https://support.freshservice.com/en/support/solutions/articles/50000003610-installation-guide-powershell

This allows you to execute powershell commands using an orchestration server agent. Hope that helps

Userlevel 1
Badge +1

Yes, I have used the Powershell Orchestrator, but to my knowledge it only works to run PowerShell commands on on-prem Exchange, AD and file servers.   I need the ability to run PowerShell on Exchange and ADD online. 

It would be more helpful if the Exchange Orchestrator had the ability to covert mailboxes to shared and assign delegates in Exchange Online.

Userlevel 7
Badge +16

Yes, I have used the Powershell Orchestrator, but to my knowledge it only works to run PowerShell commands on on-prem Exchange, AD and file servers.   I need the ability to run PowerShell on Exchange and ADD online. 

It would be more helpful if the Exchange Orchestrator had the ability to covert mailboxes to shared and assign delegates in Exchange Online.

Oh gotcha, thanks for the clarification. Are you able to successfully execute powershell commands outside of freshservice that accomplish those tasks? I was under the impression that if you know the command and can execute it from a windows machine powershell command prompt then you should be able to pass that command to that machine from freshservice. I think the one big caveat and possible issue is the passing of credentials. That functionality doesn’t seem to exist yet and may be a deal breaker for you.

Userlevel 1
Badge +1

Yes, I can execute Powershell commands on AAD and Exchange online, but it does require a connection command that prompts for online credentials.  I don’t know of any ability to pass those credentials with Fresh.  I guess I can only hope for further development in this area.  All I really need it for the Exchange Orchestrator to be able to convert mailboxes to shared and assign delegates.    

Userlevel 4
Badge +7

Not an “easy button” but you can follow these instructions to setup your script to run unattended

App-only authentication | Microsoft Docs

Userlevel 7
Badge +16

Yes, I can execute Powershell commands on AAD and Exchange online, but it does require a connection command that prompts for online credentials.  I don’t know of any ability to pass those credentials with Fresh.  I guess I can only hope for further development in this area.  All I really need it for the Exchange Orchestrator to be able to convert mailboxes to shared and assign delegates.    

Yes my hope is that they somehow incorporate the credential manager to allow us to pass credentials through to the server hosting the agent, letting us to authenticate our powershell commands. It is necessary for a more mature level of security.

Userlevel 3
Badge +2

You could also use PowerShell secret management to store and obtain credentials - you can read an overview here: Overview of the SecretManagement and SecretStore modules - PowerShell | Microsoft Learn

Reply