mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 19:32:31 +00:00 
			
		
		
		
	git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16084 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
		
			
				
	
	
		
			16 lines
		
	
	
		
			912 B
		
	
	
	
		
			PowerShell
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			912 B
		
	
	
	
		
			PowerShell
		
	
	
	
	
	
| $command=@{'command'='nextdestiny'}
 | |
| if (!(Test-Path HKLM:\Software\Policies\Microsoft\SystemCertificates\AuthRoot)) {
 | |
| 	mkdir HKLM:\Software\Policies\Microsoft\SystemCertificates\AuthRoot
 | |
| 	Set-ItemProperty HKLM:\Software\Policies\Microsoft\SystemCertificates\AuthRoot DisableRootAutoUpdate 1
 | |
| }
 | |
| if (!(Test-Path HKLM:\Software\xCAT)) {
 | |
|         mkdir HKLM:\Software\xCAT
 | |
| 	$certstore = New-Object System.Security.Cryptography.X509Certificates.X509Store("xCAT","LocalMachine")
 | |
| 	$certstore.Open([System.Security.Cryptography.X509Certificates.OpenFlags]'Readwrite')
 | |
| 	$cacert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("$env:instdrv\xcat\ca.pem")
 | |
| 	Set-ItemProperty HKLM:\Software\xCAT cacertthumb $cacert.thumbprint
 | |
| 	Set-ItemProperty HKLM:\Software\xCAT serveraddress $env:master
 | |
| 	Set-ItemProperty HKLM:\Software\xCAT servername $env:mastername
 | |
| }
 | |
| Send-xCATCommand $command
 |