This repository was archived by the owner on Nov 15, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -26,17 +26,27 @@ Write-Host -ForegroundColor Green -Object @"
26
26
Pause
27
27
28
28
29
- # For remoting commands to VM's - have the host set trustedhosts to *
29
+ # For remoting commands to VM's - have the host set trustedhosts
30
30
31
- Write-Host - ForegroundColor Cyan - Object " Setting TrustedHosts to * so that remoting commands to VM's work properly"
32
- $trust = Get-Item - Path WSMan:\localhost\Client\TrustedHosts
31
+ Write-Host - ForegroundColor Cyan - Object " Setting TrustedHosts so that remoting commands to VMs work properly"
32
+ $trust = Get-Item - Path WSMan:\localhost\Client\TrustedHosts
33
+ if ($Trust.Value -eq " *" ) {
34
+ Write-Host - ForegroundColor Green - Object " TrustHosts is already set to *. No changes needed"
35
+ }
36
+ else {
37
+ $add = ' DC,S*,Client*,192.168.3.'
38
+ Write-Host - ForegroundColor Cyan - Object " Adding $add to TrustedHosts"
39
+ Set-Item - Path WSMan:\localhost\Client\TrustedHosts - Value $add - Concatenate - force
40
+ }
41
+ <#
33
42
If ($trust.value -eq "" -or $trust.value -eq "*"){
34
43
Set-Item -Path WSMan:\localhost\Client\TrustedHosts -Value * -Force
35
44
} Else {
36
45
Write-Warning "Your system is not a default installation -- "
37
46
Write-Warning "Your trustedhosts has a value $($trust.Value)"
38
47
break
39
48
}
49
+ #>
40
50
41
51
# Lability install
42
52
Write-Host - ForegroundColor Cyan " Installing Lability for the lab build"
You can’t perform that action at this time.
0 commit comments