DscResource.Common

0.24.2

Common functions used in DSC Resources

Minimum PowerShell version

4.0

There is a newer prerelease version of this module available.
See the version list below for details.

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name DscResource.Common -RequiredVersion 0.24.2

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name DscResource.Common -Version 0.24.2

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

Copyright the DSC Community contributors. All rights reserved.

Package Details

Author(s)

  • DSC Community

Tags

DSC Localization

Functions

Assert-BoundParameter Assert-ElevatedUser Assert-IPAddress Assert-Module Compare-DscParameterState Compare-ResourcePropertyState ConvertFrom-DscResourceInstance ConvertTo-CimInstance ConvertTo-HashTable Find-Certificate Format-Path Get-ComputerName Get-DscProperty Get-EnvironmentVariable Get-FileProductVersion Get-LocalizedData Get-LocalizedDataForInvariantCulture Get-PSModulePath Get-RegistryPropertyValue Get-TemporaryFolder Get-UserName New-ArgumentException New-ErrorRecord New-Exception New-InvalidDataException New-InvalidOperationException New-InvalidResultException New-NotImplementedException New-ObjectNotFoundException Remove-CommonParameter Set-DscMachineRebootRequired Set-PSModulePath Test-AccountRequirePassword Test-DscParameterState Test-DscProperty Test-IsNanoServer Test-IsNumericType Test-ModuleExist Test-PendingRestart

Dependencies

This module has no dependencies.

Release Notes

## [0.24.2] - 2025-08-27

### Changed

- `Compare-DscParameterState`
 - Changed detailed diagnostic messages from `Write-Verbose` to `Write-Debug`
   for variable values, type comparisons, and internal diagnostics.
 - Comparison result still uses `Write-Verbose` to provide user-actionable
   information about parameter state differences.
 - Use ArrayList and not fixed size array.
 - Remove some ForEach-Object usage.
- `Test-ModuleExist`
 - Changed module filtering messages from `Write-Verbose` to `Write-Debug`
   for internal implementation details.
 - Localized hardcoded `Write-Debug` messages to use localized strings
   ([#168](https://github.com/dsccommunity/DscResource.Common/issues/168)).
- `Test-IsNanoServer`
 - Changed operating system SKU diagnostic message from `Write-Verbose` to `Write-Debug`.
- `Find-Certificate`
 - Changed certificate filter diagnostic message from `Write-Verbose` to `Write-Debug`.
 - Use ArrayList and not fixed size array.
- `Get-LocalizedDataForInvariantCulture`
 - Changed file processing message from `Write-Verbose` to `Write-Debug`
   for internal diagnostic information.
 - Localized hardcoded `Write-Debug` messages to use localized strings
   ([#169](https://github.com/dsccommunity/DscResource.Common/issues/169)).
- `Clear-ZeroedEnumPropertyValue`
 - Add begin, end blocks.
- `Test-DscPropertyState`
 - Use ArrayList and not fixed size array.
- `Assert-BoundParameter`
 - Fix PSSA warning.
- `ConvertFrom-DscResourceInstance`
 - Fix PSSA warning.
- `Get-DscProperty`
 - Use ArrayList and not fixed size array.
 - Fix PSSA warning.
- `Remove-CommonParameter`
 - Remove use of `Where-Object` and `ForEach-Object`.

### Fixed

- GitVersion feature branch regex now only match branches starting with
 `f/` or `feature/` to prevent conflicts with GitHub Copilot Agent branches
 (issue [#173](https://github.com/dsccommunity/DscResource.Common/issues/173)).

FileList

Version History

Version Downloads Last updated
0.24.4 8 8/29/2025
0.24.4-previ... 0 8/29/2025
0.24.3 93 8/28/2025
0.24.3-previ... 1 8/28/2025
0.24.2 (current version) 58 8/27/2025
0.24.2-previ... 1 8/27/2025
0.24.2-previ... 1 8/27/2025
0.24.2-previ... 1 8/27/2025
0.24.2-previ... 1 8/27/2025
0.24.1 2 8/27/2025
0.24.1-previ... 1 8/27/2025
0.24.1-previ... 2 8/27/2025
0.24.0 11 8/26/2025
0.24.0-previ... 2 8/26/2025
0.24.0-previ... 2 8/26/2025
0.24.0-previ... 12 7/23/2025
0.24.0-previ... 4 6/2/2025
0.23.0 3,636 5/2/2025
0.23.0-previ... 3 5/2/2025
0.22.0 202 4/25/2025
0.22.0-previ... 3 4/25/2025
0.22.0-previ... 3 4/23/2025
0.21.0 883 3/16/2025
0.21.0-previ... 3 3/16/2025
0.20.1 187 3/10/2025
0.20.1-previ... 3 3/10/2025
0.20.0 46 3/9/2025
0.20.0-previ... 3 3/9/2025
0.19.1 563 2/8/2025
0.19.1-previ... 3 2/8/2025
0.19.1-previ... 9 11/17/2024
0.19.0 1,317 10/15/2024
0.19.0-previ... 2 10/15/2024
0.18.0 203 9/30/2024
0.18.0-previ... 2 9/30/2024
0.18.0-previ... 2 9/30/2024
0.17.3-previ... 5 8/28/2024
0.17.2 1,383 7/20/2024
0.17.2-previ... 5 7/20/2024
0.17.1 1,635 4/23/2024
0.17.1-previ... 5 4/23/2024
0.17.1-previ... 81 2/13/2024
0.17.1-previ... 116 1/27/2024
0.17.0 1,006 1/23/2024
0.17.0-previ... 7 1/23/2024
0.17.0-previ... 7 1/23/2024
0.17.0-previ... 7 1/23/2024
0.17.0-previ... 7 1/23/2024
0.17.0-previ... 7 1/21/2024
0.17.0-previ... 7 1/21/2024
0.16.1-previ... 7 1/21/2024
0.16.1-previ... 14 1/20/2024
0.16.0 6,557 4/10/2023
0.16.0-previ... 8 4/9/2023
0.15.0 95 4/6/2023
0.15.0-previ... 8 4/6/2023
0.14.0 1,674 12/31/2022
0.14.0-previ... 8 12/31/2022
0.14.0-previ... 8 12/30/2022
0.13.1 175 12/18/2022
0.13.1-previ... 8 12/18/2022
0.13.0 24 12/17/2022
0.13.0-previ... 8 12/17/2022
0.13.0-previ... 8 12/11/2022
0.12.0 165 12/10/2022
0.12.0-previ... 8 12/10/2022
0.11.1 1,303 8/18/2022
0.11.1-previ... 13 8/18/2022
0.11.0 438 8/1/2022
0.11.0-previ... 13 8/1/2022
0.11.0-previ... 100 9/10/2021
0.10.3 3,152 6/26/2021
0.10.3-previ... 20 5/24/2021
0.10.2 1,230 3/24/2021
0.10.2-previ... 18 3/24/2021
0.10.2-previ... 20 1/18/2021
0.10.1 1,303 12/25/2020
0.10.1-previ... 19 12/25/2020
0.10.0 450 11/18/2020
0.10.0-previ... 16 11/16/2020
0.10.0-previ... 15 11/13/2020
0.9.3 659 7/25/2020
0.9.3-previe... 16 7/25/2020
0.9.2 67 7/22/2020
0.9.2-previe... 14 7/22/2020
0.9.2-previe... 14 7/22/2020
0.9.2-previe... 16 7/18/2020
0.9.1 151 7/8/2020
0.9.1-previe... 14 7/8/2020
0.9.0 1,209 5/18/2020
0.9.0-previe... 14 5/18/2020
0.8.0 205 5/11/2020
0.8.0-previe... 16 5/10/2020
0.7.1 362 5/2/2020
0.7.1-previe... 15 5/2/2020
0.7.0 17 5/2/2020
0.7.0-previe... 16 5/2/2020
0.7.0-previe... 19 5/1/2020
0.6.0 156 4/23/2020
0.6.0-previe... 21 4/23/2020
0.5.0 196 4/18/2020
0.5.0-previe... 21 4/18/2020
0.4.1-previe... 21 4/18/2020
0.4.0 270 3/9/2020
0.4.0-previe... 17 3/9/2020
0.3.0 102 2/15/2020
0.3.0-previe... 17 2/15/2020
0.3.0-previe... 20 2/14/2020
0.3.0-previe... 17 1/19/2020
0.2.0 954 1/9/2020
0.2.0-previe... 18 1/9/2020
0.1.1 111 11/27/2019
0.1.1-previe... 17 11/27/2019
Show more