One Way To Get Around The Error “Get-targetresource PS module does not implement the key property solution” in DSC

Goal:  Apply DSC configuration
Problem/scenario:   When you run the “start-dscconfiguration NameOfConfig -wait -verbose” (where NameOfConfig is the name of the configuration) from the folder that houses the subfolder with NameOfConfig, you get an error like this:  “Get-targetresource PS module does not implement the key property solution”
Solution:  Stop a specific process by running this command.
gps wmi* |? {$_.Modules.ModuleName -like ‘*DSC*’} | Stop-Process -Force
Re-run the “start-dscconfiguration NameOfConfig -wait -verbose” command.

[Sassy_Social_Share]

Problem and Solution: “New Simple Volume” is Greyed Out After Disk Was Added To Windows Server

Goal:  You want to create a new Disk Partition on Windows Server.
Problem:  You go to Server Manager -> Computer Management -> Storage -> Disk Management.  You right click a newly-added partition (in the graphical bar section that says “Unallocated”).  “New Simple Volume,” “New Spanned Volume,” and “New Striped Volume” are all grayed out.  
Solution:  Right click the “Disk X” (where X is the integer associated with the newly-added disk). 

DSC Problem and Solution: One Way To Possibly Solve a “Cannot invoke the SendConfigurationApply” Problem

Goal:  You want to use DSC to apply a configuration.
Problem scenario:  When you run the “start-dscconfiguration NameOfConfig -wait -verbose” (where NameOfConfig is the name of the configuration) from the folder that houses the subfolder with NameOfConfig, you get an error like this: “DSC error: Cannot invoke the SendConfigurationApply method.  The sendConfigurationApply method is in progress…”
Solution: Back up and delete the subfolder named NameOfConfig.  You want to delete the .mof files.

How Do You List Directories Traits without Traversing into Their Contents?

Problem Scenario
You want to find out the permissions, ownership and groups associated with various subdirectories in Linux. You do not want to display the lengthy contents of these directories. How do you use the ls command to show the attributes of the directories themselves and not the contents of the directories?

Solution
From a Linux command prompt, run this command:  ls -ld /parentdirectory/

For PowerShell to list files without traversing into their contents use either of these two commands:
dir
ls

How Do You Create a New User with DSC?

Problem scenario
You are using Windows Server 2019. You want to create a new local user. You don’t want the user to be a member of the local Administrators group (which allows remote logins). What do you do?

Solution

Prerequisites
i. Install DSC. If you need assistance, see this posting.
ii.a. Make sure the server has been added to its own TrustedHosts configuration settings.

How Do You Troubleshoot Desired State Configuration Problems where Actions Are Not Working or Software Is Not Installing?

Problem scenario

You run a Start-DscConfiguration command in PowerShell like this:

Start-DscConfiguration -Path . -Wait -Verbose

You get an error message that the installation failed. The message may say something like this:

Start-DscConfiguration : The computer name was not specified and the configuration directory does not have any configuration files.

CategoryInfo : NotSpecified … ArgumentException
FullyQualifiedErrorId : System.ArgumentException, Microsoft.PowerShell.DesiredStateConfiguration.Commands.StartDscConfigurationCommand

What should you do?

How Do You Create Docker Containers To Have Unique IP Addresses?

Problem scenario
How do you create Docker containers to have unique IP Addresses (but not the default 172.x.x.x type)?

Solution
(If you need help installing Docker, see this posting.)

Create new IP addresses with these commands (with sudo in front of them, preferably, or less preferably as the root user):

ip addr add 33.33.33.38/28 brd + dev eth0
ip addr add 33.33.33.39/28 brd + dev eth0
ip addr add 33.33.33.40/28 brd + dev eth0

# Replace the IP addresses and subnet masks as you desire

Then use a modified version of this command:
docker run -p 33.33.33.38:80:80 repositoryName:versionDesignation /bin/bash
# You can use the “docker images” command to find the “repositoryName” and “versionDesignation”
# The IP address and port mapping (from Linux server to Docker container) can be substituted as needed

Two or more containers on the same Docker host can use port 80 using this method. 

How To Create IP Addresses On a Linux Server without Corresponding NICs

If you do not want to create new interfaces, just new IP addresses, use these commands:

ip addr add 33.33.33.38/28 brd + dev eth0
ip addr add 33.33.33.39/28 brd + dev eth0
ip addr add 33.33.33.40/28 brd + dev eth0

# Replace the IP addresses and subnet masks as you desire.

The IP addresses will go away upon rebooting.  You may want multiple IP addresses on new “semi-virtual” interfaces on a Linux server. 

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.

What does the I.T. term “bootstrap” mean?

Bootstrap

Definition 1 (transitive verb) of bootstrap:  To turn on a computer so that the operating system is completely functional.  Source:  The fifth definition of “bootstrap” in Dictionary.com is specific to “computers.” 

Definition 2 (transitive verb) of bootstrap:  To intentionally initiate multiple subprocesses (especially a primarily automatic sequence of often incremental subprocesses), as in a batch execution, from a single file or action.

Examples of definition 2: 
“Between the advent of handy tools,