Quick way to stand up a lab domain controller

The following is a quick way to stand up a domain controller.
I use this to create lab environments.

Rename-Computer DC1
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
import-Module ADDSDeployment
$param = @{'CreateDnsDelegation'=$false;
           'DatabasePath'="C:\Windows\NTDS";
           'DomainName'='company.pri';
           'DomainNetbiosName'='company';
           'forestmode'='win2012r2';
           'installdns'=$true;
           'logpath'="C:\Windows\NTDS";
           'NoRebootOnCompletion'=$true;
           'confirm'=$false
          }

Install-ADDSForest @param -SafeModeAdministratorPassword (convertTo-SecureString -AsPlainText "P@ssw0rd" -Force )
Restart-computer