Created
September 24, 2022 18:01
-
-
Save iSnackyCracky/f9bf02d401ce24df5c067e60abcddfae to your computer and use it in GitHub Desktop.
Send Autodiscover WebRequest using PowerShell for debugging purposes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $request = @" | |
| <?xml version="1.0"?> | |
| <Autodiscover xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006"> | |
| <Request> | |
| <EMailAddress>[email protected]</EMailAddress> | |
| <AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema> | |
| </Request> | |
| </Autodiscover> | |
| "@ | |
| $cred = Get-Credential | |
| (Invoke-WebRequest -Uri https://exchange.example.com/Autodiscover/Autodiscover.xml -Credential $cred -Method post -Body $request -ContentType 'text/xml').Content |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment