This page contains Windows bias

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
⚠️ missing_linux_example
⚠️ windows_tools
Summary:
The documentation is heavily biased toward Windows and PowerShell usage. All automation and scripting examples are provided exclusively in PowerShell, and the prerequisites specify Windows 10/Server and PowerShell 5.1 or later. There are no Linux or cross-platform CLI examples, nor is there any mention of Linux support or alternatives for non-Windows users. The documentation assumes the use of Windows tools and patterns throughout.
Recommendations:
  • Explicitly state whether Linux (or macOS) clients are supported for device provisioning and configuration. If not, clarify this limitation early in the documentation.
  • If Linux is supported, provide equivalent instructions and examples using cross-platform tools such as Azure CLI, Bash scripts, or PowerShell Core (pwsh) on Linux.
  • If the PowerShell module is compatible with PowerShell Core (pwsh) on Linux/macOS, add installation and usage instructions for those platforms.
  • Include a section on how to perform common tasks (e.g., importing modules, running commands, handling JSON files) on Linux, using either PowerShell Core or native Linux tools.
  • Where possible, use cross-platform command-line examples (e.g., Azure CLI) in addition to or instead of Windows-specific PowerShell cmdlets.
  • Review and update prerequisites to mention supported operating systems beyond Windows, if applicable.
GitHub Create pull request

Scan History

Date Scan ID Status Bias Status
2025-07-12 23:44 #41 in_progress ❌ Biased
2025-07-12 00:58 #8 cancelled ✅ Clean
2025-07-10 05:06 #7 processing ✅ Clean

Flagged Code Snippets

Get-DeviceConfigurationStatus | To-json
Get-DeviceConfigurationStatus | To-json
Get-DeviceConfiguration | To-json
Import-Module "<Local path to PowerShell module>"\PowerShellBasedConfiguration.psm1
Get-DeviceVip | to-json
$pkg = New-Package -Time $time -Update $update
$newCfg = Set-DeviceConfiguration -DesiredDeviceConfig $pkg
Get-DeviceConfiguration | To-json
$p = Get-Content -Path "<Local path>\<ConfigFileName.json>" | ConvertFrom-json
Get-DeviceConfigurationStatus | To-json
Get-DeviceConfiguration | To-json
$newCfg = Set-DeviceConfiguration -DesiredDeviceConfig $p
Get-DeviceConfigurationStatus | To-json
Set-DeviceVip -vip $nfsVip
Set-Login "https://<IP address>" "<Password1>" "<NewPassword>"
Get-DeviceConfiguration | To-json
$time = New-Object PSObject -Property @{ TimeZone = "Hawaiian Standard Time" }
$update = New-Object PSObject -Property @{ ServerType = "MicrosoftUpdate" }
$ActivationKey = "<Activation key>"
$p = New-Package -Activation $activation
$p = Get-DeviceConfiguration
$p.device.webproxy
Get-DeviceConfiguration | To-json
Get-DeviceDiagnostic | To-json
Get-DeviceVip | to-json
Get-DeviceVip | to-json
PS C:\> Get-DeviceConfigurationStatus | To-json { "deviceConfiguration": { "status": "Complete", "results": [ { "declarationName": "Time", "resultCode": "Success", "errorCode": "None", "message": null }, { "declarationName": "Update", "resultCode": "Success", "errorCode": "None", "message": null } ] } } PS C:\>
Get-DeviceConfiguration | To-json | Out-File "<Local path>\TestConfig2.json"
Get-DeviceConfiguration | To-json
PS C:\> Get-DeviceConfiguration | To-json { "device": { "deviceInfo": { "model": "Azure Stack Edge", "softwareVersion": "2.2.2075.5523", "serialNumber": "1HXQG13", "isActivated": false, "nodes": [ { "id": "d0d8cb16-60d4-4970-bb65-b9d254d1a289", "name": "1HXQG13" } ] }, } }
$newCfg = Set-DeviceConfiguration -DesiredDeviceConfig $p
PS C:\> Get-DeviceConfiguration | To-json { "device": { "deviceInfo": { "model": "Azure Stack Edge", "softwareVersion": "2.2.2075.5523", "serialNumber": "1HXQG13", "isActivated": false, "nodes": [ { "id": "d0d8cb16-60d4-4970-bb65-b9d254d1a289", "name": "1HXQG13" } ] }, } }
$p = Get-Content -Path "<Local path>\<ConfigFileName-two-node-device.json>" | ConvertFrom-json
$newCfg = Set-DeviceConfiguration -DesiredDeviceConfig $p
Get-DeviceConfiguration | To-json
PS C:\> Get-DeviceConfiguration | To-json { "device": { "deviceInfo": { "model": "Azure Stack Edge", "softwareVersion": "3.2.2380.1548", "serialNumber": "1HXG613", "isActivated": true, "nodes": [ { "id": "9b1817b9-67f5-4631-8466-447b89b829f3", "name": "HW6C1T2" }, { "id": "b4eeebad-9395-4aa8-b6b4-2f2d66eccf58", "name": "1HXG613" } ] }, "deviceEndpoint": { "name": "DBE-1HXG613", "dnsDomain": "microsoftdatabox.com" }, "encryptionAtRestKeys": null, "network": { "dhcpPolicy": "AttemptRenew", "interfaces": [ { "name": "Port1", "nodeName": "1HXG613", "nodeId": "b4eeebad-9395-4aa8-b6b4-2f2d66eccf58", "isDhcpEnabled": false, "iPv4": { "address": "192.0.2.0/24", "subnetMask": "255.255.255.0", "gateway": null }, "iPv6": null, "dnsServerAddresses": null, "dnsSuffix": null, "routes": null, "ipConfigType": "IP" }, { "name": "Port1", "nodeName": "HW6C1T2", "nodeId": "9b1817b9-67f5-4631-8466-447b89b829f3", "isDhcpEnabled": false, "iPv4": { "address": "192.0.2.0/24", "subnetMask": "255.255.255.0", "gateway": null }, "iPv6": null, "dnsServerAddresses": null, "dnsSuffix": null, "routes": null, "ipConfigType": "IP" }, { "name": "Port2", "nodeName": "1HXG613", "nodeId": "b4eeebad-9395-4aa8-b6b4-2f2d66eccf58", "isDhcpEnabled": true, "iPv4": { "address": "192.0.2.0/24", "subnetMask": "255.255.248.0", "gateway": "10.126.72.1" }, "iPv6": null, "dnsServerAddresses": [ "10.50.50.50", "10.50.10.50" ], "dnsSuffix": "corp.microsoft.com", "routes": null, "ipConfigType": "IP" }, { "name": "Port2", "nodeName": "HW6C1T2", "nodeId": "9b1817b9-67f5-4631-8466-447b89b829f3", "isDhcpEnabled": true, "iPv4": { "address": "192.0.2.0/24", "subnetMask": "255.255.248.0", "gateway": "10.126.72.1" }, "iPv6": null, "dnsServerAddresses": [ "10.50.50.50", "10.50.10.50" ], "dnsSuffix": "corp.microsoft.com", "routes": null, "ipConfigType": "IP" }, { "name": "Port3", "nodeName": "1HXG613", "nodeId": "b4eeebad-9395-4aa8-b6b4-2f2d66eccf58", "isDhcpEnabled": true, "iPv4": { "address": "192.0.2.0/24", "subnetMask": "255.255.0.0", "gateway": null }, "iPv6": null, "dnsServerAddresses": [ "192.168.0.1" ], "dnsSuffix": "wdshcsso.com", "routes": null, "ipConfigType": "IP" }, { "name": "Port3", "nodeName": "HW6C1T2", "nodeId": "9b1817b9-67f5-4631-8466-447b89b829f3", "isDhcpEnabled": true, "iPv4": { "address": "192.0.2.0/24", "subnetMask": "255.255.0.0", "gateway": null }, "iPv6": null, "dnsServerAddresses": [ "192.168.0.1" ], "dnsSuffix": "wdshcsso.com", "routes": null, "ipConfigType": "IP" }, { "name": "Port4", "nodeName": "1HXG613", "nodeId": "b4eeebad-9395-4aa8-b6b4-2f2d66eccf58", "isDhcpEnabled": true, "iPv4": { "address": "192.0.2.0/24", "subnetMask": "255.255.0.0", "gateway": null }, "iPv6": null, "dnsServerAddresses": [ "192.168.0.1" ], "dnsSuffix": "wdshcsso.com", "routes": null, "ipConfigType": "IP" }, { "name": "Port4", "nodeName": "HW6C1T2", "nodeId": "9b1817b9-67f5-4631-8466-447b89b829f3", "isDhcpEnabled": true, "iPv4": { "address": "192.168.6.99", "subnetMask": "255.255.0.0", "gateway": null }, "iPv6": null, "dnsServerAddresses": [ "192.168.0.1" ], "dnsSuffix": "wdshcsso.com", "routes": null, "ipConfigType": "IP" }, { "name": "Port5", "nodeName": "1HXG613", "nodeId": "b4eeebad-9395-4aa8-b6b4-2f2d66eccf58", "isDhcpEnabled": true, "iPv4": { "address": "192.0.2.0/24", "subnetMask": "255.255.0.0", "gateway": null }, "iPv6": null, "dnsServerAddresses": [ "192.168.0.1" ], "dnsSuffix": "wdshcsso.com", "routes": null, "ipConfigType": "IP" }, { "name": "Port5", "nodeName": "HW6C1T2", "nodeId": "9b1817b9-67f5-4631-8466-447b89b829f3", "isDhcpEnabled": true, "iPv4": { "address": "192.0.2.0/24", "subnetMask": "255.255.0.0", "gateway": null }, "iPv6": null, "dnsServerAddresses": [ "192.168.0.1" ], "dnsSuffix": "wdshcsso.com", "routes": null, "ipConfigType": "IP" }, { "name": "Port6", "nodeName": "1HXG613", "nodeId": "b4eeebad-9395-4aa8-b6b4-2f2d66eccf58", "isDhcpEnabled": true, "iPv4": { "address": "192.0.2.0/24", "subnetMask": "255.255.0.0", "gateway": null }, "iPv6": null, "dnsServerAddresses": [ "192.168.0.1" ], "dnsSuffix": "wdshcsso.com", "routes": null, "ipConfigType": "IP" }, { "name": "Port6", "nodeName": "HW6C1T2", "nodeId": "9b1817b9-67f5-4631-8466-447b89b829f3", "isDhcpEnabled": true, "iPv4": { "address": "192.0.2.0/24", "subnetMask": "255.255.0.0", "gateway": null }, "iPv6": null, "dnsServerAddresses": [ "192.168.0.1" ], "dnsSuffix": "wdshcsso.com", "routes": null, "ipConfigType": "IP" } ], "vSwitches": [ { "name": "vSwitch1", "interfaceName": [ "Port2" ], "enabledForCompute": true, "enabledForStorage": false, "enabledForMgmt": true, "supportsAcceleratedNetworking": false, "enableEmbeddedTeaming": true, "ipAddressPools": [ { "name": "KubernetesNodeIPs", "ipAddressRange": "10.126.75.200-10.126.75.202" }, { "name": "KubernetesServiceIPs", "ipAddressRange": "10.126.75.206-10.126.75.208" } ], "mtu": 1500 }, { "name": "vSwitch2", "interfaceName": [ "Port3" ], "enabledForCompute": false, "enabledForStorage": true, "enabledForMgmt": false, "supportsAcceleratedNetworking": false, "enableEmbeddedTeaming": true, "ipAddressPools": [ ], "mtu": 1500 }, { "name": "TestvSwitch", "interfaceName": [ "Port5" ], "enabledForCompute": false, "enabledForStorage": false, "enabledForMgmt": false, "supportsAcceleratedNetworking": true, "enableEmbeddedTeaming": false, "ipAddressPools": [ ], "mtu": 9000 } ], "virtualNetworks": [ { "name": "TestvSwitch-internal", "vSwitchName": "TestvSwitch", "vlanId": 0, "subnetMask": "255.255.255.0", "gateway": "192.0.2.0/24", "network": "192.0.2.0/24", "enabledForKubernetes": false, "ipAddressPools": [ { "name": "VirtualMachineIPs", "ipAddressRange": "192.0.2.0/24" } ] } ] }, "time": { "timeZone": "Pacific Standard Time", "primaryTimeServer": "time.windows.com", "secondaryTimeServer": null }, "update": { "serverType": "None", "wsusServerURI": null }, "webProxy": { "isEnabled": false, "connectionURI": null, "authentication": "None", "username": null, "password": null } } } PS C:\>
$activation = New-Object PsObject -Property @{ActivationKey=$ActivationKey; ServiceEncryptionKey=""}
PS C:\> Get-DeviceConfigurationStatus | to-json { "deviceConfiguration": { "status": "Complete", "results": [ { "declarationName": "Network", "resultCode": "Success", "errorCode": "None", "message": null }, { "declarationName": "Activation", "resultCode": "Success", "errorCode": "None", "message": null }, { "declarationName": "DeviceEndpoint", "resultCode": "Success", "errorCode": "None", "message": null }, { "declarationName": "WebProxy", "resultCode": "Success", "errorCode": "None", "message": null }, { "declarationName": "Time", "resultCode": "NotExecuted", "errorCode": "None", "message": "" }, { "declarationName": "Update", "resultCode": "NotExecuted", "errorCode": "None", "message": "" } ] } }
Get-DeviceConfiguration | To-json
PS C:\> Get-DeviceConfiguration | To-json { "device": { "deviceInfo": { "model": "Azure Stack Edge", "softwareVersion": "2.2.2075.5523", "serialNumber": "1HXQJ23", "isActivated": true, "nodes": [ { "id": "d0d8ca16-60d4-4970-bb65-b9d254d1a289", "name": "1HXQG13" } ] }, } }
PS C:\> $p.device.webproxy isEnabled : False connectionURI : null authentication : None username : password :
$p.device.webproxy.isEnabled = $true $p.device.webproxy.connectionURI = "<specify a URI depending on the geographic location of the device>"
$p.device.webproxy
PS C:\> $p.device.webproxy isEnabled : True connectionURI : http://10.57.48.82:8080 authentication : None username : password :
$newCfg = Set-DeviceConfiguration -DesiredDeviceConfig $p
Get-DeviceConfigurationStatus | To-json
Get-DeviceConfiguration | To-json
Set-DeviceLogConsent -logConsent $true
PS C:\> Get-DeviceLogConsent False PS C:\> Set-DeviceLogConsent -logConsent $true True PS C:\> Get-DeviceLogConsent True PS C:\>
Get-DeviceLogConsent
Start-DeviceDiagnostic
PS C:\> Get-DeviceDiagnostic | To-json { "lastRefreshTime": "2022-09-27T20:12:10.643768Z", "status": "Complete", "diagnostics": [ { "test": "System software", "category": "Software", "status": "Succeeded", "recommendedActions": "" }, { "test": "Disks", "category": "Hardware, Disk", "status": "Succeeded", "recommendedActions": "" }, { "test": "Power Supply Units", "category": "Hardware", "status": "Succeeded", "recommendedActions": "" }, { "test": "Network interfaces", "category": "Hardware", "status": "Succeeded", "recommendedActions": "" }, { "test": "CPUs", "category": "Hardware", "status": "Succeeded", "recommendedActions": "" }, { "test": "Network settings ", "category": "Logical, Network", "status": "Succeeded", "recommendedActions": "" }, { "test": "Internet connectivity", "category": "Logical, Network", "status": "Succeeded", "recommendedActions": "" }, { "test": "Web proxy", "category": "Logical, Network", "status": "NotApplicable", "recommendedActions": "" }, { "test": "Time sync ", "category": "Logical, Time", "status": "Succeeded", "recommendedActions": "" }, { "test": "Azure portal connectivity", "category": "Logical, Network, AzureConnectivity", "status": "Succeeded", "recommendedActions": "" }, { "test": "Azure storage account credentials", "category": "Logical, AzureConnectivity", "status": "NotApplicable", "recommendedActions": "" }, { "test": "Software update readiness", "category": "Logical, Update", "status": "Succeeded", "recommendedActions": "" }, { "test": "User passwords", "category": "Logical, PasswordExpiry", "status": "Succeeded", "recommendedActions": "" }, { "test": "Azure consistent services health check", "category": "ACS", "status": "Succeeded", "recommendedActions": "" }, { "test": "Certificates", "category": "Certificates", "status": "Succeeded", "recommendedActions": "" }, { "test": "Azure container read/write", "category": "Logical, Network, AzureConnectivity", "status": "NotApplicable", "recommendedActions": "" }, { "test": "Azure Edge compute runtime", "category": "Logical, AzureEdgeCompute", "status": "Succeeded", "recommendedActions": "" }, { "test": "Compute acceleration", "category": "Hardware, Logical", "status": "Succeeded", "recommendedActions": "" } ] }
$acsVip = New-Object PSObject -Property @{ Type = "ACS"; VipAddress = "10.57.51.32"; ClusterNetworkAddress = "10.57.48.0"; IsDhcpEnabled = $false }
Set-DeviceVip -vip $acsVip
Get-DeviceVip | to-json
{ "acsVIP": { "type": "ACS", "name": "Azure Consistent Services", "address": "10.57.51.32", "network": { "name": "Cluster Network 3", "address": "10.57.48.0", "subnet": "255.255.248.0", "dhcpEnabled": false }, "isDhcpEnabled": false } } PS C:\>
$acsVip = New-Object PSObject -Property @{ Type = "ACS"; VipAddress = $null; ClusterNetworkAddress = "10.57.48.0"; IsDhcpEnabled = $true }
Set-DeviceVip -vip $acsVip
Get-DeviceVip | to-json
{ "acsVIP": { "type": "ACS", "name": "Azure Consistent Services", "address": "10.57.53.225", "network": { "name": "Cluster Network 3", "address": "10.57.48.0", "subnet": "255.255.248.0", "dhcpEnabled": true }, "isDhcpEnabled": true }, } PS C:\>
Get-DeviceVip | to-json
$nfsVip = New-Object PSObject -Property @{ Type = "NFS"; VipAddress = "10.57.53.215"; ClusterNetworkAddress = "10.57.48.0"; IsDhcpEnabled = $false }
Set-DeviceVip -vip $nfsVip
Get-DeviceVip | to-json
{ "nfsVIP": { "type": "NFS", "name": "Network File System", "address": "10.57.53.215", "network": { "name": "Cluster Network 3", "address": "10.57.48.0", "subnet": "255.255.248.0", "dhcpEnabled": false }, "isDhcpEnabled": false } } PS C:\>
Get-DeviceVip | to-json
$nfsVip = New-Object PSObject -Property @{ Type = "NFS"; VipAddress = $null; ClusterNetworkAddress = "10.57.48.0"; IsDhcpEnabled = $true }
{ "nfsVIP": { "type": "NFS", "name": "Network File System", "address": "10.57.53.228", "network": { "name": "Cluster Network 3", "address": "10.57.48.0", "subnet": "255.255.248.0", "dhcpEnabled": true }, "isDhcpEnabled": true } } PS C:\>