- Bash:
$(pwd)
- fish:
(pwd)
- Windows Command Line (
cmd
):%cd%
- PowerShell:
$(PWD)
(Case-insensitive)
Tag: PowerShell
-
Current Working Directory for Different OS and Tools
-
Change Office 365 Group Email Address Using PowerShell
First you need to log into your admin account with PowerShell
Set-UnifiedGroup -Identity "GroupDisplayName" -EmailAddresses: @{Add ="GroupName@example.com"} Set-UnifiedGroup -Identity "GroupDisplayName" -PrimarySmtpAddress "NewGroupName@example.com" Set-UnifiedGroup -Identity "GroupDisplayName" -EmailAddresses: @{Remove="GroupName@openbayes.com"}
-
Adding Email Aliases to Office 365 Groups via PowerShell
This is a “hidden” feature that can only be added via PowerShell at the moment. And web admin portal won’t reflect the changes you made via PowerShell. That means you can only view alias for Office 365 Group from the following PowerShell cmdlet.
First log into your admin account with PowerShell
Set-UnifiedGroup –Identity marketing@example.com –EmailAddresses @{Add="hi@example.com"}
Check if it works
Get-UnifiedGroup –Identity marketing@example.com | FL EmailAddresses EmailAddresses : {smtp:hi@example.com, SPO:SPO_fa5eb50c-147e-4715-b64b-76af8be79767@SPO_f0712c15-1102-49c4-945a-7eda01ce10ff, smtp:marketing@example.onmicrosoft.com, SMTP:marketing@example.com}
-
Connect to Exchange Online PowerShell
Connect to Exchange Online PowerShell – Microsoft Docs
Set-ExecutionPolicy RemoteSigned # Windows only $UserCredential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-PSSession $Session -DisableNameChecking Remove-PSSession $Session # logout