Showing items from Azure Functions

Update deallocated AVD session hosts with scheduled agents updates feature

Recently, a question passed my screen if the AVD scheduled agent feature supports deallocated machines. The answer is short, no. Also when not enabling the feature, Microsoft does not start deallocated machines. So, how do we make sure when a new agent becomes available also deallocated machines are updated?

Continue Reading

Enroll Defender For Endpoint automated

https://learn.microsoft.com/en-us/mem/intune/protect/advanced-threat-protection-configure

Microsoft Intune Connection -> On

Find the if there is a connector already. Otherwise, create one.

$url = "https://graph.microsoft.com/beta/deviceManagement/mobileThreatDefenseConnectors/fc780465-2017-40d4-a0c5-307022471b92"  #/fc780465-2017-40d4-a0c5-307022471b92
$request = Invoke-RestMethod -Uri $url -Method Get -Headers $authHeader
$request.value | ConvertTo-Json -Depth 9


$body = @{
  androidEnabled = $false
  iosEnabled = $false
  androidDeviceBlockedOnMissingPartnerData = $false
  iosDeviceBlockedOnMissingPartnerData = $false
  partnerUnsupportedOsVersionBlocked = $false
  windowsEnabled = $false
  partnerUnresponsivenessThresholdInDays = 6
} | ConvertTo-Json
$postRequest = Invoke-RestMethod -Uri $url -Method Patch -Headers $authHeader -Body $body
$postRequest

available-dfe-connector.png

Continue Reading

Using LaMetric Time to monitor an AVD environment

A lot of people in the Microsoft community are using a fancy gadget called LaMetric Time. It is a smart clock which can show time, receiving notifications from a lot of different environments and more. In this blog I will show how to use LaMetric Time to monitor a AVD environment.

Continue Reading

Disaster recovery plan for Azure Key Vault using tags, PowerShell and Azure Function

By default the Azure Key Vault has softdelete enabled with a 90 day retention. This option will protect Key Vault items when deleted by accident. When deleted you are able to restore that item through the portal or PowerShell.
But what if someone has deleted the Key Vault itself with all the items and softdeleted items included. There is no option to restore a Key Vault. In this article I will describe a way how to backup and restore a Key Vault when deleted.

Continue Reading

Monitor active M365 ServiceHealth services only with PowerShell

You have some Microsoft 365 (M365) customers which you like to monitor. Every day you are looking at the customer specific M365 portal looking for Microsoft event.

Logging in at the customers portal isn’t a very efficient way. Microsoft provides a lot of API’s which can be used for monitoring. By combining some of them you are able to do some really nice and smart things.

Continue Reading