none
关于sccm osd任务序列生成应答文件本地管理员密码 加密密码和解密方式 RRS feed

  • Question

  • <?xml version="1.0"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
    	<cpi:offlineImage cpi:source="wim:f:/install.wim#Windows 10 Pro Technical Preview" xmlns:cpi="urn:schemas-microsoft-com:cpi"/>
    	<settings xmlns="urn:schemas-microsoft-com:unattend" pass="oobeSystem"><component name="Microsoft-Windows-International-Core" language="neutral" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    			<SystemLocale>zh-CN</SystemLocale>
    		</component>
    		<component name="Microsoft-Windows-Shell-Setup" language="neutral" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    			<OOBE>
    				<SkipUserOOBE>false</SkipUserOOBE>
    				<NetworkLocation>Work</NetworkLocation>
    				<ProtectYourPC>1</ProtectYourPC>
    				<SkipMachineOOBE>true</SkipMachineOOBE>
    				<HideEULAPage>true</HideEULAPage>
    			</OOBE>
    			<TimeZone>China Standard Time</TimeZone>
    			<RegisteredOrganization>testsccm</RegisteredOrganization>
    			<UserAccounts>
    				<AdministratorPassword>
    					<Value>cwB6AHQAbAB5AHkAQAA4AEEAZABtAGkAbgBpAHMAdAByAGEAdABvAHIAUABhAHMAcwB3AG8AcgBkAAAA</Value>
    					<PlainText>false</PlainText>
    				</AdministratorPassword>
    			</UserAccounts>
    
    			<RegisteredOwner>testsccm2103</RegisteredOwner>
    		</component>
    	</settings><settings xmlns="urn:schemas-microsoft-com:unattend" pass="specialize"><component name="Microsoft-Windows-UnattendedJoin" language="neutral" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    			<Identification>
    				<JoinWorkgroup>WORKGROUP</JoinWorkgroup>
    			</Identification>
    		</component>
    		<component name="Microsoft-Windows-Security-SPP-UX" language="neutral" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    			<SkipAutoActivation>true</SkipAutoActivation>
    		</component>
    		<component name="Microsoft-Windows-Shell-Setup" language="neutral" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    			<TimeZone>China Standard Time</TimeZone>
    			<ComputerName>HY-857223699396</ComputerName>
    			<ProductKey>NPPR9-FWDCX-D2C8J-H872K-2YT43</ProductKey>
    		</component>
    		<component name="Microsoft-Windows-Deployment" language="neutral" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    			<RunSynchronous>
    				<RunSynchronousCommand><Order>1</Order>
    					<Description>disable user account page</Description>
    					<Path>reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\OOBE /v UnattendCreatedUser /t REG_DWORD /d 1 /f</Path>
    				</RunSynchronousCommand>
    			</RunSynchronous>
    		</component>
    	</settings><settings xmlns="urn:schemas-microsoft-com:unattend" pass="windowsPE"><component name="Microsoft-Windows-Setup" language="neutral" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    			<ImageInstall>
    				<OSImage>
    					<InstallToAvailablePartition>false</InstallToAvailablePartition>
    					<WillShowUI>OnError</WillShowUI>
    				</OSImage>
    			</ImageInstall>
    		</component>
    	</settings></unattend>

    要用powershell 如何去生成这个SCCM 任务序列的本地管理员密码加密解密方式呀  ,和adk应答文件加密的方式不一样呀

    $UnEncodedText = 'test@8Password'

    $EncodedText =[Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($UnEncodedText))

    write-host "Encoded_String_is:" $EncodedText


    Thursday, September 30, 2021 2:58 AM

Answers

  • 你好,

    我把上面的Base64,转换出来跟你给的$UnEncodedText 不一样。

    https://www.base64decode.org/

    我用解码出来的再转换就是一样的。


    本帖子以”现状”提供且没有任何担保,同时也没有授予任何权利。 如果您的问题得到解答,请在登录后将此回复标记为“答案”,非常感谢您的支持。

    • Marked as answer by 萝卜の Sunday, October 3, 2021 2:45 AM
    Friday, October 1, 2021 1:41 AM
    Moderator

All replies

  • 你好,

    我把上面的Base64,转换出来跟你给的$UnEncodedText 不一样。

    https://www.base64decode.org/

    我用解码出来的再转换就是一样的。


    本帖子以”现状”提供且没有任何担保,同时也没有授予任何权利。 如果您的问题得到解答,请在登录后将此回复标记为“答案”,非常感谢您的支持。

    • Marked as answer by 萝卜の Sunday, October 3, 2021 2:45 AM
    Friday, October 1, 2021 1:41 AM
    Moderator
  • 非常感谢,这下明白了,我只是举个例子,两者并不是同密码加密。 

    我没想到用sccm osd生成的加密串拿去解密  - -#,  原来sccm osd任务序列加密是 多了AdministratorPassword,而用 adk配置应答文件加密是用Password。  

    用 adk配置工具生成密码 带有Password,例如密码是123456 则解密是123456Password

    用sccm osd 任务序列生成的密码,则是带有AdministratorPassword。例如密码是123456 则解密是 123456AdministratorPassword




    • Edited by 萝卜の Sunday, October 3, 2021 2:52 AM
    Sunday, October 3, 2021 2:45 AM
  • 感谢分享。

    本帖子以”现状”提供且没有任何担保,同时也没有授予任何权利。 如果您的问题得到解答,请在登录后将此回复标记为“答案”,非常感谢您的支持。

    Monday, October 11, 2021 7:36 AM
    Moderator