File tree 2 files changed +25
-1
lines changed
2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,16 @@ Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
124
124
.\setup-runner-windows.ps1 -Username $username -Password $password -PeerIp $machine1 -NewIpAddress $machine2 -RunnerLabels $labels
125
125
```
126
126
127
+ ### Final Sanity Check
128
+ ``` PowerShell
129
+ ping 'netperf-peer'
130
+ $username = (Get-ItemProperty 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon').DefaultUserName
131
+ $password = (Get-ItemProperty 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon').DefaultPassword | ConvertTo-SecureString -AsPlainText -Force
132
+ $cred = New-Object System.Management.Automation.PSCredential ($username, $password)
133
+ $Session = New-PSSession -ComputerName 'netperf-peer' -Credential $cred -ConfigurationName PowerShell.7
134
+ # Make sure no errors in running any of these commands on the client machine
135
+ ```
136
+
127
137
## Linux Azure Configuration (Deprecated in favor of 1ES)
128
138
129
139
``` Shell
Original file line number Diff line number Diff line change @@ -18,7 +18,10 @@ param (
18
18
[string ]$RunnerLabels = " " ,
19
19
20
20
[Parameter (Mandatory = $false )]
21
- [switch ]$SetupRemotePowershell
21
+ [switch ]$SetupRemotePowershell ,
22
+
23
+ [Parameter (Mandatory = $false )]
24
+ [switch ]$SanityCheck
22
25
)
23
26
24
27
Set-StrictMode - Version ' Latest'
@@ -91,3 +94,14 @@ if ($NewIpAddress) {
91
94
} else {
92
95
Write-Host " -NewIpAddress not provided. Skipping IP address setup."
93
96
}
97
+
98
+ if ($SanityCheck ) {
99
+ $username = (Get-ItemProperty ' HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon' ).DefaultUserName
100
+ $password = (Get-ItemProperty ' HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon' ).DefaultPassword | ConvertTo-SecureString - AsPlainText - Force
101
+ $cred = New-Object System.Management.Automation.PSCredential ($username , $password )
102
+ $Session = New-PSSession - ComputerName ' netperf-peer' - Credential $cred - ConfigurationName PowerShell.7
103
+ # Make sure no errors in running any of these commands on the client machine
104
+ $Session
105
+ } else {
106
+ Write-Host " -SanityCheck not set. Skipping sanity check."
107
+ }
You can’t perform that action at this time.
0 commit comments