PowerShell

PowerShell 7 and PnP.PowerShell on Linux

Andres Bohren
Hi All, Recently i had a customer who wanted to upload a File on SharePoint. I've done something similar with PowerShell on Windows and Azure Automation. Upload file to SharePoint Online with PnP.PowerShell https://blog.icewolf.ch/archive/2022/01/23/upload-file-to-sharepoint-online-with-pnp-powershell.aspx Install PowerShell on Linux https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-linux?view=powershell-7.2 As i have a CentOS8 available i did test that. There is a specific Docs from Microsoft that explains how to Install PowerShell on CentOS Installing PowerShell on CentOS https://docs.microsoft.com/en-us/powershell/scripting/install/install-centos?view=powershell-7.2 cat /etc/centos-release rpm -i https://github.

Azure PowerShell Module Az 8.0.0 released

Andres Bohren
Hi All, A few Hours ago, Microsoft has released the Azure PowerShell Module AZ v8.0.0 Microsoft Azure PowerShell AZ 8.0.0 https://www.powershellgallery.com/packages/AZ/8.0.0 Release Notes not yet udated https://docs.microsoft.com/en-us/powershell/azure/release-notes-azureps?view=azps-7.5.0 Check your current installed Module and what is available on PowerShell Gallery Get-InstalledModule AZ Find-Module AZ I've published a Script in my GitHub Repo to uninstall the old Modules and install the new Modules https://github.com/BohrenAn/GitHub_PowerShellScripts/blob/main/AzureAD/Microsoft.Graph_HowToStart.ps1 Or you can run the Script below to directly execute that Script

Exchange Online Mail flow Alert policies

Andres Bohren
Hi All, Maybe you have noticed the new Mail flow Alert policies in Exchange Admin Center. You can define new Alert policies, define the Severity, the Insight, the recipient, the Notification Limit and sometimes also the Threshold for the Alert. For me it's a little bit odd to send an Email in case something does not work well with the Mailflow. It could be that you get the Email very late or even when the issue is already resolved.

Update Modules on Azure Automation with AZ PowerShell

Andres Bohren
Hi All, As you probably know, i am a big Fan of Azure Automation to run some Automation Scripts for M365 in Azure. When you try to install a new Microsoft Graph Module in Azure Automation from the Gallery it will fail, due its dependency for Microsoft.Graph.Authentication, because an older Version is installed. I've tried to figure out, how to update the Modules with PowerShell (too much clicking for doing it manually).

Powershell v7.2.4 released

Andres Bohren
Hi All, A few Days ago, Microsoft has released PowerShell 7.2.4. Changelog https://github.com/PowerShell/PowerShell/blob/master/CHANGELOG/7.2.md v7.2.4 Release of PowerShell https://github.com/PowerShell/PowerShell/releases/tag/v7.2.4 Regards Andres Bohren

Microsoft.Graph PowerShell Modules 1.9.6 released

Andres Bohren
Hi All, A few days ago, Microsoft has released a new Version of the Microsoft.Graph PowerShell Module. Find-Module Microsoft.Graph Install-Module Microsoft.Graph If you have already installed a Version of Microsoft.Graph i recommend to use my CleanupGraphModules.ps1 from my GitHub Repo https://github.com/BohrenAn/GitHub_PowerShellScripts/blob/main/ExchangeOnline/GraphAPI/CleanupGraphModules.ps1 Microsoft.Graph 1.9.6 https://www.powershellgallery.com/packages/Microsoft.Graph/1.9.6 Release Notes https://github.com/microsoftgraph/msgraph-sdk-powershell/releases Regards Andres Bohren

Azure PowerShell Module Az 7.5.0 released

Andres Bohren
Hi All, Yesterday the AZ PowerShell Module 7.5.0 has been released AZ PowerShell Module 7.5.0 https://www.powershellgallery.com/packages/az/7.5.0 I have used my Cleanup-AZModules.psy from my GitHub Repo to update the Modules https://github.com/BohrenAn/GitHub_PowerShellScripts/blob/main/Azure/Cleanup-AZModules.ps1 Get-InstalledModule AZ Get-InstalledModule AZ.* Regards Andres Bohren

PowerShell 7.2.3 released

Andres Bohren
Hi All, Yesterday a new Version of PowerShell 7 has been released by Microsoft. v7.2.3 Release of PowerShell https://github.com/PowerShell/PowerShell/releases/tag/v7.2.3 Regards Andres Bohren

Detect if your PowerShell code is running in Windows Terminal

Andres Bohren
Hi All, Ever wanted to detect if your PowerShell Script is running in a WindowsTerminal Session? As you can see, the default Font is a bit bigger than in the other PowerShell Windows Here is some code to detect that if ($env:WT_SESSION) { Write-Host "Windows Terminal detected" } else { Write-Host "Windows Terminal not detected" } Windows Terminal PowerShell 5 PowerShell 7 PowerShell ISE Regards Andres Bohren

Microsoft.Graph PowerShell Modules 1.9.5 released

Andres Bohren
Hi All, Yesterday Microsoft has released a new Version of theyr Microsoft.Graph PowerShell Modules. Just a few days after releasing 1.9.4... I like the fact that they fixed a bug in "user-agent", but maybe it shows somee missing quality control. Microsoft.Graph 1.9.5 https://www.powershellgallery.com/packages/Microsoft.Graph/1.9.5 Release notes https://github.com/microsoftgraph/msgraph-sdk-powershell/releases Check the installed module and what's published in PowerShell Gallery Get-InstalliedModule Microsoft.Graph Find-Module Microsoft.Graph If you uninstall the Microsoft.Graph Module, you don't uninstall the sub modules Uninstall-Module Microsoft.