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. |
-
[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 PSDesiredStateConfigurationNode $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 -
Add maintenance window awareness to DSC / LCM
Votes from Connect: 17
Original Date Submitted: 8/13/2015 12:17:49 AM
Description:
Contact Information
Handle: PowerShellDon
Site Name: PowerShell
Feedback ID: 1659904
Problem Description:
Suggestion one:Add maintenance window awareness to the Local Configuration Manager. Edited via metaconfig, it specifies times when configuration changes are acceptable, when automated reboots are acceptable. Further automates configuration maintenance especially when you're implementing changes vs. correcting drift.
Suggestion two:
Add universal "DoNotImplementBefore" and "ImplementBy" settings to DSC resources. Just as "Present=" specifies to add/remove something, these would indicate a date/time for the setting to become valid (e.g., "we want to implement a bunch of changes,…
137 votesYour votes on this and other features helps us in our feature prioritization.
Thank you!!
MarkG
-
Convert Group Policy to use PowerShell DSC
I think it's time for an overhaul of Group Policy and GP Preferences. You can still keep the GUI to allow everyone to have something familiar, but I would love to see if Group Policy can be converted to start using PowerShell DSC under the hood. I think this would make things much simpler in terms of deployment and wouldn't require logon/logoff or restarts anymore (unless you wanted a script to run at those times). For everything else like IE/Edge settings, registry settings, mapped drives/printers, desktop backgrounds and such I think having everything exposed in PowerShell would both make it…
22 voteshttps://github.com/microsoft/baselinemanagement might be useful. It explicitly has “ConvertFrom-GPO”. It doesn’t support all GP resources yet, though.
-
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-machine1 voteAnton,
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
-
[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.1PSDscResource 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 -
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 -
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 -
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 -
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 -
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 RTMPS 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 voteThanks 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
-
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 votesThanks 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.
-
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 voteI’ve filed an internal bug for this, but in the future you can submit issues and fixes directly against our documentation here: https://github.com/PowerShell/PowerShell-Docs
-
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 votesJosh,
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
-
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 votesThank 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
-
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 votesWhat 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?
-
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 voteInvestigating. Thanks for the report.
-
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 = "<a rel="nofollow noreferrer" href="http://server1:8080/PSDSCPullServer.svc"">http://server1:8080/PSDSCPullServer.svc"</a>;
AllowUnsecureConnection = $true;
RegistrationKey = "aaaa333-6c83-4636-a0cb-39b88a968849";
ConfigurationNames = @('BaseConfig','WebServer');
}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 votesThanks 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 -
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 voteJustin,
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
-
Execute indepenent dsc steps in parallel
Votes from Connect: 3
Original Date Submitted: 6/8/2015 2:40:45 PM
Description:
Contact Information
Handle: aL3891
Site Name: PowerShell
Feedback ID: 1411231
Problem Description:
At the moment all dsc resources are executed serially. given that dependencies are allready specified, it would in theory be safe to execute steps in parallel.I'm guessing this is planned at some point but i could really use a way to enable parallel execution because I'm using dsc to spin up test environments with a bunch of services and having those being set up in parallel would speed things up considerably.
Product Studio item created by…
35 votes -
Add MaintenanceWindow paramters to PartialConfiguration DSC
Votes from Connect: 4
Original Date Submitted: 12/13/2014 2:03:27 AM
Description:
Contact Information
Handle: RobCannon
Site Name: PowerShell
Feedback ID: 1053308
Frequency: Always Happens
Regression: Yes, this happens in all previous versionsProblem Description:
I would like to a parameter in a PartialConfiguration section to specify a time period.Some configurations would always be running and could fix configuration drift. But other configurations (that would cause a service disruption if applied) could be target to only run during a specified maintenance window. The window parameter should allow you to specify a time window and either a day of the week…
12 votes
- Don't see your idea?