Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 645 Bytes

File metadata and controls

31 lines (19 loc) · 645 Bytes

Example 1: Update the accountEnabled property of a device

Import-Module Microsoft.Graph.Identity.DirectoryManagement

$params = @{
	accountEnabled = $false
}

Update-MgDevice -DeviceId $deviceId -BodyParameter $params

This example will update the accountenabled property of a device

Example 2: Write extensionAttributes on a device

Import-Module Microsoft.Graph.Identity.DirectoryManagement

$params = @{
	"extensionAttribute1" = "Value1"
	"extensionAttribute2" = "Value2"
}

Update-MgDevice -DeviceId $deviceId -BodyParameter $params

This example will write extensionattributes on a device