Home
%3CLINGO-SUB%20id%3D%22lingo-sub-883748%22%20slang%3D%22en-US%22%3ERename%20Hybrid%20Joined%20Computers%20deployed%20via%20Autopilot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-883748%22%20slang%3D%22en-US%22%3E%3CP%3ETraditionally%2C%20IT%20pros%20spend%20a%20lot%20of%20time%20building%20and%20customizing%20images%20that%20will%20later%20be%20deployed%20to%20devices.%20Windows%20Autopilot%20introduces%20a%20new%20approach.%3C%2FP%3E%0A%3CP%3EFrom%20the%20user's%20perspective%2C%20it%20only%20takes%20a%20few%20simple%20operations%20to%20make%20their%20device%20ready%20to%20use.%3C%2FP%3E%0A%3CP%3EFrom%20the%20IT%20pro's%20perspective%2C%20the%20only%20interaction%20required%20from%20the%20end%20user%20is%20to%20connect%20to%20a%20network%20and%20to%20verify%20their%20credentials.%20Everything%20beyond%20that%20is%20automated.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1823841289%22%20id%3D%22toc-hId-1823841289%22%3EChallenge%3C%2FH2%3E%0A%3CP%3EOne%20of%20the%20feature%20IT%20pros%20miss%20today%20(at%20the%20time%20of%20this%20post)%20is%20the%20standardization%20of%20the%20Computer%20Names%20when%20using%20Autopilot%20for%20Hybrid%20scenarios.%20The%20reason%20being%20the%20limited%20flexibility%20while%20creating%20the%20Domain%20Join%20configuration%20profile%20in%20Intune%20which%20is%20only%20allows%20a%20prefix%20followed%20by%20a%20random%20set%20of%20characters.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20691px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F134211i26F6994F227994FC%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EProduct%20group%20is%20aware%20of%20this%20challenge%20and%20plans%20to%20make%20this%20more%20flexible%20in%20the%20near%20future.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--728315672%22%20id%3D%22toc-hId--728315672%22%3EWorkaround%3C%2FH2%3E%0A%3CP%3EAs%20an%20interim%20measure%2C%20you%20can%20leverage%20on-premises%20solution%20like%20ConfigMgr%20to%20change%20the%20computer%20name.%3C%2FP%3E%0A%3CP%3E%3CEM%3EAn%20assumption%20to%20this%20workaround%20is%20you%20have%20already%20pushed%20the%20ConfigMgr%20agent%20on%20the%20target%20device.%20For%20guidance%20refer%20this%20post%3A%20%3C%2FEM%3E%3CA%20href%3D%22https%3A%2F%2Fblogs.technet.microsoft.com%2Farnabm%2F2018%2F10%2F14%2Fdeploy-ccmsetup-exe-via-intune%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CEM%3Ehttps%3A%2F%2Fblogs.technet.microsoft.com%2Farnabm%2F2018%2F10%2F14%2Fdeploy-ccmsetup-exe-via-intune%2F%3C%2FEM%3E%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20post%20I%20am%20showcasing%20the%20power%20of%20ConfigMgr%20Task%20Sequence%20to%20change%20the%20computer%20name.%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EFrom%20the%20ConfigMgr%20console%20%3CSTRONG%3Ecreate%20a%20new%20custom%20task%20sequence%3C%2FSTRONG%3E.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20652px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F134212i9EF6B8F90E126F0F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorclipboard_image_1%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3COL%20start%3D%222%22%3E%0A%3CLI%3EGive%20a%20Name%20and%20don%E2%80%99t%20need%20to%20choose%20any%20Boot%20Image%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20650px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F134213i00104F219014E19A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorclipboard_image_2%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3COL%20start%3D%223%22%3E%0A%3CLI%3EClick%20%3CSTRONG%3ENext%3C%2FSTRONG%3E%20to%20finish%20the%20Wizard.%3C%2FLI%3E%0A%3CLI%3EEdit%20the%20Task%20Sequence%20to%20add%20steps%20for%20customizations%3C%2FLI%3E%0A%3CLI%3EClick%3CSTRONG%3E%20Add%3C%2FSTRONG%3E%20%26gt%3B%20%3CSTRONG%3EGeneral%3C%2FSTRONG%3E%20%26gt%3B%20%3CSTRONG%3ERun%20PowerShell%20script%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20311px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F134214i1F8FFD9F186F3E2A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorclipboard_image_3%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%226%22%3E%0A%3CLI%3EChoose%20the%20radio%20option%20%3CSTRONG%3EEnter%20a%20PowerShell%20script%3C%2FSTRONG%3E%20and%20click%20%3CSTRONG%3EAdd%20script%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20491px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F134215i89E0B6E2177B9814%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorclipboard_image_4%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3COL%20start%3D%227%22%3E%0A%3CLI%3EEnter%20your%20PowerShell%20script%20to%20rename%20the%20Computer%20Account%20meeting%20company%20requirements.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20example%20I%20am%20using%20a%20PowerShell%20script%20to%20change%20the%20computer%20name%20to%20its%20serial%20number.%20This%20is%20one%20of%20the%20most%20common%20asks.%20There%20are%20many%20references%20you%20can%20find%20from%20the%20Scripting%20Gallery%2C%20for%20this%20specific%20post%20I%20am%20referencing%3A%20%3CA%20href%3D%22https%3A%2F%2Fgallery.technet.microsoft.com%2FComputer-Rename-to-Serial-1f31b580%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgallery.technet.microsoft.com%2FComputer-Rename-to-Serial-1f31b580%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22lucida%20sans%20unicode%2Clucida%20sans%22%20size%3D%223%22%3E%5Breflection.assembly%5D%3A%3Aloadwithpartialname(%22microsoft.visualbasic%22)%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22lucida%20sans%20unicode%2Clucida%20sans%22%20size%3D%223%22%3E%24serial%20%3D%20Get-WmiObject%20win32_bios%20%7C%20select%20-expand%20serialnumber%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22lucida%20sans%20unicode%2Clucida%20sans%22%20size%3D%223%22%3E%24ready%20%3D%20%24serial%20-replace%20%22%20%22%2C%20%22%22%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22lucida%20sans%20unicode%2Clucida%20sans%22%20size%3D%223%22%3E%24number%20%3D%20%5BMicrosoft.VisualBasic.Information%5D%3A%3Aisnumeric(%24ready)%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22lucida%20sans%20unicode%2Clucida%20sans%22%20size%3D%223%22%3EIf%20(%24number%20-eq%20%24True)%20%7B%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22lucida%20sans%20unicode%2Clucida%20sans%22%20size%3D%223%22%3E%24name%20%3D%20%22UMS%22%20%2B%20%24ready.substring(0%2C%20%5BSystem.Math%5D%3A%3AMin(12%2C%20%24ready.length))%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22lucida%20sans%20unicode%2Clucida%20sans%22%20size%3D%223%22%3E%7D%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22lucida%20sans%20unicode%2Clucida%20sans%22%20size%3D%223%22%3EElseif%20(%24number%20-eq%20%24False)%20%7B%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22lucida%20sans%20unicode%2Clucida%20sans%22%20size%3D%223%22%3E%24name%20%3D%20%24ready.substring(0%2C%20%5BSystem.Math%5D%3A%3AMin(15%2C%20%24ready.length))%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22lucida%20sans%20unicode%2Clucida%20sans%22%20size%3D%223%22%3E%7D%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22lucida%20sans%20unicode%2Clucida%20sans%22%20size%3D%223%22%3E(Get-WmiObject%20Win32_ComputerSystem).Rename(%24name)%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%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%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%222%22%20color%3D%22%23FF0000%22%3EThe%20sample%20script%20provided%20here%20is%26nbsp%3Bnot%20supported%20under%20any%20Microsoft%20standard%20support%20program%20or%20service.%20All%26nbsp%3Bscripts%20are%26nbsp%3Bprovided%20AS%20IS%20without%20warranty%20of%20any%20kind.%20Microsoft%20further%20disclaims%20all%20implied%20warranties%20including%2C%20without%20limitation%2C%20any%20implied%20warranties%20of%20merchantability%20or%20of%20fitness%20for%20a%20particular%20purpose.%20The%20entire%20risk%20arising%20out%20of%20the%20use%20or%20performance%20of%20the%20sample%20scripts%20and%20documentation%20remains%20with%20you.%20In%20no%20event%20shall%20Microsoft%2C%20its%20authors%2C%20or%20anyone%20else%20involved%20in%20the%20creation%2C%20production%2C%20or%20delivery%20of%20the%20scripts%20be%20liable%20for%20any%20damages%20whatsoever%20(including%2C%20without%20limitation%2C%20damages%20for%20loss%20of%20business%20profits%2C%20business%20interruption%2C%20loss%20of%20business%20information%2C%20or%20other%20pecuniary%20loss)%20arising%20out%20of%20the%20use%20of%20or%20inability%20to%20use%20the%20sample%20scripts%20or%20documentation%2C%20even%20if%20Microsoft%20has%20been%20advised%20of%20the%20possibility%20of%20such%20damages.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%228%22%3E%0A%3CLI%3EClick%20%3CSTRONG%3EOK%3C%2FSTRONG%3E%20to%20save%20your%20changes.%3C%2FLI%3E%0A%3CLI%3ECheck%20the%20box%20%3CSTRONG%3ERun%20this%20step%20as%20the%20following%20account%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EClick%20the%20%3CSTRONG%3ESet%3C%2FSTRONG%3E%20button%20to%20select%20an%20account%20with%3COL%3E%0A%3CLI%3ERights%20to%20update%20Computer%20Account%20in%20Active%20Directory.%3C%2FLI%3E%0A%3CLI%3ELocal%20admin%20on%20the%20machine.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20486px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F134216i78053A2E01DDB062%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorclipboard_image_5%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3COL%20start%3D%2211%22%3E%0A%3CLI%3EAdd%20another%20Step%20to%20restart%20computer.%3C%2FLI%3E%0A%3CLI%3EClick%20%3CSTRONG%3EAdd%3C%2FSTRONG%3E%20%26gt%3B%20%3CSTRONG%3EGeneral%3C%2FSTRONG%3E%20%26gt%3B%20%3CSTRONG%3ERestart%20Computer%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20330px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F134217i18A0AEA2AEC793EE%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorclipboard_image_6%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3COL%20start%3D%2213%22%3E%0A%3CLI%3ESet%20the%20option%20after%20restart%20to%20%3CSTRONG%3EThe%20currently%20installed%20default%20operating%20system%3C%2FSTRONG%3E%20and%20customize%20message%20as%20desired.%20Additionally%20you%20can%20also%20change%20the%20timeout%20seconds.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20520px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F134218i270D2284E5AEF76D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorclipboard_image_7%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3COL%20start%3D%2214%22%3E%0A%3CLI%3EClick%20%3CSTRONG%3EOK%3C%2FSTRONG%3E%20to%20save%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYour%20task%20sequence%20is%20now%20ready%20to%20be%20deployed%20to%20a%20Device%20Collection.%20To%20keep%20the%20things%20Dynamic%2C%20I%20created%20a%20dynamic%20Device%20Collection%20which%20is%20matching%20the%20Name-Prefix%20of%20my%20Hybrid%20Join%20Configuration%20Profile.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20803px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F134219i152D4AA47D04CF0A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorclipboard_image_8%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20the%20device%20is%20renamed%2C%20AAD%20Connect%20will%20synchronize%20the%20new%20name%20in%20Azure%20AD%20and%20will%20be%20reflected%20in%20Intune%20and%20Azure%20portals.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20are%20many%20other%20ways%20to%20rename%20the%20computer%20without%20using%20ConfigMgr%2C%20I%20personally%20found%20this%20most%20secure%20without%20exposing%20any%20credentials.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EThanks%2C%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EArnab%20Mitra%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-883748%22%20slang%3D%22en-US%22%3E%3CP%3ETraditionally%2C%20IT%20pros%20spend%20a%20lot%20of%20time%20building%20and%20customizing%20images%20that%20will%20later%20be%20deployed%20to%20devices.%20Windows%20Autopilot%20introduces%20a%20new%20approach.%3C%2FP%3E%0A%3CP%3EFrom%20the%20user's%20perspective%2C%20it%20only%20takes%20a%20few%20simple%20operations%20to%20make%20their%20device%20ready%20to%20use.%3C%2FP%3E%0A%3CP%3EFrom%20the%20IT%20pro's%20perspective%2C%20the%20only%20interaction%20required%20from%20the%20end%20user%20is%20to%20connect%20to%20a%20network%20and%20to%20verify%20their%20credentials.%20Everything%20beyond%20that%20is%20automated.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-883748%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EArnabMitra%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Traditionally, IT pros spend a lot of time building and customizing images that will later be deployed to devices. Windows Autopilot introduces a new approach.

From the user's perspective, it only takes a few simple operations to make their device ready to use.

From the IT pro's perspective, the only interaction required from the end user is to connect to a network and to verify their credentials. Everything beyond that is automated.

 

Challenge

One of the feature IT pros miss today (at the time of this post) is the standardization of the Computer Names when using Autopilot for Hybrid scenarios. The reason being the limited flexibility while creating the Domain Join configuration profile in Intune which is only allows a prefix followed by a random set of characters.

image.png

 

Product group is aware of this challenge and plans to make this more flexible in the near future.

 

Workaround

As an interim measure, you can leverage on-premises solution like ConfigMgr to change the computer name.

An assumption to this workaround is you have already pushed the ConfigMgr agent on the target device. For guidance refer this post: https://blogs.technet.microsoft.com/arnabm/2018/10/14/deploy-ccmsetup-exe-via-intune/

 

In this post I am showcasing the power of ConfigMgr Task Sequence to change the computer name.

  1. From the ConfigMgr console create a new custom task sequence.

image.png

 
  1. Give a Name and don’t need to choose any Boot Image

image.png

 
  1. Click Next to finish the Wizard.
  2. Edit the Task Sequence to add steps for customizations
  3. Click Add > General > Run PowerShell script

image.png

 

 

 

  1. Choose the radio option Enter a PowerShell script and click Add script

image.png

 
  1. Enter your PowerShell script to rename the Computer Account meeting company requirements.

 

In this example I am using a PowerShell script to change the computer name to its serial number. This is one of the most common asks. There are many references you can find from the Scripting Gallery, for this specific post I am referencing: https://gallery.technet.microsoft.com/Computer-Rename-to-Serial-1f31b580

 

[reflection.assembly]::loadwithpartialname("microsoft.visualbasic")

$serial = Get-WmiObject win32_bios | select -expand serialnumber

$ready = $serial -replace " ", ""

$number = [Microsoft.VisualBasic.Information]::isnumeric($ready)

If ($number -eq $True) {

$name = "UMS" + $ready.substring(0, [System.Math]::Min(12, $ready.length))

}

Elseif ($number -eq $False) {

$name = $ready.substring(0, [System.Math]::Min(15, $ready.length))

}

(Get-WmiObject Win32_ComputerSystem).Rename($name)

              

The sample script provided here is not supported under any Microsoft standard support program or service. All scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.

 

  1. Click OK to save your changes.
  2. Check the box Run this step as the following account
  3. Click the Set button to select an account with
    1. Rights to update Computer Account in Active Directory.
    2. Local admin on the machine.

image.png

 
  1. Add another Step to restart computer.
  2. Click Add > General > Restart Computer

image.png

 
  1. Set the option after restart to The currently installed default operating system and customize message as desired. Additionally you can also change the timeout seconds.

image.png

 
  1. Click OK to save

 

Your task sequence is now ready to be deployed to a Device Collection. To keep the things Dynamic, I created a dynamic Device Collection which is matching the Name-Prefix of my Hybrid Join Configuration Profile.

image.png

 

 

Once the device is renamed, AAD Connect will synchronize the new name in Azure AD and will be reflected in Intune and Azure portals.

 

There are many other ways to rename the computer without using ConfigMgr, I personally found this most secure without exposing any credentials.

 

 

 

 

Thanks,

Arnab Mitra