xSafeHarbor Module – PowerShell Desired State Configuration Resource Kit

This module contains configurations that show end-to-end deployment of the safe harbor example

 
 
 
 
 
(0)
4,749 times
Add to favorites
Servers
8/7/2015
E-mail Twitter del.icio.us Digg Facebook
  • example of CliXML files
    3 Posts | Last post July 30, 2014
    • There is a lot of credential management such as:
      
      $DHCPAdmin         = "DHCPServer\Administrator"
          $DHCPAdminFile     = "$clixmlLocation\DHCPSrvCred.CliXml"
      
      But there is no example of the xml format of these files. Can you add one please?
    • Hi,
      
      We are using standard serialization format of PSCredential, this is one of the example for 'Corporate\DeptHead' SafeHarbor user.
      
          <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04">
            <Obj RefId="0">
              <TN RefId="0">
                <T>System.Management.Automation.PSCredential</T>
                <T>System.Object</T>
              </TN>
              <ToString>System.Management.Automation.PSCredential</ToString>
              <Props>
                <S N="UserName">Corporate\DeptHead</S>
                <SS N="Password">01000000d08c9ddf0115d1118c7a00c04fc297eb010000005b63efe0c8e4a845be7209ec3af568710000000002000000000003660000c000000010000000d08e4ef921b6e90aa42129c95ec9586d0000000004800000a0000000100000009d7557b73ad4a92919f11eb1ad863b09180000009d3cb6c9064e40f3130f09482973e5f8f6908a8fada168aa14000000ab04695994f14dfb2f1c1c3793bee742c93d6eb7</SS>
              </Props>
            </Obj>
          </Objs>
      
      Thanks,
      MSFT
    • You can also run following script to generate SafeHarbor credential files and see the details – 
      
      PS C:\SafeHarbor> Import-Module .\SafeHarborHelper.psm1 
      PS C:\SafeHarbor> $shUserCreds = @()
             $shUserCreds += New-Object System.Management.Automation.PSCredential ('Corporate\Administrator',  (ConvertTo-SecureString 'yourPassword' -AsPlainText -Force))
             $shUserCreds += New-Object System.Management.Automation.PSCredential ('Corporate\User1',          (ConvertTo-SecureString 'yourPassword' -AsPlainText -Force))
             $shUserCreds += New-Object System.Management.Automation.PSCredential ('Corporate\Papa',           (ConvertTo-SecureString 'yourPassword' -AsPlainText -Force))
             $shUserCreds += New-Object System.Management.Automation.PSCredential ('Corporate\DeptHead',       (ConvertTo-SecureString 'yourPassword' -AsPlainText -Force))
             $shUserCreds += New-Object System.Management.Automation.PSCredential ('Safeharbor\Administrator', (ConvertTo-SecureString 'yourPassword' -AsPlainText -Force))
             $shUserCreds += New-Object System.Management.Automation.PSCredential ('Safeharbor\Mata',          (ConvertTo-SecureString 'yourPassword' -AsPlainText -Force))
             $shUserCreds += New-Object System.Management.Automation.PSCredential ('DHCPServer\Administrator', (ConvertTo-SecureString 'yourPassword' -AsPlainText -Force))
      PS C:\SafeHarbor> Set-SafeHarborUserCreds -Credentials $shUserCreds 
      	
      This will generate clixml files for SafeHarbor users on ‘.\SafeHarbor\ConfigurationData\VMData’ location.