{"id":8394,"date":"2024-11-07T12:42:59","date_gmt":"2024-11-07T12:42:59","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=8394"},"modified":"2024-11-12T20:57:53","modified_gmt":"2024-11-12T20:57:53","slug":"migrate-user-accounts-from-azure-ad-to-on-premise-ad","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/migrate-user-accounts-from-azure-ad-to-on-premise-ad","title":{"rendered":"Migrate user accounts from Azure AD to on-premise AD"},"content":{"rendered":"\n<p>Export User and Shared Mailboxes from 365 Exchange Admin <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">import-csv C:\\TEMP\\Export\\User.csv -Encoding UTF8 | foreach-object {New-ADUser -Name ($_.DisplayName) -SamAccountName ($_.Alias) -Company $_.Company -GivenName $_.FirstName -Surname $_.LastName -City $_.City -Department $_.Department -DisplayName $_.DisplayName -Fax $_.Fax -MobilePhone $_.MobilePhone -Office $_.Office -PasswordNeverExpires ($_.PasswordNeverExpires -eq \"True\") -PostalCode $_.PostalCode -EmailAddress $_.PrimarySmtpAddress -State $_.State -streetAddress $_.streetAddress -Title $_.Title -UserPrincipalName $_.PrimarySmtpAddress -Path \"OU=Users,OU=XXXXXX,DC=domain,DC=local\" -OfficePhone $_.Phone -AccountPassword (ConvertTo-SecureString -string \"Dasf34rRFSA&amp;\" -AsPlainText -force) -enabled $true }\n\nimport-csv C:\\TEMP\\Export\\User.csv -Encoding UTF8 | foreach-object {Set-aduser -Identity $_.Alias -add @{proxyaddresses = $_.EmailAddresses} }\n\nimport-csv C:\\TEMP\\Export\\User.csv -Encoding UTF8 | foreach-object {Set-ADUser -Identity $_.Alias -streetAddress $_.streetAddress -OfficePhone $_.Phone}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Export User and Shared Mailboxes from 365 Exchange Admin<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8394","post","type-post","status-publish","format-standard","hentry","category-research"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/8394","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=8394"}],"version-history":[{"count":3,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/8394\/revisions"}],"predecessor-version":[{"id":8409,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/8394\/revisions\/8409"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=8394"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=8394"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=8394"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}