Skip to content

active directory

Simple PowerShell Account Creation script

Recently I was inspired by the excellent Master User Creator, which we cannot use, and I had some free time, so I decided to create something simple, but still useful for my service desk guys. I ended with following script – combination of PowerShell , Mahapps and XAML. Script requires PowerShell 7, installed RSAT tools needed as well.tested on Windows 10 v20H2 and 21H2. It doesn’t work on Windows 10 v1909. I am assuming it won’t work on lower version as well.  To make it work for you change the followoing lines: Line 179 and Line 180 – Change to Correct OU Path Line 215 – your own filters what to be excluded Of course… Read More »Simple PowerShell Account Creation script

Install Primary and Additional Domain Controller With PowerShell Cheat Sheet

# # Windows PowerShell script for AD DS Deployment #Do no forget to rename the computer, set static IP, enable remote desktop if needed and so on # Install-WindowsFeature AD-Domain-Services Install-ADDSForest ` -CreateDnsDelegation:$false ` -DatabasePath “C:\Windows\NTDS” ` -DomainMode “Win2012” ` -DomainName “” ` -DomainNetbiosName “DOMAIN” ` -ForestMode “Win2012” ` -InstallDns:$true ` -LogPath “C:\Windows\NTDS” ` -NoRebootOnCompletion:$false ` -SysvolPath “C:\Windows\SYSVOL” ` -Force:$true #Add Secondary DC # # Do not forget to rename the computer first Rename-Computer -NewName whatever #Set Static IP and DNS #Could be done with interface index as well #get-wmiobject win32_networkadapter | select netconnectionid, name, InterfaceIndex, netconnectionstatus #netconnection status 2 gives us only connected adapters 🙂 New-NetIPAddress -InterfaceAlias Ethernet -IPAddress YOURSERVERIP  -DefaultGateway GATEWAYIP -AddressFamily IPv4… Read More »Install Primary and Additional Domain Controller With PowerShell Cheat Sheet