Performs basic tests for the built node.
Automate This
Use the Attune GUI for your Scripts
You've automated: Perform Test Win Node
Get the most out of automation with our get started videos, product demonstrations, and more.
The following steps will guide you through the manual process.
Tests a simple echo.
Connect via RDP:
mstsc /admin /v:{newoswindowsnode}
Login as user {newoswindowsuseradministrator} and open a command prompt.
Execute the following script:
Write-Host "hi"
$env:COMPUTERNAME has a 15 character limit.
HostName.exe does not.
Execute the following script:
if (-Not (HostName | `
findstr /I "{newOsWindowsNode.hostname}")) {
Write-Host "Hostname $(HostName) should be {newOsWindowsNode.hostname}."
exit 1
} else {
Write-Host "Hostname $(HostName) is correct."
}
Tests if IP address is set correctly.
Execute the following script:
if (-Not (ipconfig | `
findstr "IPv4 Address" | `
findstr "{newOsWindowsNode.ip}")) {
Write-Host "Wrong IP Address."
exit 1
} else {
Write-Host "IP address {newOsWindowsNode.ip} is correct."
}
Test basic push files functionality.
Test file for testing push files.
Copy the File(s) Test_File.tar to the target node.
Extract and deploy the File(s) here:
/c$/software
Deletes the pushed file. This implicitly tests if the file was pushed successfully.
Connect via RDP:
mstsc /admin /v:{newoswindowsnode}
Login as user {newoswindowsuseradministrator} and open a command prompt.
Execute the following script:
Set-Location -Path C:\software
$FILE = "test.txt"
if (-Not (Test-Path "$FILE" -PathType Leaf)) {
Write-Host "File was not transferred."
exit 1
} else {
Remove-Item $FILE
}
Tests basic ping test.
Execute the following script:
ping -n 1 "{newOsNodeSubnet.gateway}"
if (-Not $?) {
Write-Host "Can't ping Gateway {newOsNodeSubnet.gateway}. No network"
exit 1
}
Tests if the correct version of the Windows operating system was installed.
Execute the following script:
$SEARCH_STRING = "{kickstartedOperatingSystemName}"
if ((systeminfo | select-string -pattern $SEARCH_STRING) -eq $null) {
Write-Host "This is not $SEARCH_STRING"
exit 1
} else {
Write-Host "This is $SEARCH_STRING"
}
Tests if the correct boot configuration was set.
More information at https://stackoverflow.com/questions/65314573/how-to-check-device-boot-mode-uefi-or-legacy.
Execute the following script:
$SEARCH_STRING = "path.*efi"
if (${{kickstartedBootLoaderIsBios}}) {
$BootMode = bcdedit | findstr "$SEARCH_STRING"
if (-Not ($null -eq $BootMode)) {
Write-Host "This looks like UEFI boot."
exit 1
} else {
Write-Host "This looks like BIOS boot."
}
} elseif (${{kickstartedBootLoaderIsUefi}}) {
$BootMode = bcdedit | findstr "$SEARCH_STRING"
if ($null -eq $BootMode) {
Write-Host "This looks like BIOS boot."
exit 1
} else {
Write-Host "This looks like UEFI boot."
}
}
You have completed this instruction.
Join our Discord channel and connect with like-minded individuals who share your passion. Engage in lively discussions, gain valuable insights, and stay updated on the latest trends in our industry. Don't miss out on this opportunity to network, learn, and grow together.
Click the link below and become a part of our vibrant community on Discord today!