Skip to content
Snippets Groups Projects
Commit b657e5f7 authored by Marius Raes's avatar Marius Raes
Browse files

rdp member

parent 7cff7cd9
No related branches found
No related tags found
No related merge requests found
#ps1_sysnative
Start-Sleep -s 600
echo custom-script
if( !(Test-Path -Path "C:\flag.txt")) {
New-Item -Path "C:\flag.txt"
echo "if"
get-executionpolicy
Set-ExecutionPolicy RemoteSigned -Force
......@@ -24,8 +26,7 @@ do {
try {
Add-Computer -DomainName $dc -Credential $creds -ErrorAction Stop
echo "`n`n DOMAIN JOIN SUCCEEDED`n`n"
<RDPMembers>
exit 1001
exit 1003
} catch {
$joined = $false
......@@ -33,4 +34,10 @@ do {
echo "`n`n DOMAIN JOIN FAILED RETRYING IN 1 MINUTE `n`n"
Start-Sleep -s 60
}
} while ((-Not $joined) -And ($i -lt 10))
\ No newline at end of file
} while ((-Not $joined) -And ($i -lt 25))
}else {
echo "else"
<RDPMembers> # Adds users to the rdp member group
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment