Forum Discussion
Re-install MDE.Windows extension
- Aug 27, 2023
Huge apologies for not posting sooner. I did not end up testing this out in my tenant as planned, but here it as provided by the Microsoft engineer. Hope it works!
Step 1
$vm = Get-AzConnectedMachine -ResourceGroupName <Your RG name> -Name <Your VM name>
Step 2
$mdePackage = Invoke-AzRestMethod -Uri https://management.azure.com/subscriptions/$($vm.id.split('/')[2])/providers/Microsoft.Security/mdeOnboardings/?api-version=2021-10-01-preview
Step 3
$protectedSetting = @{
"defenderForEndpointOnboardingScript" = ($mdePackage.content | ConvertFrom-Json).value.properties.onboardingPackageWindows
}
/home/xxx> $Setting = @{
"azureResourceId" = $vm.Id
"vNextEnabled" = $true
}Step 4
New-AzConnectedMachineExtension -Name 'MDE.Windows' -ExtensionType 'MDE.Windows' -ResourceGroupName $vm.ResourceGroupName -MachineName $vm.Name -Location $vm.Location -Publisher 'Microsoft.Azure.AzureDefenderForServers' -Settings $Setting -ProtectedSetting $protectedSetting -AutoUpgradeMinorVersion -TypeHandlerVersion '1.0'
1. Azure just kept trying until it succeeded
2. Microsoft found the root cause and fixed the back-end
3. Microsoft engineers used a manual method and fixed directly on our tenant.
Am following up with Microsoft
- P4tr8kApr 03, 2023Brass ContributorHi man, do you know more about this manual method used by microsoft engineer?
- gilblumbergApr 05, 2023Iron ContributorThey only sent me a revised version of the instructions which didn't work the first time. I'll give it a try and then share
- joeyvldnAug 16, 2023Brass Contributor
gilblumberg Can you share them please?