Hi All,
While checking the Devices in my M365 Tenant i was stumbled over the Stale Devices.
The List shows Devices that have an acivity more than 6 Months ago
Let’s check if we can get that Information with Microsoft.Graph PowerShell
Connect-MgGraph -Scopes Directory.ReadWrite.All, Directory.AccessAsUser.All Get-MgDevice Now we need to get the Devices that are older than six Months
$Devices = Get-MgDevice $Devices | where {$_.ApproximateLastSignInDateTime -lt (Get-Date).AddMonths(-6)} We can format that a little better
Hi All,
I had the “pleasure” again this week to Document the Azure AD Policies.
Making several Screenshots in the Azure AD Portal seemed not the best way.
MSGraph: List Conditional Access policies So tried to use the Microsoft Graph Explorer
You need the Permission:
Policy.Read.All https://graph.microsoft.com/v1.0/identity/conditionalAccess/policies
While using the JSON could be one way. It’s not very good if you have to Document it in a Word Document right.
Hi All,
I recently had a case where i needed to access the AzureAD Signin Logs with PowerShell.
I’ve started at the Azure AD Signin Logs and filtered by UPN
Next step was Graph Explorer where i found the needed Permissions
############################################################################### # Graph Explorer ############################################################################### #Go to [https://aka.ms/ge](https://aka.ms/ge) https://graph.microsoft.com/v1.0/auditLogs/signIns https://graph.microsoft.com/v1.0/auditLogs/signIns?&$filter=startsWith(userPrincipalName,'a.bohren@icewolf.ch') Let’s connect with these Permissions (they need Admin Consent and i already have that)
#Import-Module and Connect to Microsoft Graph Import-Module Microsoft.
Hi All,
Somehow i missed, that the AZ PowerShell Module 9.3.0 has already been released a Week ago.
Az 9.3.0 Azure PowerShell release notes
Show Installed AZ Module and what’s available in the PowerShell Gallery
Get-InstalledModule AZ 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 "https://raw.
Hi All,
Azure AD Dynamic Groups allows you to create Security Groups or M365 Groups/Teams that add Members based on Attributes. Like already known in Exchange with Dynamic Distribution Groups for a long time.
Create or update a dynamic group in Azure Active Directory
Go to Azure AD and create a new Group. Select your group Type: Security or Microsoft 365 Group / Teams
Then select the Membership Type: Assigned, Dynamic User, Dynamic Device
Hi All,
Last Night was Microsoft Patchday and i saw, that a new Version of Azure File Sync Agent was available on Windows Update.
I did not install it via Windows Update for the purpose of this Blog Post.
In Azure Portal under Storage Sync Service you can see that the current Version of the Agent is 15.0
I downloaded the new Version of the File Sync Agent - but that was a fail
Hi All,
Just a few Hours ago, Microsoft has released the AZ PowerShell Module 9.2.0.
PowerShell Gallery Az 9.2.0
Az 9.2.0 Release Notes
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 "https://raw.
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
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" Role ############################################################################### Connect-MgGraph -Scopes "Application.
Hi All,
A few weeks ago, Microsoft has released a new Version of Microsoft Azure Active Directory Connect.
Azure AD Connect: Version release history Microsoft Azure Active Directory Connect 2.1.20.0 On the M365 Admin Center in the Health > Directory Sync Status you can find the new Version Number
Regards
Andres Bohren
Hi All,
In this Blog Post i explain how to Create and Depoly a PowerShell 7 Runbook for Azure Automation with the AZ PowerShell Module.
#Connect to Azure Connect-AzAccount #Get Automation Account Get-AzAutomationAccount I have two Azure Automation Accounts. In this Example, we use the second one.
############################################################################### # Create Runbook ############################################################################### $accountName = "icewolfautomation" $rgName = "RG_DEV" $location = "West Europe" $RunbookName = "DemoPS7" $scriptContent = @' #Connect to Exchange with Managed Identity $tenant = "icewolfch.