filmov
tv
Exchange Online v2 Powershell Unattended for Scripting
![preview_player](https://i.ytimg.com/vi/BNtE2JFDbxY/maxresdefault.jpg)
Показать описание
Microsoft is deprecating the Exchange Online Basic Auth and that requires you to use Exchange Online Version v2 and you will have a lot of scripts currently running to fetch/modify information in office 365 exchange online.
You can follow instructions in this video to update your script running unattended exchange online scripts.
High Level these are the steps :
# create a self signed certificate
New-SelfSignedCertificate -FriendlyName "Exch Unattended Script" -Subject "Exch Unattended Script" -CertStoreLocation "cert:\CurrentUser\My" -KeySpec KeyExchange
# Export Certificate
$cert = Get-ChildItem -Path Cert:\CurrentUser\My\{put certificate thumbprint}
# Create App Registration and grant admin consent
Grant Exchange.ManageAsApp Right under Office 365 Exchange Online
# Assign Exchange Admin Role to the newly registered App.
# Upload Certificate Public Key to recently created App in Azure.
# Run Command On Prem to find if unattended script works
# Sample Script for task scheduler job to export script.
$rcpt = Get-ExoMailbox -resultsize unlimited | select *
Disconnect-ExchangeOnline -Confirm:$false -InformationAction Ignore -ErrorAction SilentlyContinue
You can follow instructions in this video to update your script running unattended exchange online scripts.
High Level these are the steps :
# create a self signed certificate
New-SelfSignedCertificate -FriendlyName "Exch Unattended Script" -Subject "Exch Unattended Script" -CertStoreLocation "cert:\CurrentUser\My" -KeySpec KeyExchange
# Export Certificate
$cert = Get-ChildItem -Path Cert:\CurrentUser\My\{put certificate thumbprint}
# Create App Registration and grant admin consent
Grant Exchange.ManageAsApp Right under Office 365 Exchange Online
# Assign Exchange Admin Role to the newly registered App.
# Upload Certificate Public Key to recently created App in Azure.
# Run Command On Prem to find if unattended script works
# Sample Script for task scheduler job to export script.
$rcpt = Get-ExoMailbox -resultsize unlimited | select *
Disconnect-ExchangeOnline -Confirm:$false -InformationAction Ignore -ErrorAction SilentlyContinue
Комментарии