Run PowerShell on the web

%3CLINGO-SUB%20id%3D%22lingo-sub-892041%22%20slang%3D%22en-US%22%3ERun%20PowerShell%20on%20the%20web%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-892041%22%20slang%3D%22en-US%22%3E%3CP%3EAll%2C%20I%20am%20using%20Office%20365.%20Some%20tasks%20require%2C%20or%20are%20easier%20to%20do%20using%20PowerShell.%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20only%20issue%20I%20have%20is%20that%20since%20I%20have%202FA%2C%20I%20need%20to%20sign%20in%20again%20and%20again%2C%20sometimes%2010%20or%20more%20times%20per%20day.%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20browser%20I%20am%20signed%20in%20to%20the%20admin%20center.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20any%20way%20to%20run%20PS%20commands%20from%20one%20of%20the%20admin%20centers%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-892041%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EO365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-892073%22%20slang%3D%22en-US%22%3ERe%3A%20Run%20PowerShell%20on%20the%20web%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-892073%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F331480%22%20target%3D%22_blank%22%3E%40shimshey%3C%2FA%3E%26nbsp%3BI%20dont%20know%20how%20your%202FA%20is%20set%20up%20but%20I%20know%20you%20can%20disable%202FA%20for%20specific%20IP%20ranges%20like%20that%20of%20your%20work%20network.%3CBR%20%2F%3ERecommendation%3A%20Run%20these%20PS%20scripts%20from%20a%20service%20account%20that%20have%202FA%20disabled.%20You%20can%20also%20limit%20these%20accounts%20to%20run%20only%20in%20a%20limited%20IP%20range.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-892854%22%20slang%3D%22en-US%22%3ERe%3A%20Run%20PowerShell%20on%20the%20web%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-892854%22%20slang%3D%22en-US%22%3E%3CP%3ENot%20from%20the%20admin%20center%2C%20but%20you%20can%20run%20it%20from%20Azure%20Cloud%20Shell%20now%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FExchange-Team-Blog%2FAzure-Cloud-Shell-Now-Supports-Exchange-Online%2Fba-p%2F652269%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FExchange-Team-Blog%2FAzure-Cloud-Shell-Now-Supports-Exchange-Online%2Fba-p%2F652269%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnly%20problem%20-%20it%20disconnects%20in%2020%20mins%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-893265%22%20slang%3D%22en-US%22%3ERe%3A%20Run%20PowerShell%20on%20the%20web%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-893265%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%20But%20it%20seems%20like%20I%20am%20missing%20an%20Azure%20subscription...%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20Office%20365%20only...%3C%2FP%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E
Contributor

All, I am using Office 365. Some tasks require, or are easier to do using PowerShell. 

The only issue I have is that since I have 2FA, I need to sign in again and again, sometimes 10 or more times per day. 

In the browser I am signed in to the admin center. 

 

Is there any way to run PS commands from one of the admin centers? 

3 Replies

@shimshey I dont know how your 2FA is set up but I know you can disable 2FA for specific IP ranges like that of your work network.
Recommendation: Run these PS scripts from a service account that have 2FA disabled. You can also limit these accounts to run only in a limited IP range. 

Not from the admin center, but you can run it from Azure Cloud Shell now: https://techcommunity.microsoft.com/t5/Exchange-Team-Blog/Azure-Cloud-Shell-Now-Supports-Exchange-On...

 

Only problem - it disconnects in 20 mins :)

@Vasil Michev 

Thanks! But it seems like I am missing an Azure subscription...  

I am using Office 365 only...