Skip to content

Instantly share code, notes, and snippets.

@IAmStoxe
Created May 28, 2020 20:05
Show Gist options
  • Select an option

  • Save IAmStoxe/6c40598e03440cd086f3bb70daab630e to your computer and use it in GitHub Desktop.

Select an option

Save IAmStoxe/6c40598e03440cd086f3bb70daab630e to your computer and use it in GitHub Desktop.
How to launch a Exchange Management Shell remotely with Windows Terminal. Add these to your settings.json for Windows Terminal to utilize
// Replace SERVER_NAME with the FQDN of your exchange server before using
{
"name": "PS Exchange Management Shell",
"tabTitle": "PS Exchange Management Shell",
"commandline": "powershell.exe -NoProfile -NoExit -Command Enter-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri 'http://SERVER_NAME/PowerShell/' -Credential (Get-Credential)"
}
//This will ask you for the host name upon launch
{
"name": "PS Exchange Management Shell (Prompt Host)",
"tabTitle": "PS Exchange Management Shell",
"commandline": "powershell.exe -NoProfile -NoExit -Command Enter-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri \"http://$(Read-Host 'FQDN of Exchange Server')/PowerShell/\" -Credential (Get-Credential)"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment