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

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

    AllNodes =
    
    @(
    @{
    NodeName = 'S16-01'
    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 →
  2. [BUG] Cannot import both PSDesiredStateConfiguration in-box module and PSDscResources (gallery module) in the same configuration

    OS: Windows Server 2016 1607 (14393.1593)
    PSVersionTable:
    Name Value


    PSVersion 5.1.14393.1532

    PSEdition Desktop

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

    BuildVersion 10.0.14393.1532

    CLRVersion 4.0.30319.42000

    WSManStackVersion 3.0

    PSRemotingProtocolVersion 2.3

    SerializationVersion 1.1.0.1

    PSDscResource module: v2.8.0.0

    Take a look at this configuration:
    Configuration DependentConfig
    {

    Import-DscResource -ModuleName PSDscResources -Name Registry
    
    

    Node MyNode01
    {

    File SetupScript
    {
    DestinationPath = 'C:\Scripts\hello.txt'
    Contents = 'somecommand'
    Type = 'File'
    Ensure = 'Present'
    DependsOn = '[Registry]regCheck'
    }

    Registry regCheck
    {
    Key = 'HKEY_LOCAL_MACHINE\SYSTEM\SomeKey'
    ValueName = 'SomeValue'
    ValueData = 0
    ValueType = 'DWord'
    Ensure = 'Present'
    }
    }

    }

    DependentConfig -OutputPath C:\DependentConfig

    This requires PSDscResources module version 2.8.0.0 from the gallery…

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

    We’ll send you updates on this idea

    investigating  ·  4 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  3. 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 →
  4. 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 →
  5. partial

    Hi all,
    I am using DSC partials to create role-based architectures with Azure virtual machines.
    When switching to Windows 2016 (everything works great on Windows 2012 R2), I get errors when DSC is compiling the MOF.
    The idea is that I have multiple partials that contain the same Windows Feature installation, because it's needed for a certain roles. When I apply more roles on the same machine, the partials need to merge. So I have one partial that contains this:

        WindowsFeature DotNetFrameworkRole1
    
    {
    Name = 'AS-NET-Framework'
    }

    and another partial that contains this:

        WindowsFeature DotNetFrameworkRole2
    
    {
    Name = 'AS-NET-Framework'
    }
    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    investigating  ·  1 comment  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  6. Bug? Invoke-DscResource and PsDscRunAsCredential in WMF5

    Hi Powershell Team,

    When I try to invoke the get method for a custom DSC resource using PsDscRunAsCredential, I get an error. This does not happen with either the set or test methods.

    The same custom resource works fine in a normal configuration though. I'm not sure if that's because the get method is not called there.

    Setup:
    Windows Server 2012 R2
    WMF5 RTM

    PS C:\Users\username> Invoke-DscResource -Name cWhoAmI -Method get -ModuleName cWhoAmI -Property $props -Verbose
    Invoke-DscResource : The PowerShell DSC resource returned results in a format that is not valid. The results from
    running Get-TargetResource should be in a…

    1 vote
    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

    Thanks for the feedback Antonio! We will look into this and create a bug when we reproduce the issue. If we need more information we will request it from you here.

    Regards,

    MarkG

  7. DSC File Resource Recurse directory description is wrong

    The documentation for the DSC File Resource states that the Recurse is a) only valid for directories and b) only for sub-directories. This would imply that any files in a SourcePath would be copied. However, they are not. $Recurse has to be $true to pull files. If not, it just makes sure the directory exists.

    However, this requires that I have the whole recursive directory kept on my sourcepath as well vs. just a few files.

    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 →
  8. Allow LCM to accomodate module dependencies that get installed by earlier steps in the configuration

    Currently, if you have a configuration that installs a Windows feature then has another step that configures settings using a module that gets installed with that particular feature, the LCM fails its check because that module is not currently present on the node.

    For example, we have a configuration that installs the Web-Server role. There are later steps which use the xWebAdministration resource to configure things like Application Pools and Application Pool defaults. The problem is, when the LCM pulls the configuration and runs it's checks, it fails because the xWebAdministration resource uses cmdlets that are present in the WebAdministration…

    16 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

    Thanks for the feedback! This behavior is not by design and is not something I have ever seen before. We will look into it and get back with an answer or more questions.

  9. 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

  10. DSC ESENT Database management

    In a recent change, the new database for the on-prem Pullserver is now ESENT. Had a question for clarification.

    As an old Exchange guy, I have fears that immediately pop into mind. The logs files do not appear to be using circular logging (a way of self cleaning and restricting the amount of log files) – Is this true?

    If so, then I’m guess that the log files will continue to grow until the disk is full – which happens to exchange if the log files are not truncated. Is there a way today or in the future we will…

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

    We’ll send you updates on this idea

    investigating  ·  5 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  11. KB3000850

    KB3000850 is not part of the Azure SQL 2014 image, and takes over an hour to install (often timing out) before DSC Extension can run. When update fails to install, causes DSC to fail as well. Easy to reproduce - configure VM image based on SQL 2014 and install DSC using templates.

    1 vote
    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 →
  12. Enable PowerShell module auto-discovery in DSC

    I recently discovered that in my DSC resource I can't call a powershell cmdlet that internally calls into another powershell cmdlet - that fails because DSC doesn’t explicitly import the full powershell module, but only imports specific .psm1 files.

    Note, same (cmdlet calling another cmdlet) works perfectly fine when executed from Powershell cmd prompt. Let's fix it for DSC.

    12 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

    Thank you for your feedback!

    Based on its current ranking compared to other feedback items and product schedule, work on this item is pending (and will be driven by) further customer input. If you did not open this issue and are also impacted by it, please vote this item up.

    MarkG

  13. Officially release more DSC Resources

    We only have around 12 officially released DSC resources. I had expected PowerShell V5 would include more officially supported resources, but it was not to be. Please releae them, preferably via Windows Update.

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

    We’ll send you updates on this idea

    6 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →

    What would you describe as “official”? We are moving forward with some of the x-named DSC resources in the Gallery, with the intent of removing the x and fully supporting them once they hit a certain level of quality. Is that sufficient?

  14. Test-DscConfiguration fails once running against remote machine

    Having the following script:

    configuration SimpleConfig2
    {

    Import-DscResource –ModuleName 'PSDesiredStateConfiguration'
    
    

    node $remoteCommputer
    {
    Environment TestVersion
    {
    Ensure = "Present" # You can also set Ensure to "Absent"
    Name = "TestEnvironmentVariable"
    Value = "TestValue2"
    }
    }

    }

    SimpleConfig2

    Start-DSCConfiguration -Path "SimpleConfig2" -Force -Wait -ComputerName $remoteCommputer -Credential $g_AutomationDefaultVMAccounCred -verbose

    $result = Test-DscConfiguration -Path "SimpleConfig2" -ComputerName $remoteCommputer -Credential $g_AutomationDefaultVMAccounCred

    The config is applied correctly, yet Test-DscConfiguration fails with the following message:

    The configurationData parameter is reserved for future use. The current configuration is used by default.

    + CategoryInfo          : InvalidArgument: (root/Microsoft/...gurationManager:String) [], CimException
    
    + FullyQualifiedErrorId : MI RESULT 4
    + PSComputerName : target-machine
    1 vote
    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

    Anton,

    I am not able to reproduce your issue. What PS / WMF version are you running into this on? Also what OSes are running on the local and remote machines?

    MarkG

  15. If module version is not specified, composite configurations fail to load

    BUG
    Version occurs in: WMF5 Production Preview
    Previous versions? No.

    In a composite configuration scenario, if one of the composite resources contains an import-dscresource statement, and multiple versions of the module are available, the resource fails to load unless a moduleversion is specified.

    The resource works fine if there is only one version available on the machine in question, or a minimum version is specified.

    1 vote
    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

    Justin,

    This behavior is common to all DSC resources, if I understand your issue correctly. If there are multiple versions of a module installed on your authoring system, you must specify the version that you intend to use in your configuration.

    What behavior are you expecting?

    MarkG

  16. Multiple ConfigurationNames Results In Failure During Pull

    When multiple configurations names are specified in LCM configuration the pull fails get obtain any configuration.

    LCM Config Example

        ConfigurationRepositoryWeb HillIntl-Pull
    
    {
    ServerURL = &quot;<a rel="nofollow noreferrer" href="http://server1:8080/PSDSCPullServer.svc&quot;">http://server1:8080/PSDSCPullServer.svc&quot;</a>;
    AllowUnsecureConnection = $true;
    RegistrationKey = &quot;aaaa333-6c83-4636-a0cb-39b88a968849&quot;;
    ConfigurationNames = @(&#39;BaseConfig&#39;,&#39;WebServer&#39;);
    }

    Resulting errors

    Job {C7312E94-D405-11E5-80B5-00155D086627} :
    Message UpdateMetaConfig is not a valid value for GetActionResponse.
    HResult -2146233087
    StackTrack at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
    at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()
    at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()

    Job {C7312E94-D405-11E5-80B5-00155D086627} :
    This event indicates that failure happens when LCM is trying to get the configuration from pull server using download manager NULL. ErrorId is 0x1. ErrorDetail is A generic exception occurred during…

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

    We’ll send you updates on this idea

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

    Thanks for the feedback Daniel. We are looking into the issue and will either get back to you with any follow-up questions or create a bug and fix the issue.

    Thanks for helping make DSC better!!
    MarkG

  17. 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

  18. BUG : WMF5 RTM Pull Server HTTPS

    I have setup new DSC Pull Server HTTPS with WMF 5 RTM on Windows server 2012 r2 .

    Any client with WMF 5 RTM installed is able to pull configuration from Pull Server without certificate installed on the machine .

    Even if AllowUnsecureConnection is set to $false in LCM .

    I have tested that on WMF 4.0 machines and I'm getting error if the certificate is not presented .

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

    Mariusz,

    Thanks for the feedback!

    We are attempting to investigate this issue but need more details from you in order to make progress.

    Is the issue that you are running into as follows:
    - WMF 5. based DSC Pull Server configured with HTTPS and server certificate installed properly. I assume this is not a certificate issued by a trusted authority, correct?
    - A WMF 5.0 RTM client does not have the trusted SSL certificate installed in the trusted root folder and the client is able to successfully connect to the Pull Server.
    - A WMF 4.0 client fails to connect when it does not have the trusted root cert installed.

    Please let us know if this is or is not what you are experiencing.

    Thanks, again,

    MarkG

  19. Service DSC resource should not have a default $State

    The Service DSC resource defaults to state = running. It would be great to be able to say "I want to make sure the service is installed, but I don't care what state it's currently in."

    1 vote
    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

    Thanks for the feedback!

    We will take this into consideration in a future release.

    MarkG

  20. 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.

← Previous 1
  • Don't see your idea?

Feedback and Knowledge Base