@@ -196,16 +196,18 @@ if (!($Session -eq "NOT_SUPPORTED")) {
196
196
Copy-Item - ToSession $Session ./ artifacts - Destination " $RemoteDir /artifacts" - Recurse
197
197
Copy-Item - ToSession $Session ./ scripts - Destination " $RemoteDir /scripts" - Recurse
198
198
Copy-Item - ToSession $Session ./ src/ manifest/ MsQuic.wprp - Destination " $RemoteDir /scripts"
199
+ }
199
200
200
- # Create the logs directories on both machines.
201
- New-Item - ItemType Directory - Path ./ artifacts/ logs | Out-Null
201
+ # Create the logs directories on both machines.
202
+ New-Item - ItemType Directory - Path ./ artifacts/ logs | Out-Null
203
+ if ($Session -ne " NOT_SUPPORTED" ) {
202
204
Invoke-Command - Session $Session - ScriptBlock {
203
205
New-Item - ItemType Directory - Path $Using :RemoteDir / artifacts/ logs | Out-Null
204
206
}
205
207
}
206
208
207
209
# Collect some info about machine state.
208
- if (! $NoLogs -and $isWindows -and ! ( $Session -eq " NOT_SUPPORTED " ) ) {
210
+ if (! $NoLogs -and $isWindows ) {
209
211
$Arguments = " -SkipNetsh"
210
212
if (Get-Help Get-NetView - Parameter SkipWindowsRegistry - ErrorAction Ignore) {
211
213
$Arguments += " -SkipWindowsRegistry"
@@ -224,18 +226,20 @@ if (!$NoLogs -and $isWindows -and !($Session -eq "NOT_SUPPORTED")) {
224
226
} catch { Write-Host $_ }
225
227
Write-Host " ::endgroup::"
226
228
227
- Write-Host " ::group::Collecting information on peer machine state"
228
- try {
229
- Invoke-Command - Session $Session - ScriptBlock {
230
- Invoke-Expression " Get-NetView -OutputDirectory $Using :RemoteDir /artifacts/logs $Using :Arguments "
231
- Remove-Item $Using :RemoteDir / artifacts/ logs/ msdbg.$env: COMPUTERNAME - recurse
232
- $filePath = (Get-ChildItem - Path $Using :RemoteDir / artifacts/ logs/ - Recurse - Filter msdbg.$env: COMPUTERNAME * .zip)[0 ].FullName
233
- Rename-Item $filePath " get-netview.peer.zip"
234
- }
235
- Copy-Item - FromSession $Session - Path " $RemoteDir /artifacts/logs/get-netview.peer.zip" - Destination ./ artifacts/ logs/
236
- Write-Host " Generated get-netview.peer.zip"
237
- } catch { Write-Host $_ }
238
- Write-Host " ::endgroup::"
229
+ if ($Session -ne " NOT_SUPPORTED" ) {
230
+ Write-Host " ::group::Collecting information on peer machine state"
231
+ try {
232
+ Invoke-Command - Session $Session - ScriptBlock {
233
+ Invoke-Expression " Get-NetView -OutputDirectory $Using :RemoteDir /artifacts/logs $Using :Arguments "
234
+ Remove-Item $Using :RemoteDir / artifacts/ logs/ msdbg.$env: COMPUTERNAME - recurse
235
+ $filePath = (Get-ChildItem - Path $Using :RemoteDir / artifacts/ logs/ - Recurse - Filter msdbg.$env: COMPUTERNAME * .zip)[0 ].FullName
236
+ Rename-Item $filePath " get-netview.peer.zip"
237
+ }
238
+ Copy-Item - FromSession $Session - Path " $RemoteDir /artifacts/logs/get-netview.peer.zip" - Destination ./ artifacts/ logs/
239
+ Write-Host " Generated get-netview.peer.zip"
240
+ } catch { Write-Host $_ }
241
+ Write-Host " ::endgroup::"
242
+ }
239
243
}
240
244
241
245
$json = @ {}
0 commit comments