Category : Windows

Using Powershell with Active Directory Hint: Enable View > Advanced Features in the AD GUI to view all the properties a user has. Import the AD Module Import-Module ActiveDirectory Add a new AD User #New-ADUser -Name “<Full Name>” -GivenName “<Firstname>” -Surname “<Lastname>” -SamAccountName “<shortname>” -UserPrincipalName “<email@address.tld>” -Path “OU=Administration,OU=Staff,OU=STARWARS,DC=starwars,DC=com” -AccountPassword(ConvertTo-SecureString “<Password>” -AsPlainText -force) -Enabled $true New-ADUser ..

Read more

Functions Define a function function myFunction { param( #define parameters $MyParameter ) # Do some stuff Write-Host “You set MyParameter to” $MyParameter } myFunction -MyParameter 10 Note: above function prints ‘You set MyParameter to 10’ Cmdlet Bindings If the required parameter is not set when calling, the function will might fail. You can avoid this ..

Read more

Conditions Terrinaries -eq Equal To -ne Not Equal To -le Less than or Equal To -lt Less than -ge Greater than or Equal To -gt Greater than Boolians -and And: ($x -eq $y -and $i -ne $j) -or Or: ($x -eq $y -or $i -ne $j) -xor: ($x -eq $y -xor $i -ne $j) -not ..

Read more

Powershell Variables Variables Variable Objects All variables are Objects   Variable declaration: $VarName Note: These are NOT case sensitive! $MyVar is the same as $myvar Static variables (aka read-only constants): $true (True, 1) $false (False, 0) Note: You cannot assign variable to to True or False. Use their variable names. Get Variable type Note: Here ..

Read more

Run all commands in Powershell as Admin. Firewall Configuration Enable ICMP Windows Defender Firewall > Advanced Settings > Inbound Rules (Left) > New Rule… (Right) > “New Inbound Rules Wizard – Rule Type” ( * ) Custom [ Next > ] “New Inbound Rules Wizard – Program” ( * ) All programs [ Next > ..

Read more

< 8 How to use Powershell with Active Directory | Home | 10 Conclusion > 42: Creating an Active Directory System State Backup https://www.udemy.com/course/active-directory-group-policy-2012/learn/lecture/19369012#content Configuring Windows Backups Server Manager > Windows Server Backup If missing, install via Server Manager > Manage > Add Roles and features This should have a dedicated drive / Network share ..

Read more

Home Active Directory Authenticated Users This is a pre-defined group and includes anyone or thing that is able to authenticate against the domain. User Accounts Computer Accounts Printer Accounts etc   Roaming Profiles Overview A Roaming Profile is a user that is able to log into any number of different workstations connected to their domain ..

Read more

< 7 Securing your Domain | Home | 9 Active Directory Backups > 34: Enabling Script Execution for Powershell https://www.udemy.com/course/active-directory-group-policy-2012/learn/lecture/8301955#content Issue: Run a script in Powershell and save it can cause an error. Start > Powershell ISE (Editor?) > Click dropdown to open editor pane. echo “Hello, World!” > Run Script (Play icon) File > ..

Read more

< Manage Your Workstations | Home | 8 How to use Powershell with AD > 30: Configuring Domain Password and Account Lockout Policies with GP https://www.udemy.com/course/active-directory-group-policy-2012/learn/lecture/8419616#content Know that a Password Policy already exists in the ‘Default Domain Policy’ GPM > … > domain.tld > Default Domain Policy [RtClk] > Edit Computer Configs > Policies > ..

Read more