About This Page
This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.
Bias Analysis
Bias Types:
⚠️
powershell_heavy
⚠️
windows_first
⚠️
windows_tools
⚠️
missing_linux_example
Summary:
The documentation demonstrates a strong Windows and PowerShell bias. Most examples, scripts, and workflows are presented using PowerShell and Windows-specific tooling (e.g., WMF 5, PowerShell DSC cmdlets), with Linux instructions often appearing later, being less detailed, or requiring Windows tools to manage Linux nodes. Some Linux-specific steps are present, but they are less comprehensive, and Linux users are frequently directed to use Windows/PowerShell environments for configuration generation and management.
Recommendations:
- Provide Linux-first and cross-platform examples alongside Windows/PowerShell examples, especially in sections on generating and applying DSC metaconfigurations.
- Include native Linux command-line examples (e.g., Bash, Python) for all major workflows, such as onboarding, configuration, and status checking.
- Document how to generate and apply DSC metaconfigurations entirely from a Linux environment, without requiring access to Windows or PowerShell.
- List Linux and Windows instructions in parallel, or clearly separate them, rather than always presenting Windows/PowerShell first.
- Expand Linux troubleshooting and operational guidance to match the depth provided for Windows.
- Where PowerShell is required for Linux, clarify if PowerShell Core on Linux is supported, and provide examples accordingly.
- Avoid assuming the user has access to a Windows machine for managing Linux nodes; provide alternatives where possible.
Create pull request
Flagged Code Snippets
Set-DscLocalConfigurationManager -Path $env:UserProfile\Desktop\DscMetaConfigs
$SecurePass = ConvertTo-SecureString -String '<root password>' -AsPlainText -Force
$Cred = New-Object System.Management.Automation.PSCredential 'root', $SecurePass
$Opt = New-CimSessionOption -UseSsl -SkipCACheck -SkipCNCheck -SkipRevocationCheck
# need a CimSession for each Linux machine to onboard
$Session = New-CimSession -Credential $Cred -ComputerName <your Linux machine> -Port 5986 -Authentication basic -SessionOption $Opt
Set-DscLocalConfigurationManager -CimSession $Session -Path C:\Users\joe\Desktop\DscMetaConfigs
# The DSC configuration that will generate metaconfigurations
[DscLocalConfigurationManager()]
Configuration DscMetaConfigs
{
param
(
[Parameter(Mandatory=$True)]
[String]$RegistrationUrl,
[Parameter(Mandatory=$True)]
[String]$RegistrationKey,
[Parameter(Mandatory=$True)]
[String[]]$ComputerName,
[Int]$RefreshFrequencyMins = 30,
[Int]$ConfigurationModeFrequencyMins = 15,
[String]$ConfigurationMode = 'ApplyAndMonitor',
[String]$NodeConfigurationName,
[Boolean]$RebootNodeIfNeeded= $False,
[String]$ActionAfterReboot = 'ContinueConfiguration',
[Boolean]$AllowModuleOverwrite = $False,
[Boolean]$ReportOnly
)
if(!$NodeConfigurationName -or $NodeConfigurationName -eq '')
{
$ConfigurationNames = $null
}
else
{
$ConfigurationNames = @($NodeConfigurationName)
}
if($ReportOnly)
{
$RefreshMode = 'PUSH'
}
else
{
$RefreshMode = 'PULL'
}
Node $ComputerName
{
Settings
{
RefreshFrequencyMins = $RefreshFrequencyMins
RefreshMode = $RefreshMode
ConfigurationMode = $ConfigurationMode
AllowModuleOverwrite = $AllowModuleOverwrite
RebootNodeIfNeeded = $RebootNodeIfNeeded
ActionAfterReboot = $ActionAfterReboot
ConfigurationModeFrequencyMins = $ConfigurationModeFrequencyMins
}
if(!$ReportOnly)
{
ConfigurationRepositoryWeb AzureAutomationStateConfiguration
{
ServerUrl = $RegistrationUrl
RegistrationKey = $RegistrationKey
ConfigurationNames = $ConfigurationNames
}
ResourceRepositoryWeb AzureAutomationStateConfiguration
{
ServerUrl = $RegistrationUrl
RegistrationKey = $RegistrationKey
}
}
ReportServerWeb AzureAutomationStateConfiguration
{
ServerUrl = $RegistrationUrl
RegistrationKey = $RegistrationKey
}
}
}
# Create the metaconfigurations
# NOTE: DSC Node Configuration names are case sensitive in the portal.
# TODO: edit the below as needed for your use case
$Params = @{
RegistrationUrl = '<fill me in>';
RegistrationKey = '<fill me in>';
ComputerName = @('<some VM to onboard>', '<some other VM to onboard>');
NodeConfigurationName = 'SimpleConfig.webserver';
RefreshFrequencyMins = 30;
ConfigurationModeFrequencyMins = 15;
RebootNodeIfNeeded = $False;
AllowModuleOverwrite = $False;
ConfigurationMode = 'ApplyAndMonitor';
ActionAfterReboot = 'ContinueConfiguration';
ReportOnly = $False; # Set to $True to have machines only report to AA DSC but not pull from it
}
# Use PowerShell splatting to pass parameters to the DSC configuration being invoked
# For more info about splatting, run: Get-Help -Name about_Splatting
DscMetaConfigs @Params
Set-DscLocalConfigurationManager -Path ./DscMetaConfigs