Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit 0e5b5fd

Browse files
committed
Updated ScriptExecutionValidation
1 parent 9e775af commit 0e5b5fd

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

.build.ps1

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,20 +108,14 @@ task ValidateRemoteScriptExecution {
108108
$i = 1
109109
Write-Verbose -Message "$($Config.virtualMachines[$i].mountName) testing script execution, attempt '$i'..." -Verbose
110110
$splat = @{
111-
ScriptText = '$SplatNewIP = @{
112-
IPAddress = $Config.virtualMachines[$i].testIp
113-
PrefixLength = $Config.virtualMachines[$i].testSubnet
114-
DefaultGateway = $Config.virtualMachines[$i].testGateway
115-
ErrorAction = "SilentlyContinue"
116-
}
117-
Get-NetAdapter | where {($_.MacAddress).ToLower() -eq "{0}"
118-
New-NetIPAddress @SplatNewIP' -f $TestInterfaceMAC
111+
ScriptText = 'hostname'
119112
ScriptType = 'PowerShell'
120113
VM = $Config.virtualMachines[$i].mountName
121114
GuestCredential = $GuestCredential
122115
}
123116
try {
124117
$VMScript_return = Invoke-VMScript @splat -ErrorAction Stop
118+
Write-Verbose -Message "ValidateRemoteScriptExecution returned '$VMScript_return'"
125119
break
126120
} catch { }
127121

0 commit comments

Comments
 (0)