зеркало из https://github.com/microsoft/MSLab.git
trusted hosts change
This commit is contained in:
Родитель
6a9c3ea1bf
Коммит
54c35c0e68
|
@ -288,10 +288,11 @@ $Content | Out-File -FilePath d:\config.json
|
|||
#enable v4 and v6 ping on both domain and private/public profiles
|
||||
Enable-NetFirewallRule -Name FPS-ICMP4-ERQ-In,FPS-ICMP6-ERQ-In
|
||||
}
|
||||
#add IPs to trusted hosts (bug that in BareMetal.psm1 is invoke-command with IP that is not in trusted hosts)
|
||||
$IPs=@()
|
||||
foreach ($Server in $Servers){$IPs+=(Resolve-DnsName -Name $Server -Type A).IPAddress}
|
||||
Set-Item WSMan:\localhost\Client\TrustedHosts -Value $($IPs -join ',') -Force
|
||||
#add hostnames and IPs to trusted hosts (bug that in BareMetal.psm1 is invoke-command with IP that is not in trusted hosts)
|
||||
$TrustedHosts=@()
|
||||
$TrustedHosts+=(Get-NetIPAddress -CimSession $Servers -InterfaceAlias Ethernet* -AddressFamily IPv4).IPAddress
|
||||
$TrustedHosts+=$Servers
|
||||
Set-Item WSMan:\localhost\Client\TrustedHosts -Value $($TrustedHosts -join ',') -Force
|
||||
|
||||
#deploy
|
||||
.\Invoke-CloudDeployment -JSONFilePath D:\config.json -AzureStackLCMUserCredential $AzureStackLCMUserCredential -LocalAdminCredential $LocalAdminCred -RegistrationSPCredential $SPNCred -RegistrationCloudName $CloudName -RegistrationSubscriptionID $SubscriptionID
|
||||
|
|
Загрузка…
Ссылка в новой задаче