PowerShell Tip – How to install Windows Server roles and features and see parent / child relations as results?

It is very simple… Install-WindowsFeature -Name AD-Domain-Services, DNS -IncludeManagementTools -OutVariable result -Verbose Get-WindowsFeature -Name $result.FeatureResult.Name Note: GUIs are not recommended for the server. Install only AD-Domain-Services, DNS and RSAT-AD-PowerShell on your Windows Server Core and RSAT on your management server. Display Name Name Install State ———— —- ————- [X] Active Directory Domain Services AD-Domain-Services Installed [X] […]

PowerShell Tip – How to remove AD OU and all child objects (another OUs, users, groups, computers)?

How to remove Active Directory Organizational Unit with all child objects (another OUs, users, groups, computers)? It is simple. The trick is to use Remove-ADObject -Recursive. Get-ADOrganizationalUnit -Identity ‘OU=ToDelete,DC=ad,DC=fabrikam,DC=com’ | Set-ADOrganizationalUnit -ProtectedFromAccidentalDeletion:$false -PassThru | Remove-ADObject -Recursive -Confirm:$false

How to manage and configure BitLocker Drive Encryption – Group Policy and backup and restore to and from Active Directory

It is very simple to configure automatic backup of a recovery password in pure server environment. If you have clients then you will probably want to configure self-service portal to get recovery passwords (or at least delegation for Service Desk) but in server environment it is usually enough to use default configuration that only Domain […]