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. Allow DSC Reports to include ResourcesNotInDesiredState that were corrected during a consistency check

    Currently if a node is set up to ApplyAndAutoCorrect, when the report is sent back to the report server, there is no reference to any resources that were out of desired state at the time of the consistency check. DSC will just put them back in desired state without reporting what it did. For compliance reasons, we would like to be able to query the report server to see if any resources had to be put back into desired state.

    24 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 →
  2. DSC registry resource support '/' in the registry path.

    DSC registry resource support '/' in the registry path.

    If you use a path containing a / e.g. "HKEYLOCALMACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC2 40/128" then the builtin registry resource you end up with an error or the wrong registry path being created.

    This config will not work. I've have to create my own module to create the folder and then us the registry resource to create the actual key.

        Registry "DisableCipherRC240128"
    
    {
    Key = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC2 40/128"
    ValueName = "Enabled"
    ValueType = "Dword"
    ValueData = "0"
    Ensure = "Present"
    Force = $true
    }

    The register resource should support / in the path.

    5 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. Node with large configurations fails to send status report to the Report Server

    Testing out WMF 5.0 and when I tried one of our existing configurations, which has a good amount of resources in it, the following error is logged in the event log after each consistency check:

    Job {%JobID%} :
    Http Client {%AgentID%} failed for WebReportManager for configuration The attempt to send status report to the server https://johntestx02/PSDSCPullServer.svc/Nodes(AgentId={%AgentID%}')/SendReport returned unexpected response code RequestEntityTooLarge..

    I assume this is because of the amount of resources the node is trying to report on back to the report server. Has anyone else run into this? Can the Report Server configuration be adjusted to accept lager amounts…

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

    We’ll send you updates on this idea

    survey  ·  3 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  4. There is no step by step documenation in place how to install SQL server using xsqlps module

    There is no step by step documenation in place how to install SQL server using xsqlps module

    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 →
  5. DSC should have an isolated mode which allows multiple concurrent configurations and Node localhost without altering the LCM

    Here's the situation: We are an ISV and want to run some automated tests for our product, and we want them to run in an environment that we can just throw away and rebuild. We've got a bunch of Fitnesse tests, but we want an automated way to install the product and run the tests from a build definition. We want to be able to do several of these at once, with different builds pointing to different environments.

    DSC has some awesome capabilities but there are some ways it falls down in this regard. The most critical of these is…

    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 →
  6. 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 →
  7. Invalid MOF generated if File resource used with contents that contain ModuleVersion=*** string

    A simple DSC File resource usage:

    Configuration CopyCustomResourceProviders {

    Import-DSCResource -ModuleName @{ModuleName="PSDesiredStateConfiguration"; ModuleVersion="1.1"}
    
    

    Node $nodeName {
    File test {
    DestinationPath = "$pshome\Modules\empty"
    Contents="ModuleVersion='1.2'"
    }
    }

    }
    This generates invalid MOF content:

    instance of MSFTFileDirectoryConfiguration as $MSFTFileDirectoryConfiguration1ref
    {

    ResourceID = "[File]test";
    
    Contents = "ModuleVersion='1.2'";
    DestinationPath = "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Modules\\empty";
    ModuleName = "PSDesiredStateConfiguration";
    SourceInfo = "C:\\Source\\CoreDev\\Trunk\\Provisioning\\CopyCustomResourceProviders.ps1::34::4::File";

    ConfigurationName = "CopyCustomResourceProviders";

    };

    And the following error occurs on the command line when trying to push this configuration:

    VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
    root/Microsoft/Windows/DesiredStateConfiguration'.
    VERBOSE: An LCM method call arrived from computer WSDING037 with user sid…

    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. 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 →
  9. 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 →
  10. LCM Extensible Architecture - PowerShell

    Type: Feature Request
    Summary: Make LCM extensible simply by adding a psm1 in a folder, which will be loaded automatically.
    Details here: https://github.com/gaelcolas/LCM_ExtensibleArch

    Here's the workflow:
    1. LCM loads a psm1 file(s) from a pre-defined directory (or defined in LCM meta-configuration).
    2. Every LCM events are triggered and forwarded into the extensions' session
    3. $Global variables of the extension should be accessible from the Test/Set/Get methods of the DSC Resource
    3. The author of the PSM1 extension register-EngineEvent for required LCM Events
    4. He defines Event Handlers Actions that can call psm1's exported functions

    Having this extensible architecture would allow…

    25 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 →
  11. Add a GET function to DSC Report Server Webservice

    Add a GET method to the DSC webservice so that we can query the database for data other than individual node data which you have to know the Agent ID. If I want to build status dashbaord for all of my DSC nodes I then have to store and manage Agent ID's in another CMDB so I can query the webservice individually for each agent status. We used to have this capability in WMF 4 but it seems this is no longer possible with the reporting changes in WMF 5.

    See https://github.com/PowerShell/xPSDesiredStateConfiguration/issues/98
    and https://github.com/dfinke/ODataExplorer/issues/1

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

    Thanks for the feedback, Sebastian! I have changed the status to survey to get a better feel for how important this is for customers in general.

    MarkG

  12. Bug: DSC ServiceResource cannot start service that takes over 2 seconds to start

    Services can take an arbitrary amount of time to start. The ServiceResource DSC is hard coded to only allow 2 seconds. This makes this task useless for most of my work.

    function StartService
    <SNIP>

    if($PSCmdlet.ShouldProcess($svc.Name,$LocalizedData.StartServiceWhatIf))

    {
    
    try
    {
    $svc.Start()
    $twoSeconds = New-Object timespan 20000000
    $svc.WaitForStatus(&quot;Running&quot;,$twoSeconds)
    }
    catch
    {
    $servicePath = (Get-WmiObject -Class win32_service | where {$_.Name -eq $svc.Name}).PathName
    $message = $LocalizedData.ErrorStartingService -f $svc.Name,$servicePath,$_.Exception.Message
    ThrowInvalidArgumentError &quot;ErrorStartingService&quot; $message
    }

    Write-Log ($LocalizedData.ServiceStarted -f $svc.Name)
    }

    9 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 →
  13. 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 →
  14. Bug when running GET-DSCConfiguration on windows10 build 1511

    I'm getting an error while running get-dscconfiguration in client pull mode with very simple configuration (one WindowsOptionalFeature resource)

    PS C:\windows\system32\Configuration> Get-DscConfigurationStatus

    Status StartDate Type Mode RebootRequested NumberOfResources


    Success 03.08.2016 08:34:43 Consistency Pull False 1

    PS C:\windows\system32\Configuration> Get-DscConfiguration
    Get-DscConfiguration : GetConfiguration did not succeed.
    At line:1 char:1
    + Get-DscConfiguration
    + ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (MSFT_DSCLocalConfigurationManager:root/Microsoft/...gurationManager) [Get
    -DscConfiguration], CimException
    + FullyQualifiedErrorId : MI RESULT 1,Get-DscConfiguration

    Related event:
    Job {4F79900F-5941-11E6-BBD9-D8CB8A17BF71} :
    Message Nie można rzutować obiektu typu (cannot cast) 'System.Management.Automation.PSObject' na typ 'System.Object[]'.
    HResult -2147467262
    StackTrack w System.Management.Automation.LanguagePrimitives.ConvertToT
    w Microsoft.PowerShell.DesiredStateConfiguration.Internal.ResourceProviderAdapter.GetPSObjectArrayValue(CimType cimType, Object propertyValue)
    w Microsoft.PowerShell.DesiredStateConfiguration.Internal.ResourceProviderAdapter.GetTargetResource(IntPtr resourceConfigurationInstanceHandle, IntPtr nonResourcePropetiesHandle, IntPtr metaConfigHandle, IntPtr…

    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 →
  15. Shared Partial Configurations (ConfigurationNames) and encrypted credentials.

    At the moment to use encrypted credentials in partial configurations with ConfigurationNames it is necessary to share certificate across all nodes, else decryption will fail. I believe it should be technically possible to use more dynamic approach:
    - encrypt MOF with certificate for which pull server has private key
    - during registration client would send over certificate for which it has private key so that pull server can encrypt any credentials in the mofs sent to this node with this certificate.

    At the moment it's manual labour on the operators side: make sure that encrypt/decrypt just works. It would be…

    18 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 →
  16. 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

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

  18. 4 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. 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 →
  20. DSC Pullserver database and High availability

    As a suggestion – would it be possible to let us configure the on-prem Pullserver to use a separate database rather than the ESENT one located on the Pullserver. This would solve the issues around high availability and those databases.

    I’m thinking it would be great to configure multiple Pullservers to use a backend database as we would do for any other web application. Then we could separate the load balancing of the Pullserver from the Database availability.

    Thanks for considering!!

    15 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 →
  • Don't see your idea?

Feedback and Knowledge Base