PowerShell

How to Fix "WorkHoursVersion1 is null" in Exchange Online

Andres Bohren
Hi All, I've performed a lot of Exchange Online Migrations this Year. After the Mailbox was migrated i did run a Post Migration Script to set some Setting on the Mailbox like: Set-MailboxRegionalConfiguration -Identity $UPN -TimeZone "W. Europe Standard Time" -DateFormat "dd.MM.yyyy" -TimeFormat "HH:mm" -Language "de-CH" -ErrorAction Stop Set-MailboxCalendarConfiguration -Identity $UPN -WeekStartDay Monday -WorkDays Weekdays -WorkingHoursStartTime 08:00:00 -WorkingHoursEndTime 17:00:00 -WorkingHoursTimeZone "W. Europe Standard Time" -ShowWeekNumbers $True -ErrorAction Stop In some cases there where this Error: "

Exchange Online - Other ways of Testing IMAP OAuth2 Client Credential Flow

Andres Bohren
Hi All, I write this Blog Article in Addition to the Exchange Online POP and IMAP OAUTH 2.0 Client Credentials Flow https://blog.icewolf.ch/archive/2022/12/17/exchange-online-pop-and-imap-oauth-2-0-client-credentials.aspx I tried out other ways of testing First we need to get the Access Token ############################################################################### # Get Access Token with MSAL ############################################################################### Import-Module MSAL.PS $AppID = "3bf0cf36-87bf-47a9-927b-0ef9df7cf146" $TenantID = "icewolfch.onmicrosoft.com" $ClientSecret = ConvertTo-SecureString "YourClientSecret" -AsPlainText -Force $Scope = "https://outlook.office.com/.default" Clear-MsalTokenCache $Token = Get-MSALToken -ClientId $AppID -ClientSecret $ClientSecret -TenantId $TenantID -Scope $Scope

Microsoft.Graph PowerShell Module 2.0.0-preview2 released

Andres Bohren
Hi All, Just a few Hours ago, Microsoft has released Microsoft.Graph 2.0.0-preview2 PowerShell Modules to the PowerShell Gallery. Microsoft.Graph 2.0.0-preview2 https://www.powershellgallery.com/packages/Microsoft.Graph/2.0.0-preview2 With the 2.x Version of the Module there has been changed a lot Breaking Changes Drops profile support (Select-MgProfile) in favor of independent v1.0 and beta modules. Drops support for -ForceRefresh on Connect-MgGraph. Renames beta command names from <Verb>-Mg<Noun> to <Verb>-MgBeta<Noun>. Changes beta namespace from Microsoft.Graph.PowerShell.Models.<Entity> to Microsoft.Graph.Beta.PowerShell.Models.<Entity>. Changes -AccessToken type on Connect-MgGraph from String to SecureString.

Microsoft.Graph PowerShell Module 1.19.0 released

Andres Bohren
Hi All, A few hours ago, Microsoft has released a new Version of the Microsoft.Graph PowerShell Module. Microsoft.Graph 1.19.0 https://www.powershellgallery.com/packages/Microsoft.Graph/1.19.0 Microsoft.Graph 1.19.0 Release Notes https://github.com/microsoftgraph/msgraph-sdk-powershell/releases Let's check the installed Version and what's available on the PowerShell Gallery Get-InstalledModule Microsoft.Graph Find-Module Microsoft.Graph To install the newest Version of the PowerShell Modules and also uninstalling the old Versions, you can use my GitHub Script. It takes a while until all Modules are installed.

PowerShell 7.3.1 released

Andres Bohren
Hi All, Yesterday PowerShell 7.3.1 has been released v7.3.1 Release of PowerShell https://github.com/PowerShell/PowerShell/releases/tag/v7.3.1 When you start PowerShell 7 you will see a notice I have downloaded the x64 *.msi and these are the Screenshots from the Installation. I always enable "Enable PowerShell remoting" wich is not enabled by default. Get-Host Regards Andres Bohren

MSIdentityTools PowerShell Module v2.0.31 released

Andres Bohren
Hi All, Three days ago, Microsoft has released a new Version of the MSIdentityTools PowerShell Module. Just two days after the 2.0.30 release - which is no longer available in the PowerShell Gallery. It's hard to tell what the reasons are. No clear Indication on the Project Site nor the Issues. MSIdentityTools 2.0.31 https://www.powershellgallery.com/packages/MSIdentityTools/2.0.31 Check what module is installed and what Module is available from the PowerShell Gallery Get-InstalledModule MSIdentityTools Find-Module MSIdentityTools Uninstall the old version of the PowerShell Module and install the newest one Uninstall-Module MSIdentityTools

Azure PowerShell Module Az 9.2.0 released

Andres Bohren
Hi All, Just a few Hours ago, Microsoft has released the AZ PowerShell Module 9.2.0. Az 9.2.0 https://www.powershellgallery.com/packages/az/9.2.0 Az 9.2.0 Release Notes https://github.com/Azure/azure-powershell/releases/tag/v9.2.0-December2022 Show Installed AZ Module and what's available in the PowerShell Gallery Get-InstalledModule AZ -AllVersions Find-Module AZ To uninstall all the old Modules and install the new Modules i have written a PowerShell Script that is published at my GitHub Repo. #Run Script directly from GitHub $ScriptFromGitHub = Invoke-WebRequest "

MSIdentityTools PowerShell Module v2.0.30 released

Andres Bohren
Hi All, Just a few Hours ago, Microsoft has released a new Version of the MSIdentityTools PowerShell Module. MSIdentityTools 2.0.30 https://www.powershellgallery.com/packages/MSidentityTools/2.0.30 Check what module is installed and what Module is available from the PowerShell Gallery Get-InstalledModule MSIdentityTools Find-Module MSIdentityTools Uninstall the old version of the PowerShell Module and install the newest one Uninstall-Module MSIdentityTools Install-Module MSIdentityTools Get-InstalledModule MSIdentityTools To see what commands are available use the following command Get-Command -Module MSIdentityTools Regards Andres Bohren

ExchangeOnlineManagement 3.1.0-Preview1 released

Andres Bohren
Hi All, Just a few Hours ago, Microsoft has released the ExchangeOnlineManagement 3.1.0-Previe1 PowerShell Module. ExchangeOnlineManagement 3.1.0-Preview1 https://www.powershellgallery.com/packages/ExchangeOnlineManagement/3.1.0-Preview1 Whats new in this release: v3.1.0-Preview1 : 1. Support for providing an Access Token with Connect-ExchangeOnline. 2. Bug fixes in Connect-ExchangeOnline and Get-ConnectionInformation. Check what Version is installed and what's available from the PowerShell Gallery Get-InstalledModule ExchangeOnlineManagement Find-Module ExchangeOnlineManagement -AllowPrerelease Uninstall the old Module and install the Preview Module Uninstall-Module ExchangeOnlineManagement -Force Install-Module ExchangeOnlineManagement -AllowPrerelease Get-InstalledModule ExchangeOnlineManagement Testing.

Create Azure AD App Registration with Microsoft.Graph PowerShell

Andres Bohren
Hi All, In this Blog Post i explain you how to create an Azure AD App Registration with the Microsoft.Graph PowerShell. You need to have the Azure Active Directory Role "Application Administrator" or "Application Developer". By the way. All the Code is used here is also on my GitHub Repo https://github.com/BohrenAn/GitHub_PowerShellScripts/blob/main/AzureAD/CreateAADApp-MgGraph.ps1 #Import Module Import-Module Microsoft.Graph.Authentication Import-Module Microsoft.Graph.Applications ############################################################################### #Connect-MgGraph #Connect to your Azure Active Directory with "Application Adminstrator" or "Global Administrator"