Automatically building a Microsoft BI machine using PowerShell – Password policy (post #8)
This post is #8 in the series to automatically build a Microsoft BI machine using PowerShell – see the start of series.
In this series so far:
Start of series – introduction and layout of subjects
Post #2 – Preparation: install files using Azure disk
Post #3 – Preparation: install files using Azure File Service
Post #4 –Preparation: logging infrastructure
Post #5 – Master script
Post #6 – Disabling Internet Explorer Enhanced Security Configuration
Post #7 – Active Directory setup
In this step we will configure a very permissive password policy. This of course requires that the previous step (setting up Active Directory) has successfully completed. The password policy set using this script is only suitable for demo environments since it is very, very (did I say very?) permissive; it sets a minimal password length of 0, does not record any history of passwords (you can re-use your password again and again), passwords never expire and do not have to follow complexity rules. So, even an empty password is allowed (although not recommended since your Windows services will then not start). However, having ‘1234’ as password would work perfectly under this policy (and no, this is not the password I use for my demo machines).
Function ConfigurePasswordPolicy { Param( [Parameter(Mandatory=$true,HelpMessage="Domain name required, please specify in format yyy.zzz")] [ValidateNotNullOrEmpty()] $DomainName ) Write-Log -Verbose "Step 3: Configure Password Policy" try { Set-ADDefaultDomainPasswordPolicy -Identity $DomainName -MinPasswordLength:0 -PasswordHistoryCount:0 -MaxPasswordAge:0 -MinPasswordAge:0 -ComplexityEnabled:$false Write-Log -Verbose "Password Policy Configured" if ($global:DoAllTasks) { Set-Restart-AndResume $global:script "5" } } catch { Write-Log -Verbose "Failed to configure Password Policy. Error: $_.Exception.Message" } }
Next step: installing System Center Endpoint protection
Share this:
- Click to share on LinkedIn (Opens in new window)
- Click to share on Facebook (Opens in new window)
- Click to share on Twitter (Opens in new window)
- Click to share on Skype (Opens in new window)
- Click to share on WhatsApp (Opens in new window)
- Click to share on Pocket (Opens in new window)
- Click to share on Tumblr (Opens in new window)
- Click to share on Pinterest (Opens in new window)
- Click to share on Telegram (Opens in new window)
- Click to share on Reddit (Opens in new window)
- Click to print (Opens in new window)
- Click to email this to a friend (Opens in new window)
Related
You May Also Like

Updated: Annual radio countdown Top 2000 in Power BI
January 3, 2019
Never forget to water the plants again: building a DIY automatic plant watering / irrigation system for <$5
November 12, 2020