{"id":2397,"date":"2016-11-03T12:45:09","date_gmt":"2016-11-03T10:45:09","guid":{"rendered":"http:\/\/blog.hosebei.ch\/?p=2397"},"modified":"2016-11-03T12:45:09","modified_gmt":"2016-11-03T10:45:09","slug":"azure-ad-remove-registered-device","status":"publish","type":"post","link":"https:\/\/blog.hosebei.ch\/?p=2397","title":{"rendered":"Azure AD &#8211; Remove Registered Device"},"content":{"rendered":"<p>Today I was asked how to remove a registered Device from the Azure Active Directory, for all of those asking, what is a registered Device, see this <a href=\"https:\/\/azure.microsoft.com\/en-us\/documentation\/articles\/active-directory-conditional-access-device-registration-overview\/\">Azure Article<\/a>, and you can automate this step for your users, if you are following this <a href=\"https:\/\/azure.microsoft.com\/en-us\/documentation\/articles\/active-directory-conditional-access-automatic-device-registration\/\">Azure Article<\/a>. But what if you would like to remove the registered Device of a User? You can do that through the Portal:<br \/>\n<a href=\"http:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice01.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2399\" alt=\"Azure AD Remove Device trhough Portal\" src=\"http:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice01.png?w=300\" width=\"300\" height=\"228\" srcset=\"https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice01.png 1076w, https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice01-300x228.png 300w, https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice01-1024x778.png 1024w, https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice01-768x583.png 768w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nOr you can use PowerShell to do that! <!--more--><\/p>\n<p>To be able to remove Azure AD Devices, you must have installed the current Version of Microsoft Azure Active Directory Module for Windows PowerShell, which is currently 1.1.166.0 (Released at 15. August 2016), even it is a GA Version, you can find the download on the Connect Portal: <a href=\"http:\/\/connect.microsoft.com\/site1164\/Downloads\/DownloadDetails.aspx?DownloadID=59185\" target=\"_blank\">Download Microsoft Azure Active Directory Module for Windows PowerShell<\/a><\/p>\n<p>After the Installation you can search for a Device by using Get-MSOLDevice:<br \/>\n<code>Get-MsolDevice -Name 'DESKTOP-RB004TR'<\/code><br \/>\n<a href=\"http:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice02.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2400\" alt=\"Azure AD Remove Device with PowerShell Get-Device\" src=\"http:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice02.png?w=300\" width=\"300\" height=\"128\" srcset=\"https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice02.png 643w, https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice02-300x128.png 300w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nAnd you can delete a Device by using Remove-MsolDevice:<br \/>\n<code>$devID = (Get-MsolDevice -Name 'DESKTOP-RB004TR').DeviceId<br \/>\nRemove-MSOLDevice -DeviceId $devID<\/code><br \/>\nor<br \/>\n<code>Remove-MSOLDevice -DeviceId (Get-MsolDevice -Name 'DESKTOP-RB004TR').DeviceId<\/code><br \/>\nWithout the Force switch, PowerShell will ask for confirmation before deletion:<br \/>\n<a href=\"http:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice03.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2401\" alt=\"Azure AD Remove Device with PowerShell\" src=\"http:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice03.png?w=300\" width=\"300\" height=\"52\" srcset=\"https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice03.png 481w, https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice03-300x52.png 300w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>One Word of caution: When you are searching for the string &#8220;Download Microsoft Azure Active Directory Module for Windows PowerShell&#8221; you will might find yourself on an Microsoft site which is translated, in my case it was german, and the last Update was from January 2016:<br \/>\n<a href=\"http:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice04.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2404\" alt=\"Azure AD Documentation Update\" src=\"http:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice04.png?w=300\" width=\"300\" height=\"148\" srcset=\"https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice04.png 1136w, https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice04-300x148.png 300w, https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice04-1024x507.png 1024w, https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2016\/11\/azureadremovedevice04-768x380.png 768w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nIf you know how often things change in Azure, I would believe that this page is outdated in terms of information, but unfortunately, the page also directs you to an old Microsoft Azure Active Directory Module for Windows PowerShell where the cmdlets like Remove-MSOLDevice are missing. I gave feedback to Microsoft through the Webpage, hopefully they will update this page, and I think that other languages can be affected as well.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I was asked how to remove a registered Device from the Azure Active Directory, for all of those asking, what is a registered Device, see this Azure Article, and you can automate this step for your users, if you are following this Azure Article. But what if you would like to remove the registered [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,29],"tags":[],"class_list":["post-2397","post","type-post","status-publish","format-standard","hentry","category-azure-ad","category-powershell"],"_links":{"self":[{"href":"https:\/\/blog.hosebei.ch\/index.php?rest_route=\/wp\/v2\/posts\/2397","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.hosebei.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hosebei.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hosebei.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hosebei.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2397"}],"version-history":[{"count":0,"href":"https:\/\/blog.hosebei.ch\/index.php?rest_route=\/wp\/v2\/posts\/2397\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.hosebei.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hosebei.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hosebei.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}