skip to Main Content

To avoid manually writing or copying PowerShell cmdlets for log in into the Office 365 account, we can use a script.

How it’s done ?

  • create a new Text Document;
  • add the following code:
  • go to FileSave As – type a name: LoginIn.ps1 – for file type choose All Files.
How to create a login script for Office 365 (PowerShell) ?

Now let’s test the script:

  • start PowerShell;
  • depending on the location where you saved the script, we can use the cd command to change the directory.
Example: cd „C:\Documents and Settings\Alexandru\Desktop” 
  •  type .\ and press the Tab key until you see the script’s name and then press Enter.
How to create a login script for Office 365 (PowerShell) ?
  •  add your UserName and Password.
How to create a login script for Office 365 (PowerShell) ?
 
How to create a login script for Office 365 (PowerShell) ?

Now we are logged in into our Office 365 account and we can run various cmdlets.

(Visited 7 times, 1 visits today)

Cosmin Tătaru

Pasionat de blogging și tehnologie încă din 2009, Cosmin este aici să vă ajute să vă creșteți vânzările și productivitatea punând tehnologia la treabă pentru dumneavoastră.

Suport-Clienti
Mergeți sus