Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Save and import module MsOnline
- Save-Module -Name MsOnline -Path C:\Powershell\Day1
- Import-Module MsOnline
- #Login to o365(dynamic)
- $UserCredential = Get-Credential
- Connect-MsolService -Credential $UserCredential
- #Login to o365(Hardcoded)(Encrypted)
- $username = "dkbose@bosedk.onmicrosoft.com"
- $Password = ConvertTo-SecureString -String 'Porunga@_4646' $Encrypted -Force
- Connect-MsolService -Credential $UserCredential
- #Login to o365(Hardcoded)(Plain Text)
- $username = "dkbose@bosedk.onmicrosoft.com"
- $password = "Porunga@_4646"
- $secureStringPwd = $password | ConvertTo-SecureString -AsPlainText -Force
- Connect-MsolService -Credential $UserCredential
Add Comment
Please, Sign In to add comment