First published on TECHNET on Nov 06, 2017 **UPDATE: I have modified the script and provided better how to steps, follow these links How to... and Script download please keep reading on to understand how the script DSC_Generate_MOFFiles.ps1 works
We are basically done, DSC is configured and running on our Nodes as well as the Pull server all we have to do is generate the instructions and watch our farm get built.Â But first as a recap this is what we have done
Collect Service account passwords (Never hardcode them)
Create MOF Files for nodes to pull and apply
Looking at the script the first section of interest is where we collect the usernames for our service accounts, then we prompt you for the passwords and we get the passphrase for the farm which we hash and store in variables.
NOTE: I suggest you write your passwords in a text file and copy them in to insure you have the correct passwords. $setupAccountName = $data.NonNodeData.SharePoint.ServiceAccounts.SetupAccount $farmAccountName = $data.NonNodeData.SharePoint.ServiceAccounts.FarmAccount $webAppAccountName = $data.NonNodeData.SharePoint.ServiceAccounts.WebAppPoolAccount $svcAppAccountName = $data.NonNodeData.SharePoint.ServiceAccounts.ServicesAppPoolAccount $srcContentAccessAccount = $data.NonNodeData.SharePoint.ServiceAccounts.ContentAccessAccount $ConnectAccounts = $data.NonNodeData.SharePoint.ServiceAccounts.ConnectionAccount Write-Host "Getting Service Account Credentials" -ForegroundColor Green