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. Double DependsOn in mof when using foreach loops

    When using a foreach loop to create a set of resources and trying to set the previous item key as the dependsOn resource, it adds it twice in the mof file.

    Configuration example:
    configuration Test-DependsOnWithLoop {

    param([string[]]$Directories)
    
    Import-DscResource -ModuleName PSDesiredStateConfiguration
    node localhost {
    $dependsOn = $null
    $dirs.ForEach({
    $res = $_ -replace '\\|:', '_'
    File $res {
    Ensure = 'Present'
    DestinationPath = $_
    DependsOn = $dependsOn
    Type = 'Directory'
    }
    $dependsOn = "[File]$res"
    })
    }

    }

    $dirs = 1..10 | % { "C:\Temp_$_" }
    Test-DependsOnWithLoop -Directories $dirs

    And if you look at the localhost.mof you'll see:
    DependsOn = { "[File]CTemp

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

    We’ll send you updates on this idea

    In Queue  ·  0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  2. Start-DscConfiguration over secure WinRM (HTTPS / 5986) without needing to provide the Cim-Session

    referring to my post here. http://stackoverflow.com/questions/41567036/start-dsc-configuration-securely-usessl-without-needing-to-provide-the-compute

    Having the ability to continue using the ConfigurationData with multiple nodes and use a secure session (WinRM over 5986)

    3 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. DSC Class resource fails intermittently when debug_mode != None

    As per https://powershell.org/forums/topic/class-based-dsc-resource-intermittently-fails/#post-47427

    When LCM's debug_mode is set to anything else than None, a config with a custom Class resource fails randomly with the following output:

    VERBOSE: [WIN-8SU88BLP5RK]: LCM: [ Start Resource ] [[EnvRefresh]TESTVAR]
    VERBOSE: [WIN-8SU88BLP5RK]: LCM: [ Start Test ] [[Env
    Refresh]TESTVAR]
    VERBOSE: [WIN-8SU88BLP5RK]: [[EnvRefresh]TESTVAR] Importing the module
    Env
    Refresh in force mode.
    Object reference not set to an instance of an object.

    + CategoryInfo          : OperationStopped: (:) [], CimException
    
    + FullyQualifiedErrorId : System.NullReferenceException
    + PSComputerName : localhost

    VERBOSE: [WIN-8SU88BLP5RK]: LCM: [ End Test ] [[EnvRefresh]TESTVAR] in 0.0780 seconds.
    The PowerShell DSC resource '[Env
    Refresh]TESTVAR' with…

    3 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 →
  4. DSC File Resource - Modify Attributes Without Having to Delete

    File resource does not allow modifications to the target without first having to delete the target.

    Example:
    File HiddenFiles {

    DestinationPath = "C:\Deploy\HiddenFile.txt"
    
    Contents = "HiddenFile Contents"
    Attributes = "ReadOnly","Hidden","System"
    Ensure = "Present"

    }

    This should change the file attributes but it doesn't unless the file is manually deleted

    File resource does not allow modifications to the target without first having to delete the target.

    Example:
    File HiddenFiles {

    DestinationPath = "C:\Deploy\HiddenFile.txt"
    
    Contents = "HiddenFile Contents"
    Attributes = "ReadOnly"
    Ensure = "Present"

    }

    3 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 →
    investigating  ·  Mark Gray responded

    Josh,

    Thanks for the feedback. The file resource should set the attributes on an existing file. I have not been able to duplicate your issue in Windows 10. If you are still experiencing it, please add more details.

    Thanks,

    MarkG

  5. (WMF 4) Get-DscConfiguration fails to decrypt more than one credential

    Assume you have a DSC configuration which uses two or more resources, each of them having a PSCredential property. The credentials are encrypted using a certificate. The configuration is applied successfully to the target node. However, Get-DscConfiguration fails with the following error message:

    Get-DscConfiguration : Decryption failed.
    At line:1 char:1
    + Get-DscConfiguration
    + ~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (MSFT_DSCLocalConfigurationManager:root/Microsoft/...gurationManager) [Get-DscConfiguration], CimException
    
    + FullyQualifiedErrorId : Windows System Error -2146893819,Get-DscConfiguration

    Analyzing the problem using a trivial resource which only writes diagnostic messages, it seems the credentials are correctly decrypted for the first resource, but the LCM fails to decrypt them for the…

    3 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 →
  6. Allow multiple values for ConfigurationModeFrequencyMins of LCM (Local Configuration Manager)

    With a single value, now all settings in the DSC configuration are re-applied at the same interval.

    I would like to have some settings (may be non-critical) once , to be re-applied less frequently.

    This flexibility shall make LCM less stressed as well.

    3 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. Partial Configurations handled by the LCM is a terrible implimentation

    Frequency: Always Happens
    Regression: feature unavailable in previous versions.

    The current implementation of Partial Configurations is ... to put it mildly ... awful. By placing the actual merge of the various MOFs on the agent you create more problems than you solve:


    1. Adding new configurations, which can be of a consequence as simple as an existing configuration getting too large, now requires a complete reconfiguration of each node so the nodes are aware of the change.


    2. There is no way to do any kind of collision detection or configuration validation before it reaches the host, as the pull server does…

    3 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 →
  8. BUG: DSC resource name cannot start with a number if another resource depends on it

    I have a resource named [xHotfix]2012R2_April2014CU and if I use that in the depends on field for another resource, I get this error:

    Test-DependsOn : The format of the resource reference '[xHotfix]2012R2CU1' in the Requires list for resource '[xHotfix]2012R2April2014CU::[ContosoWindowsUpdates]SampleConfig' is not valid. A required resource name should be in the format '[<typename>]<name>', with alphanumeric characters, spaces, '', '-', '.' and '&#39;.

    If I add an alpha character to the resource name, then it generates correctly.

    xHotfix 2012R2_CU1

        {
    
    Path = &quot;$InstallRoot\WindowsUpdates\2012R2\Windows8.1-KB2919355-x64.msu&quot;
    Id = &quot;KB2919355&quot;
    Ensure = &quot;Present&quot;
    DependsOn = &quot;[WindowsFeature]DotNetFX3dot5&quot;
    }

    xHotfix 2012R2_April2014CU
    {
    Path =…

    3 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 →
    investigating  ·  Mark Gray responded

    Thanks for the feedback!

    We have looked into this issue and cannot seem to reproduce it in the latest builds WMF 5.0 RTM. Please try to reproduce it with the RTM bits and let us know if you still have the issue.

    Regards,

    MarkG

  9. Add PSValidFrom/PSValidTo common properties for DSC resources

    Votes from Connect: 10

    Original Date Submitted: 10/6/2015 1:58:16 AM

    Description:
    Contact Information
    Handle: PowerShellDon
    Site Name: PowerShell
    Feedback ID: 1871366


    Problem Description:
    Suggest adding a PSValidFrom and PSValidTo common property set (a la PSCredential). These would need to implicitly become part of the key when exporting the MOF. The idea is to help cover maintenance and task windows: From DateTime to DateTime, I want Service ___ Stopped; from DateTime to DateTime, I want it Started. So that becomes:

    Service BITS {
    Name=BITS
    Present=$True
    StartMode=Auto
    PSValidFrom=02:00:00UTC
    PSValidTo=21:00:00UTC
    }
    Service BITS {
    Name=BITS
    Present=$True
    StartMode=Disabled
    PSValidFrom=21:00:00UTC
    PSValidTo=02:00:00UTC
    }

    Considerations: DateTime could…

    3 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 →
  10. Devices.edb does not exists when WMF5 is installed prior to deploying DSC Pull Server

    Votes from Connect: 5

    Original Date Submitted: 4/29/2015 2:50:27 AM

    Description:

    Contact Information
    Handle: Ben Gelens
    Site Name: PowerShell
    Feedback ID: 1286605


    Frequency: Desired State Configuration (DSC)
    Regression: Install a clean Windows Server 2012R2 system.
    Install WMF5 Feb preview.
    Download and install xPSDesiredStateConfiguration module.
    Run configuration:
    configuration PullSRV
    {

    Import-DSCResource -ModuleName xPSDesiredStateConfiguration
    
    xDscWebService PSDSCPullServer
    {
    Ensure = &#39;Present&#39;
    EndpointName = &#39;PSDSCPullServer&#39;
    Port = 8080
    PhysicalPath = &quot;$env:SystemDrive\inetpub\wwwroot\PSDSCPullServer&quot;
    ModulePath = &quot;$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules&quot;
    ConfigurationPath = &quot;$env:PROGRAMFILES\WindowsPowerShell\DscService\Configuration&quot;
    State = &#39;Started&#39;
    CertificateThumbPrint = &#39;AllowUnencryptedTraffic&#39;
    }

    }
    Setup an simple config and add it to configuration repo using GUID.MOF and generate a checksum

    Problem Description:
    The…

    3 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 →
  11. PowerShell DSC needs to support "Property Sets"

    Votes from Connect: 12

    Original Date Submitted: 3/24/2015 8:05:35 AM

    Description:
    Contact Information
    Handle: Trevor Sullivan [MVP]
    Site Name: PowerShell
    Feedback ID: 1199561


    Problem Description:
    NOTE: I believe this functionality is already in progress, but I wanted to make sure it was documented in the official PowerShell feedback channel.

    PowerShell DSC Resources need the ability to support multiple "property sets" similar to the "parameter sets" that are

    Suggested implementation:


    1. Add a "PropertySetName" property to the [DscProperty()] attribute (eg. [DscProperty(PropertySetName = "PropertySet1", Key)]

    2. Add a private property (eg. $PropertySetName) to the [DscResource()] attribute, to ensure that the Get(), Test(), and Set()…
    3 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 →
  12. PowerShell ISE Intellisense does not work for Import-DscResource

    Votes from Connect: 9

    Original Date Submitted: 8/21/2014 11:08:39 PM

    Description:

    Contact Information
    Handle: Trevor Sullivan [MVP]
    Site Name: PowerShell
    Feedback ID: 951804


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

    Problem Description:
    NOTE: Please see attached video for example.

    When writing a PowerShell DSC configuration using the PowerShell ISE, and adding the Import-DscResource command to the configuration block, the PowerShell ISE does not show the Intellisense for parameter names or parameter values.

    Because there is no mention of Import-DscResource in the built-in PowerShell help, and because no documentation can be found in the Microsoft TechNet Library…

    3 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 →
  13. Fix Add-DnsServerResourceRecord TXT Records Limit

    When attempting to add a TXT DNS record via the "Add-DnsServerResourceRecord" command, the DescriptiveText property only accepts strings up to 254 characters but should support up to 255 characters. Ideally the command should accept an array for the DescriptiveText so that multiple lines of up to 255 characters can be passed through. Currently it requires using rn to insert a line break but over all must still be under 254 characters. This is an issue as we are trying to implement automation around TXT records and DKIM records tend to be well over this 254 character limit and require…

    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. ¿Pienso?

    Creo, que si los Hispano-Hablantes, pudiesen tener acceso a los comentarios e ideas que la gente detendrían mas de 1000.000.000, si en números, Por favor empecemos por respetar a todos, no solo los Anglo-Sajones, y la gente de sus colonias (coman GUEL ) lo pongo en Español, por dignidad, Creo (estoy, seguro) que pagan lo mismo.

    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 →
  15. Position of PowerShell window appears behind Windows taskbar when taskbar is at top

    Dynamically detecting the taskbar position, and dynamically modifying the starting position of the powershell window when opening powershell might be a good solution. I am on Windows 10 with three monitors. The taskbar is locked, not automatically hidden, taskbar is only shown on main display.

    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. [BUG] Configuration enact fails when resource instances of same type have different PSDscRunAsCredentials

    Take a look at the following configuration:
    $configurationData =
    @{

    AllNodes =
    
    @(
    @{
    NodeName = &#39;S16-01&#39;
    PsDscAllowPlainTextPassword = $true
    PSDscAllowDomainUser = $true
    }
    )

    }

    Configuration DSCRunDemo
    {

    param (
    
    [pscredential] $Credential
    )
    Import-DscResource -ModuleName PSDesiredStateConfiguration

    Node $AllNodes.NodeName
    {
    Script DSCRunDemo1
    {
    SetScript =
    {
    Write-Verbose -Message $(whoami)
    }
    TestScript =
    {
    return $false
    }
    GetScript =
    {
    return @{}
    }
    PsDscRunAsCredential = $Credential
    }

    Script DSCRunDemo2
    {
    SetScript =
    {
    Write-Verbose -Message $(whoami)
    }
    TestScript =
    {
    return $false
    }
    GetScript =
    {
    return @{}
    }
    }
    }

    }

    DSCRunDemo -ConfigurationData $configurationData -Credential (Get-Credential)

    One instance of the…

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

    We’ll send you updates on this idea

    investigating  ·  0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  17. DSC need to use full width of command processor in output

    DSC output is not respecting width of console and wraps text around despite full width is not utilized.
    Please see details here (https://github.com/PowerShell/PowerShell/issues/4030)

    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 →
  18. Get-TargetResource should not use 'Required' parameters

    I'm not sure why this is, but for some reason Get-TargetResource requires not only the 'Key' parameters, but also the 'Required' parameters. My understanding is only 'Keys' should be necessary to find an existing resource and the 'Required' parameters are necessary when you want to create/update/delete something related to a resource.

    This really makes no sense and will hinder our ability to build higher level tech on top of DSC. If I have the key values for any piece of data in any system, I should be able to retrieve it without any additional information.

    In almost all of the…

    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 →
  19. Message Cannot unprotect message. The input contained no encrypted content

    When upgrading to WMF 5.1, we are seeing errors in the DSC event log on servers that use a configuration with encrypted content (passwords). We are using encrypted credentials to create application pools and assign a service account as the identity. The data gets decrypted fine and the app pools get created with the correct identities. However the following error gets logged in the DSC event log every time a consistency check runs:

    Job :
    Message Cannot unprotect message. The input contained no encrypted content. Specify the '-IncludeContext' parameter if you wish to output the original content when no encrypted…

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

    We’ll send you updates on this idea

    investigating  ·  0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  20. Bug: DSC Decryption across Servers not Working

    On 2 Fully Updated Windows Server 2016 Machines running and provisioned from Azure I have created a Pull Server Configuration. I have created the DSC Signing Certificate using a custom template on a Enterprise Root CA which has worked for 2012R2 nodes and also tested using xDSCUtils New-xSelfSignedDscEncryptionCertificate. Using the same Certificate to Compile and Execute the MOF on the same Computer works, it is only if you compile on one and execute on another that the problems arise.
    I kept getting errors when passing in credentials. I therefore wrote a tiny custom DSC Resource that Displays the Password as…

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

    We’ll send you updates on this idea

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

Feedback and Knowledge Base