How to Use DSC to Disable UAC Completely From Windows Server 2012

Goal:  You want to use DSC to disable UAC (User Account Control) completely.
Scenario:  You are using PowerShell version 4 and Windows Server 2012.  (The solution may work for different versions.)
You tried to use the configuration found here:

“Configuration NeverNotifyAndDisableAll
{
    Import-DSCResource -Module MSFT_xSystemSecurity -Name xUac

    Node localhost
    {
        xUAC NeverNotifyAndDisableAll
       

 » Read more..

How to Create a New User With DSC

Goal: You are trying to use PowerShell’s DSC to create a new local user.
Problem:  An .mof file will not be created because the code will not compile.  You will get an error message like this when you try to run the .ps1 file.
“ConvertTo-MOFInstance: System.InvalidOperationException error processing property ‘Password’ OF TYPE ‘User’: Converting and storing an encrypted password as plaintext is allowed only if PSDscaAllowPlainTextPassword is set to True…

 » Read more..

How to Troubleshoot a Desired State Configuration Issue When Installing SQL Server

Goal:  You are trying to install SQL Server with DSC.  You run a .ps1 on a main DSC server.  You transfer the resulting .mof file to a Windows Server with DSC and the relevant modules for installing DSC.  The target server has the SQL Server installation media too.

Problem/Scenario: You get an error message immediately after running this command:
start-dscconfiguration SqlServerInstall -Wait -Install

“PowerShell provider MSFT_xSqlServerInstall failed to execute Set-TargetResource functionality with error message: SQL Server installation did not succeed.

 » Read more..

Troubleshooting DSC for Configuration Management (Problem and Solution)

Background:  DSC is a toolkit of PowerShell cmdlets that enable you to do configuration management.  It can allow you to do CM tasks with Windows and Linux machines (https://msdn.microsoft.com/en-us/powershell/dsc/LnxGettingStarted).

Problem/Scenario:  You are trying to use this PowerShell command (e.g., to test your Desired State Configuration tool):

Enter-PSSession -ComputerName goodServer -Credential jdoe

# where goodServer is a Windows server on the network and jdoe is a local user account on the goodServer machine.

 » Read more..

Ansible Managing Windows Servers

While as of right now, there is not a great way to install Ansible on Windows servers (because you have to install cygwin).  Ansible running on Linux can readily configure Windows servers and push files down to them.  There are some things to look out for when setting this up.  It is not overly documented on Ansible’s website.  Some documentation (on various websites) tells DevOps engineers (or the professional using Ansible) to use a windows.yml file in a group_vars directory. 

 » Read more..