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

elseif

parent 4ed5c1e8
No related branches found
No related tags found
No related merge requests found
......@@ -3,9 +3,9 @@ New-Item -Path "C:\test.txt"
echo "kjort" >> C:\test.txt
if( !(Test-Path -Path "C:\flag.txt")) {
if( !(Test-Path -Path "C:\flag1.txt")) {
echo "if"
New-Item -Path "C:\flag.txt"
New-Item -Path "C:\flag1.txt"
# Use self as DNS
Set-DNSClientServerAddress -InterfaceIndex (Get-NetAdapter).InterfaceIndex -ServerAddresses 127.0.0.1
#Install ADDS
......@@ -13,6 +13,13 @@ if( !(Test-Path -Path "C:\flag.txt")) {
# Set Administrator password
net user Administrator Rosetest1
Import-Module ADDSDeployment
exit 1003
}elseif(!(Test-Path -Path "C:\flag2.txt")){
echo "elseif"
New-Item -Path "C:\flag2.txt"
$secureSafeModePwd = ConvertTo-SecureString "Rosetest1" -AsPlainText -Force
# Setup domain
Install-ADDSForest -DomainName "rose.local" `
......@@ -20,6 +27,7 @@ if( !(Test-Path -Path "C:\flag.txt")) {
-SafeModeAdministratorPassword $secureSafeModePwd `
-InstallDns -NoRebootOnCompletion -force
exit 1003
}else {
echo "else"
New-Item -Path "C:\log.txt"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment