SOLVED

New to Powershell - Moving Values Between Attributes

%3CLINGO-SUB%20id%3D%22lingo-sub-1475312%22%20slang%3D%22en-US%22%3ENew%20to%20Powershell%20-%20Moving%20Values%20Between%20Attributes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1475312%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20new%20to%20these%20forums%20and%20Power%20Shell%20in%20general%20so%20please%20bare%20with%20my%20newness%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20think%20I%20will%20start%20with%20a%20little%20bit%20of%20history%20since%20since%20it%20may%20help%20as%20I%20maybe%20missing%20something%20all%20together.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EI%20am%20a%20New%20Server%20Administrator.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20moved%20from%20Exchange%20on%20Prem%20to%20o365%20Off%20Prem%20while%20still%20using%20AD%20On%20Prem.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat%20being%20said%20our%20signature%20solution%20changed%20to%20a%20cloud%20based%20solution%20(Exlaimer%20Cloud)%20and%20some%20of%20the%20AD%20Attributes%20we%20were%20using%20Microsoft%20does%20not%20Sync%20over%20to%20to%20o365.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExample%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOur%20call%20manager%20uses%20telephone%20number%20which%20we%20have%20as%20an%20extension%26nbsp%3B%20XXXX%3C%2FP%3E%3CP%3Eso%20we%20use%20the%20OTHER%20Telephone%20to%20make%20it%20XXX.XXX.XXX%20for%20display%20on%20our%20signatures.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EotherFacsimileTelephoneNumber%26nbsp%3B%20is%20however%20NOT%20Synced%20over%20fro%20On%20Prem%20AD%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20are%20thinking%20%2F%20working%20towards%20possibly%20moving%20to%20Azure%20AD%20which%20will%20fix%20this%20however%2C%20that%20is%20awhile%20away.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20I%20am%20trying%20to%20move%20some%20attributes%20over...%20however%20I%20can%20not%20figure%20it%20out.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20anyone%20assist%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20do%20the%20following...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETarget%20%3D%20Users%20in%20Specified%20OU%26nbsp%3B%20(for%20this%20example%20lets%20say%20FQDN%20%2F%20DOMAIN%20%2F%20Computer%20Users%20%2F%20HR%20%2F%20John%20Doe%20)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMove%20Attributes%3A%3C%2FP%3E%3CP%3EAttribute%201%20-%3C%2FP%3E%3CP%3Efrom%26nbsp%3BotherTelephoneNumber%3C%2FP%3E%3CP%3Eto%20homePhone%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAttribute%202%20-%26nbsp%3B%3C%2FP%3E%3CP%3Efrom%26nbsp%3BotherFacsimileTelephoneNumber%3C%2FP%3E%3CP%3Eto%20pager%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAttribute%203%20-%26nbsp%3B%3C%2FP%3E%3CP%3Efrom%20info%3C%2FP%3E%3CP%3Eto%20ipPhone%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20know%20this%20wont%20be%20the%20CLEANEST%20for%20Active%20Directory%2C%20but%20with%20the%20sync%20options%20that%20actually%20work%20with%20o365...%20I%20am%20left%20without%20many%20options.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1475312%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1476406%22%20slang%3D%22en-US%22%3ERe%3A%20New%20to%20Powershell%20-%20Moving%20Values%20Between%20Attributes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1476406%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F703982%22%20target%3D%22_blank%22%3E%40dwmoreau%3C%2FA%3E%2C%3C%2FP%3E%3CP%3EFrom%20information%20provided%20in%20your%20post%20I%20am%20assuming%20you%20are%20using%20AzureADConnect%20to%20sync%20users%20and%20their%20attributes%20from%20on-prem%20AD%20to%20AzureAD.%3C%2FP%3E%3CP%3EYou%20can%20add%20additional%20attributes%20to%20the%20sync%20using%20ADConnect%20tool%3A%3CBR%20%2F%3E%22%20...you%20can%20add%20missing%20attribute%20by%20synchronizing%20it%20from%20your%20on-premises%20Active%20Directory%20(AD)%20to%20Azure%20Active%20Directory%20(Azure%20AD).%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20follow%20steps%20outlined%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Factive-directory%2Fapp-provisioning%2Fuser-provisioning-sync-attributes-for-mapping%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Ehere%3C%2FA%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1477071%22%20slang%3D%22en-US%22%3ERe%3A%20New%20to%20Powershell%20-%20Moving%20Values%20Between%20Attributes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1477071%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F672105%22%20target%3D%22_blank%22%3E%40AndySvints%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tried%20AD%20Connect%20SYNC%20but%20it%20does%20NOT%20Syn%20what%20Microsoft%20has%20listed%20it%20should.%26nbsp%3B%20For%20instance%20OtherFacsimileTelephoneNumber.%26nbsp%3B%20I%20opened%20a%20case%20with%20Microsoft%20support%20and%20I%20got%20the%20following%20response.%20(after%20months%20of%20them%20asking%20for%20logs%20and%20everything%20else).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E--------------------------------------------%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EHello%20David%2C%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EThis%20is%20regarding%20service%20request%20ticket%20number%2017421263.%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3E%3CBR%20%2F%3EAs%20per%20the%20output%20we%20are%20only%20able%20to%20see%20the%20FacsimileTelephoneNumber%26nbsp%3B%26nbsp%3B%26nbsp%3Bif%20that%20us%20been%20set%20in%20the%20AD.%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EDepartment%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20XXXXXXXXXXX%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EDirSyncEnabled%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20True%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EDisplayName%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20XXXXXXXXXXX%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EFacsimileTelephoneNumber%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EGivenName%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20XXXXXXXX%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EWe%20were%20unable%20to%20see%20the%20OtherFacsimileTelephoneNumber%26nbsp%3B%26nbsp%3B%26nbsp%3B%20anywhere%20in%20the%20office%20365%20which%20is%20an%20by%20design.%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EPlease%20let%20me%20know%20if%20you%20have%20any%20more%20query%20or%20concern%20for%20the%20same.%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EThank%20you%20for%20using%20Microsoft%20Product%20Support%20and%20Microsoft%20Products.%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EWarm%20Regards%2C%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3ETulshiram%20Kolekar%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EMicrosoft%20Technical%20Support%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3E------------------------------------------------%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CU%3E%3CSTRONG%3E%3CSPAN%3EI%20then%20asked%20them%20what%20they%20DO%20Sync%20and%20they%20could%20not%20give%20me%20an%20answer.%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FU%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E-----------------------------------------------%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EHello%20David%2C%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EThis%20is%20in%20reference%20to%20Service%20Request%3A%2017421263.%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EWe%20have%20highlighted%20this%20issue%20to%20our%20senior%20escalation%20team%20and%20they%20are%20checking%20for%20the%20attribute%20which%20sync%20to%20office%20365.%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EOnce%20we%20get%20the%20list%20of%20the%20attribute%20which%20shows%20in%20the%20office%20365%20we%20will%20provide%20same%20to%20you.%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EAs%20of%20now%20we%20don%E2%80%99t%20have%20any%20ETA%20for%20the%20same.%20Once%20we%20get%20any%20update%20from%20them%20we%20will%20let%20you%20know%20the%20same.%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EAs%20of%20now%20we%20will%20proceed%20with%20the%20temporally%20closer%20on%20this%20case%20if%20you%20still%20have%20any%20issue%20please%20do%20reply%20to%20this%20email%20so%20we%20can%20get%20back%20to%20you.%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EFeel%20free%20to%20drop%20in%20an%20e-mail%20to%20me%20in%20case%20of%20any%20query%20or%20help%20required%20and%20will%20call%20you%20back%20in%20no%20time%20and%20make%20sure%20that%20the%20support%20delivered%20to%20you%20will%20be%20no%20less%20than%20excellent%20stuff.%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EYour%20satisfaction%20is%20our%20key%20concern%20and%20will%20make%20sure%20that%20our%20future%20endeavor%20with%20regards%20to%20any%20query%20will%20be%20of%20remembrance%20and%20will%20impact%20our%20relation%20in%20a%20positive%20way.%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3E---------------------------------------%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20mean%20if%20you%20KNOW%20this%20works%20somehow%2C%20I%20am%20all%20ears%2C%20I%20would%20rather%20not%20have%20to%20go%20through%20an%20edit%20what%20we%20already%20have%20in%20AD.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-%20Thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1477566%22%20slang%3D%22en-US%22%3ERe%3A%20New%20to%20Powershell%20-%20Moving%20Values%20Between%20Attributes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1477566%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F703982%22%20target%3D%22_blank%22%3E%40dwmoreau%3C%2FA%3E%2C%3C%2FP%3E%3CP%3EI%20see%20what%20you%20are%20saying.%3C%2FP%3E%3CP%3EYou%20are%20correct%20even%20though%20attribute%26nbsp%3B%3CSTRONG%3EotherFacsimileTelephoneNumber%3C%2FSTRONG%3E%20is%20synced%20via%20ADConnect%20Tool%20to%20AzureAD%20it%20is%20not%20exposed%20to%20be%20accessible%20via%20management%20endpoints%20and%20even%20Graph%20API.%20Basically%20it%20is%20there%20but%20you%20cannot%20read%2Fget%20it.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20terms%20of%20moving%20attributes%20values%20in%20local%20AD%20from%20one%20to%20another%20it%20can%20be%20completed%20using%20%3CSTRONG%3ESet-ADObject%3C%2FSTRONG%3E%20cmdlet.%3C%2FP%3E%3CP%3EYou%20just%20need%20to%20be%20mindful%20about%20the%20attributes%20value%20restrictions.%3C%2FP%3E%3CP%3EFor%20example%26nbsp%3B%3CSTRONG%3EotherFacsimileTelephoneNumber%3C%2FSTRONG%3E%26nbsp%3B%20is%20a%20collection%20and%20%3CSTRONG%3Epager%3C%2FSTRONG%3E%20is%20a%20string.%3C%2FP%3E%3CP%3EAlso%20make%20sure%20that%20you%20are%20understand%20the%20priority%20of%20the%20actions%20of%20%3CSTRONG%3ESet-ADObject%3C%2FSTRONG%3E%3A%3C%2FP%3E%3COL%3E%3CLI%3E%3CSTRONG%3ERemove%3C%2FSTRONG%3E%3C%2FLI%3E%3CLI%3E%3CSTRONG%3EAdd%3C%2FSTRONG%3E%3C%2FLI%3E%3CLI%3E%3CSTRONG%3EReplace%3C%2FSTRONG%3E%3C%2FLI%3E%3CLI%3E%3CSTRONG%3EClear%3C%2FSTRONG%3E%3C%2FLI%3E%3C%2FOL%3E%3CP%3ESo%20in%20order%20to%20move%20attribute%20from%26nbsp%3B%3CSTRONG%3EotherFacsimileTelephoneNumber%3C%2FSTRONG%3E%26nbsp%3B%20to%20%3CSTRONG%3Epager%3C%2FSTRONG%3E%20you%20would%20do%20something%20along%20those%20lines%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EGet-ADUser%20myTestUser%20%7C%20%0A%25%7BSet-ADObject%20-Identity%20%24_.DistinguishedName%20-Replace%20%40%7Bpager%3D%24_.otherFacsimileTelephoneNumber%20%7C%20select%20-First%201%7D%20-Clear%20otherFacsimileTelephoneNumber%20%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EMove%20the%20value%20from%26nbsp%3B%3CSTRONG%3EotherFacsimileTelephoneNumber%3C%2FSTRONG%3E%26nbsp%3B%20to%26nbsp%3B%3CSTRONG%3Epager%3C%2FSTRONG%3E%26nbsp%3B%20and%20clear%26nbsp%3B%3CSTRONG%3EotherFacsimileTelephoneNumber%3C%2FSTRONG%3E%26nbsp%3B.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMore%20Details%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Faddsadministration%2Fset-adobject%3Fview%3Dwin10-ps%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ESet-ADObject%20Documentation%3C%2FA%3E%3C%2FP%3E%3CP%3EHope%20that%20helps.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1477599%22%20slang%3D%22en-US%22%3ERe%3A%20New%20to%20Powershell%20-%20Moving%20Values%20Between%20Attributes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1477599%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F672105%22%20target%3D%22_blank%22%3E%40AndySvints%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat's%20awesome!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20baring%20with%20my%20explanation.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGiven%20you%20example%2C%20I%20should%20be%20able%20to%20use%20it%20and%20even%20use%20it%20to%20construct%20some%20of%20my%20own%20with%20a%20known%20working%20example.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOne%20thing%20if%20you%20don't%20mine%2C%20how%20could%20I%20target%20a%20specific%20OU%20instead%20of%20a%20single%20user%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1477627%22%20slang%3D%22en-US%22%3ERe%3A%20New%20to%20Powershell%20-%20Moving%20Values%20Between%20Attributes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1477627%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F672105%22%20target%3D%22_blank%22%3E%40AndySvints%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20taking%20the%20time%20with%20me%20here%20-%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20this%20with%20my%20own%20test%20user%20and%20from%20what%20i%20can%20see%20it%20appears%20as%20though%20it%20is%20seeing%20the%20information%20as%20blank.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20also%20added%20a%20snippet%20of%20the%20error%20%26amp%3B%20of%20the%20AD%20User%20screens.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Capture2.PNG%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F199775i2522B5C0F9BDBF6E%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Capture2.PNG%22%20alt%3D%22Capture2.PNG%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F199774i13817150EBDD02EE%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Capture.PNG%22%20alt%3D%22Capture.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1477675%22%20slang%3D%22en-US%22%3ERe%3A%20New%20to%20Powershell%20-%20Moving%20Values%20Between%20Attributes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1477675%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F703982%22%20target%3D%22_blank%22%3E%40dwmoreau%3C%2FA%3E%2C%3C%2FP%3E%3CP%3EMy%20bet%2C%20in%20my%20code%20snippet%20I%20did%20not%20get%20all%20needed%20user%20attributes%20with%20%3CSTRONG%3EGet-ADUser%3C%2FSTRONG%3E.%3C%2FP%3E%3CP%3EBy%20default%20get%20ad%20user%20gets%2010%20user%20attributes%20and%20%3CSTRONG%3EotherFacsimileTelephoneNumber%3C%2FSTRONG%3E%20is%20not%20one%20of%20them.%3C%2FP%3E%3CP%3ETry%20this%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EGet-ADUser%20myTestUser%20-Properties%20otherFacsimileTelephoneNumber%20%7C%20%25%7BSet-ADObject%20-Ident%0Aty%20%24_.DistinguishedName%20-Replace%20%40%7Bpager%3D%24_.otherFacsimileTelephoneNumber%20%7C%20select%20-First%201%7D%20-Clear%20otherFacsimileTeleponeNumber%20%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EAlso%20keep%20in%20mind%20that%20the%20snippet%20I%20am%20providing%20can%20be%20used%20for%20one%20as%20well%20as%20for%20all%20users%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EGet-ADUser%20-filter%20*%20-Properties%20otherFacsimileTelephoneNumber%20%7C%20%23...%20everything%20else%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1477791%22%20slang%3D%22en-US%22%3ERe%3A%20New%20to%20Powershell%20-%20Moving%20Values%20Between%20Attributes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1477791%22%20slang%3D%22en-US%22%3E%3CP%3EA%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F672105%22%20target%3D%22_blank%22%3E%40AndySvints%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20help%20immensely%20and%20I%20was%20able%20to%20get%20that%20snippet%20working%20after%20adding%20a%20h%20in%20the%20last%20telephone%2C%20I%20only%20knew%20to%20look%20because%20I%20do%20that%20alot.%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20able%20to%20use%20that%20to%20work%20with%20the%20next%20two%20I%20needed%20using%20the%20following.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EGet-ADUser%20dmoreau%20-Properties%20otherTelephone%20%7C%20%25%7BSet-ADObject%20-Identity%20%24_.DistinguishedName%20-Replace%20%40%7BhomePhone%3D%24_.otherTelephone%20%7C%20select%20-First%201%7D%20-Clear%20otherTelephone%20%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26amp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EGet-ADUser%20dmoreau%20-Properties%20info%20%7C%20%25%7BSet-ADObject%20-Identity%20%24_.DistinguishedName%20-Replace%20%40%7BipPhone%3D%24_.info%20%7C%20select%20-First%201%7D%20-Clear%20info%20%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20searching%20but%20obviously%20most%20people%20don't%20need%20to%20do%20this.%26nbsp%3B%20is%20there%20a%20way%20to%20split%20the%20notes%20lines%20up%20by%20a%20comma%20or%20something%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExample%20it%20takes%20the%20note%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELINE%201%3C%2FP%3E%3CP%3ELINE%202%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20makes%20it%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELINE%201LINE%202%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-%20Thanks%20again!%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello,

 

I am new to these forums and Power Shell in general so please bare with my newness :)

 

I think I will start with a little bit of history since since it may help as I maybe missing something all together.


I am a New Server Administrator.

 

We have moved from Exchange on Prem to o365 Off Prem while still using AD On Prem.

 

That being said our signature solution changed to a cloud based solution (Exlaimer Cloud) and some of the AD Attributes we were using Microsoft does not Sync over to to o365. 

 

Example:

 

Our call manager uses telephone number which we have as an extension  XXXX

so we use the OTHER Telephone to make it XXX.XXX.XXX for display on our signatures.

 

otherFacsimileTelephoneNumber  is however NOT Synced over fro On Prem AD

 

We are thinking / working towards possibly moving to Azure AD which will fix this however, that is awhile away.

 

So I am trying to move some attributes over... however I can not figure it out.

 

Can anyone assist?

 

I am trying to do the following...

 

Target = Users in Specified OU  (for this example lets say FQDN / DOMAIN / Computer Users / HR / John Doe )

 

Move Attributes:

Attribute 1 -

from otherTelephoneNumber

to homePhone

 

Attribute 2 - 

from otherFacsimileTelephoneNumber

to pager

 

Attribute 3 - 

from info

to ipPhone

 

I know this wont be the CLEANEST for Active Directory, but with the sync options that actually work with o365... I am left without many options.

7 Replies

Hello @dwmoreau,

From information provided in your post I am assuming you are using AzureADConnect to sync users and their attributes from on-prem AD to AzureAD.

You can add additional attributes to the sync using ADConnect tool:
" ...you can add missing attribute by synchronizing it from your on-premises Active Directory (AD) to Azure Active Directory (Azure AD)."

 

Please follow steps outlined here.

 

Hope that helps.

@AndySvints 

 

I have tried AD Connect SYNC but it does NOT Syn what Microsoft has listed it should.  For instance OtherFacsimileTelephoneNumber.  I opened a case with Microsoft support and I got the following response. (after months of them asking for logs and everything else).

 

--------------------------------------------

Hello David,

 

This is regarding service request ticket number 17421263.


As per the output we are only able to see the FacsimileTelephoneNumber   if that us been set in the AD.

Department                     : XXXXXXXXXXX

DirSyncEnabled                 : True

DisplayName                    : XXXXXXXXXXX

FacsimileTelephoneNumber       :

GivenName                      : XXXXXXXX

We were unable to see the OtherFacsimileTelephoneNumber    anywhere in the office 365 which is an by design.

Please let me know if you have any more query or concern for the same.

Thank you for using Microsoft Product Support and Microsoft Products.

Warm Regards,

Tulshiram Kolekar

Microsoft Technical Support

------------------------------------------------

 

I then asked them what they DO Sync and they could not give me an answer.

 

-----------------------------------------------

 

Hello David,

This is in reference to Service Request: 17421263.

We have highlighted this issue to our senior escalation team and they are checking for the attribute which sync to office 365.

Once we get the list of the attribute which shows in the office 365 we will provide same to you.

As of now we don’t have any ETA for the same. Once we get any update from them we will let you know the same.

As of now we will proceed with the temporally closer on this case if you still have any issue please do reply to this email so we can get back to you.

Feel free to drop in an e-mail to me in case of any query or help required and will call you back in no time and make sure that the support delivered to you will be no less than excellent stuff.

Your satisfaction is our key concern and will make sure that our future endeavor with regards to any query will be of remembrance and will impact our relation in a positive way.

 

---------------------------------------

 

I mean if you KNOW this works somehow, I am all ears, I would rather not have to go through an edit what we already have in AD.

 

- Thanks!

@dwmoreau,

I see what you are saying.

You are correct even though attribute otherFacsimileTelephoneNumber is synced via ADConnect Tool to AzureAD it is not exposed to be accessible via management endpoints and even Graph API. Basically it is there but you cannot read/get it. 

 

In terms of moving attributes values in local AD from one to another it can be completed using Set-ADObject cmdlet.

You just need to be mindful about the attributes value restrictions.

For example otherFacsimileTelephoneNumber  is a collection and pager is a string.

Also make sure that you are understand the priority of the actions of Set-ADObject:

  1. Remove
  2. Add
  3. Replace
  4. Clear

So in order to move attribute from otherFacsimileTelephoneNumber  to pager you would do something along those lines:

Get-ADUser myTestUser | 
%{Set-ADObject -Identity $_.DistinguishedName -Replace @{pager=$_.otherFacsimileTelephoneNumber | select -First 1} -Clear otherFacsimileTelephoneNumber }

Move the value from otherFacsimileTelephoneNumber  to pager  and clear otherFacsimileTelephoneNumber .

 

More Details: Set-ADObject Documentation

Hope that helps. 

 

 

 

@AndySvints 

 

That's awesome!

 

Thanks for baring with my explanation.

 

Given you example, I should be able to use it and even use it to construct some of my own with a known working example.

 

One thing if you don't mine, how could I target a specific OU instead of a single user?

@AndySvints 

 

Thanks for taking the time with me here -

 

I tried this with my own test user and from what i can see it appears as though it is seeing the information as blank.

 

I also added a snippet of the error & of the AD User screens.

 

Capture2.PNGCapture.PNG

Best Response confirmed by dwmoreau (Occasional Contributor)
Solution

@dwmoreau,

My bet, in my code snippet I did not get all needed user attributes with Get-ADUser.

By default get ad user gets 10 user attributes and otherFacsimileTelephoneNumber is not one of them.

Try this:

Get-ADUser myTestUser -Properties otherFacsimileTelephoneNumber | %{Set-ADObject -Ident
ty $_.DistinguishedName -Replace @{pager=$_.otherFacsimileTelephoneNumber | select -First 1} -Clear otherFacsimileTeleponeNumber }

Also keep in mind that the snippet I am providing can be used for one as well as for all users:

Get-ADUser -filter * -Properties otherFacsimileTelephoneNumber | #... everything else

 

Hope that helps.

A@AndySvints 

 

This help immensely and I was able to get that snippet working after adding a h in the last telephone, I only knew to look because I do that alot. :)

 

I was able to use that to work with the next two I needed using the following.

 

Get-ADUser dmoreau -Properties otherTelephone | %{Set-ADObject -Identity $_.DistinguishedName -Replace @{homePhone=$_.otherTelephone | select -First 1} -Clear otherTelephone }

&

Get-ADUser dmoreau -Properties info | %{Set-ADObject -Identity $_.DistinguishedName -Replace @{ipPhone=$_.info | select -First 1} -Clear info }

 

I tried searching but obviously most people don't need to do this.  is there a way to split the notes lines up by a comma or something?

 

Example it takes the note:

 

LINE 1

LINE 2

 

and makes it:

 

LINE 1LINE 2

 

 

- Thanks again!