PowerShell

The PowerShell forum accepts bug reports as well as feedback and suggestions. For more information, check out the PowerShell Homepage

The following is a list of the states we use to track items.

status meaning
survey We saw this and we are considering it. Please upvote if it’s important to you.
needs more information We don’t understand the issue and need additional details.
investigating We are looking at this internally to understand things like: scenario, reproduction of issue, costing, or other technical details.
in queue The issue is understood and in our unprioritized backlog. Your votes will be used to drive prioritization of this work.
  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. Add enhanced reporting, allowing you to view the status of all nodes instead of one at a time.

    Currently, the DSC reporting server only offers the ability to query a single node at a time. I think for any environment, it would be crucial to get a list of the last reported compliance for all nodes. I'd really like to see this feature added in a future release.

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
    survey  ·  Mark Gray responded

    Eric,

    Thanks for the feedback! This is something that we are aware of. We intentionally did not want to do this without having a way to authenticate the requests.

    Have you seen this community project? It should help you get the functionality that you are looking for including authentication:
    https://github.com/claudiospizzi/DSCPullServerWeb

    MarkG

  2. Determine who is calling TestScript

    The TestScript code in a Powershell DSC Script resource is executed by calling Test-DscConfiguration and by calling Start-DscConfiguration. I would like to determine which cmdlet called TestScript in the TestScript code.

    Suggested solution: property in $MyInvocation object

    Use case: write an event to the eventlog "Starting DSC config" only when Start-DscConfiguration is ran.

    Example code:
    Script MyScript
    {
    TestScript = {

    if ($MyInvocation.<property> -eq 'Test-DscConfiguration') {
    
    Write-Verbose "Called by Test-DscConfiguration"
    $true #do not run SetScript
    }
    else {
    Write-Verbose "Called by Start-DscConfiguration"
    $false #run SetScript
    }

    }
    SetScript = { Write-EventLog -LogName "Application" -Source "MyCompany" -EventID 1 -EntryType Information -Message…

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  3. Ability to run a DSC configuration item last

    Add the ability to run a particular item in a DSC configuration last.

    One could achieve this by chaining all items together with a DependsOn for each task, but that is less than ideal.

    This would be particularly handy for reboots, which you often want to be the last thing to run.

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  4. Allow 'resource syntax' for nested configurations

    Currently, we can dot source a configuration from another file and use it as a nested configuration, but to pass any parameters they need to be passed or splatted as regular PowerShell arguments (because, well, they really are.)

    It would be nice if the nested configurations could receive their parameters with the same syntax as a 'proper' resource.

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  5. #Group resource fails to add a domain user\group when a domain user\group exists

    Cannot enforce a domain user or domain group in a local group when the group contains any domain member. Example. local TestGroup contains domain\user1 and domain\user2. If domain\user1 is removed from TestGroup, DSC configuration cannot add domain\user1 back to TestGroup using the Group resource.


    Group TestGroup5
    {
    GroupName = 'TestGroup5'
    Ensure = 'Present'
    MembersToInclude = user1@domain.com','user2@domain.com'
    Credential = $DomainCredential
    }


    Is this a bug?

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  6. Using hashes inside Composite Resources

    Instead of using 20 "single" Service Resource, we can now use ServiceSet, however its only if the parameters for the services are the same like State for example.

    IF i have 10 services i want their state to be Started and 10 i want to be stopped , i have to use 2 ServiceSets.

    Would be helpful to be able to use just one Service set, but then have the parametes use either positional values or allow hashing

    ServiceSet ServiceSetComposite{
    Name ='AudioSrv','WinMgmt'
    State='Started','Stopped'
    Ensure='Present'
    }

    or
    (bit better as it allows Ensure to be taken into calculation

    ServiceSet ServiceSetComposite{
    Service…

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  7. Allow ConfigurationModeFrequencyMins < 15 and RefreshFrequencyMins< 30

    Hi,
    as I am using DSC to deploy fresh clouds and as I have some nodes and resources dependancies, I have to wait for nodes to report, and then nodes to deploy.
    Because ConfigurationModeFrequencyMins and RefreshFrequencyMins minimum are very large, fresh cloud deployments take some time.

    Please allow minimums as 1

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  8. Allow use "*" as PartialConfiguration property value in LCM

    Currently if we want to add another partial configuration, we have to reconfigure LCM on local machine to target new config.

    If LCM could use "*" (asterisk) as PartialConfiguration property value, then LCM reconfuguration wouldn't be necessary every time when new config was added.

    How it could work from my perspective:

    When LCM was reconfigured to pull every configuration (via asterisk as value) then it connect to PullSrv and pull every mof configuration with his own GUID like *.guid.mof.

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    survey  ·  0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  9. Allow WildCard in PartialConfig name

    When a DSC Client Node gets his config from the DSC Pull Server, allow him to filter the config name with WildCards.

    For exemple the DSC Client named 'Target01' should be able to pull DSC configs named Target01.* (Target01.Apps , Target01.OS,...). So we could publish new DSC Configs without the need of re-configuring the target LCM.

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
    survey  ·  Mark Gray responded

    I agree that this experience is not the most streamlined. I would really like to understand how you and other customers are using partial configs when in pull mode. For example why do you use partial configurations instead of composite configurations? Are you using WMF 5.0 RTM Pull functionality or WMF 4.0?

  10. Bug: DSC error when executing configuratin with Set-PSDebug -Strict - "$notAllowedValue cannot be retrieved because it has not been set"

    When you execute a configuration .ps1 script with Set-PSDebug -Strict turned on, you get the following error:

    PSDesiredStateConfiguration\Node : The variable '$notAllowedValue' cannot be retrieved because it has not been set.

    I can work around this by using the following code snippet:

    Set-PSDebug -Off
    $mofFile = SetPullMode -ComputerName $comp -OutputPath $mofFilePath -ConfigurationId $ConfigurationId -Thumbprint $cert.Thumbprint -PullserverUri $PullServerUri
    Set-PSDebug -Strict

    This sounds like a scoping issue in DSC somewhere with the notAllowedValue variable.

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    In Queue  ·  1 comment  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  11. Using dynamic parameters in a DSC resource

    I just tried to use dynamic parameters in a DSC resource. Unfortunately during testing, DSC prompted me with the following message:
    "The command Test-TargetResource of the PS module MSFTx<RESOURCENAME> does not implement the write property ApplicationPool mentioned in the corresponding MOF schema file C:\Program Files\WindowsPowerShell\Modules&lt;RESOURCENAME>\0.9.0.0\Ds
    cResources\MSFT
    xSPWordAutomationServiceApp\MSFT_<RESOURCENAME>.schema.mof. All write paramenters mentioned in the schema file must be implemented by the command Test-TargetResource."

    So it looks like Dynamic Parameters isn't supported in DSC resource, which is too bad. This forces me to add additional checks in my code.

    Can you please add this support to DSC?

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  12. Get-DscConfiguration Fails With Embedded CIM type

    Votes from Connect: 3

    Original Date Submitted: 8/28/2015 4:09:14 AM

    Description:
    Contact Information
    Handle: Steve Murawski
    Site Name: PowerShell
    Feedback ID: 1721560


    Frequency: Desired State Configuration (DSC)
    Regression: install-module cWebAdministration
    configuration cWebsite_StopWebsite
    {

    param
    
    (
    # Target nodes to apply the configuration
    [string[]]$NodeName = &#39;localhost&#39;
    )

    # Import the module that defines custom resources
    Import-DscResource -ModuleName cWebAdministration

    Node $NodeName
    {
    # Install the IIS role
    WindowsFeature IIS
    {
    Ensure = &quot;Present&quot;
    Name = &quot;Web-Server&quot;
    }

    # Stop the default website
    cWebsite DefaultSite
    {
    Ensure = &quot;Present&quot;
    Name = &quot;Default Web Site&quot;
    State = &quot;Stopped&quot;
    PhysicalPath = &quot;C:\inetpub\wwwroot&quot;
    DependsOn = &quot;[WindowsFeature]IIS&quot; …

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
    investigating  ·  Mark Gray responded

    This should be resolved with WMF 5.0. Please let us know if this is reproducible with WMF 5.0 RTM.

  13. MSFT_RegistryResource.psm1

    Votes from Connect: 3

    Original Date Submitted: 7/22/2015 3:22:46 AM

    Description:
    Contact Information
    Handle: Alcaron
    Site Name: PowerShell
    Feedback ID: 1574517


    Frequency: Desired State Configuration (DSC)
    Regression: Set a registry key to the binary value of anything with a hex value that starts with 0, i.e.:
    ValueData = @("8232c580d332674f9cab5df8c206fcd8")

    That 06 towards the end there is what initially led me to track this down.

    Problem Description:
    Line: 926
    Is: $Data | % {$retString += [String]::Format("{0:x}", $_)}

    Should be: $Data | % {$retString += [String]::Format("{0:x2}", $_)}

    As it stands now any HEX value that starts with 0 has it's leading 0…

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  14. Invoke-DscResource - Should always be able to be run, no matter what RefreshMode is set to

    Votes from Connect: 3

    Original Date Submitted: 3/3/2015 7:34:33 AM

    Description:
    Contact Information
    Handle: Rob Reynolds (FerventCoder)
    Site Name: PowerShell
    Feedback ID: 1157802


    Frequency: Always Happens
    Regression: No, this is new to the most recent version

    Problem Description:
    Why can Invoke-DscResource only be run when LCM.RefreshMode = 'Disabled'?

    Disabled is not the default. This means I need to make system level changes just so I can run commands with this method. This severely limits the usefulness of the command.

    I understand that you don't want competing resources, but that power should be handed over to the user to work with,…

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  15. DSC configuration fails if WinRM service restarts while the enact is in process

    Votes from Connect: 7

    Original Date Submitted: 10/20/2014 11:07:16 PM

    Description:
    Contact Information
    Handle: Ravikanth.Chaganti
    Site Name: PowerShell
    Feedback ID: 1006559


    Frequency: Always Happens
    Regression: Yes, this happens in all previous versions

    Problem Description:
    When DSC configuration enact process is in progress (either push or pull), any interruption in WinRM service disconnects the CIM session and leads to failure of configuration. The inability to recover from wsman disconnection is an issue within a data center. There are many reasons why such a disconnection may happen and this needs to be fixed.

    Product Studio item created by Connect Synchronizer due to…

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  16. Cmdlets in the WebAdministration module occasionally generates errors when used in a custom DSC configuration

    Votes from Connect: 5

    Original Date Submitted: 9/17/2014 2:30:56 AM

    Description:
    Contact Information
    Handle: Jan Egil Ring
    Site Name: PowerShell
    Feedback ID: 973480


    Frequency: Always Happens
    Regression: No, this is new to the most recent version

    Problem Description:
    When using cmdlets from the WebAdministration (IIS) PowerShell module in a custom DSC resource, errors are thrown when invoking the Get/Set/Test-TargetResource functions (for example by running Test-DscConfiguration).

    The error thrown is:
    Unable to cast COM object of type 'Microsoft.IIs.PowerShell.Framework.AppHostQueryProcessor' to interface type 'Mic
    rosoft.IIs.PowerShell.Framework.IAppHostQueryProcessor'. This operation failed because the QueryInterface call on the COM component for the
    interface with IID '{6E0E6BE3-71C1-4A66-800E-11B9CBA00EAB}' failed…

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  17. Add-ADPrincipalGroupMembership [-WhatIf] [-Confirm] [-AuthType <ADAuthType>] [-Credential <PSCredential>] [-Identity] <ADPrin

    Add-ADPrincipalGroupMembership
    [-WhatIf]
    [-Confirm]
    [-AuthType <ADAuthType>]
    [-Credential <PSCredential>]
    [-Identity] <ADPrincipal>
    [-MemberOf] <ADGroup[]>
    [-Partition <String>]
    [-PassThru]
    [-Server <String>]
    [<CommonParameters>]

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  18. BUG: Dsc Engine Merge configuration doesn't compare Table String type as expected

    When you run Start-DscConfiguration to apply a new configuration, LCM merge all the configuration settings who belong to the same node name. Like the file below. When sacfg (alias) run, then the ValueData of the two resource are compared by the merge processus. Then the merge fail because ValueData is declared as String[] (table) type into the RegistryResource .mof file.
    Below you can find the configuration file to create the issue.
    Another behavior:
    If you specify a string array with several value then PowerShell "PSDesiredStateConfiguration.psm1" throw an error at the execution instead of the LCM. The compared values are always…

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  19. Bug: The first time New-NetLbfoTeam is used by Desired State Configuration it creates a misnamed interface

    The first time New-NetLbfoTeam is used by Desired State Configuration it creates a misnamed interface.

    This is on Server 2019 Build 17763.557 with the following updates applied:

    KB4483452
    KB4470788
    KB4503308
    KB4504369
    KB4503327

    Powershell shows:
    Name Value


    PSVersion 5.1.17763.503

    PSEdition Desktop

    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}

    BuildVersion 10.0.17763.503

    CLRVersion 4.0.30319.42000

    WSManStackVersion 3.0

    PSRemotingProtocolVersion 2.3

    SerializationVersion 1.1.0.1

    For example:

    New-NetLbfoTeam -Name "Team1" -TeamMembers "NIC1" -TeamNicName "Team1" -LoadBalancingAlgorithm Dynamic -TeamingMode SwitchIndependent -Confirm:$False

    Will create an interface called "Ethernet" (Visible through Get-NetAdapter).

    If you delete the team and recreate in the same DSC, it'll work correctly.

    i.e. this works and creates an interface called…

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  20. It does not work with all MSIs

    This resurce does not handle correctly all MSIs. For example Firefox MSI will not be installed due to the ProdID

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  • Don't see your idea?

Feedback and Knowledge Base