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. |
-
WMF 5.1 breaks class registrations for the ConfigMgr client agent
I've localized this issue to WMF 5.1 on Windows 7. With this installed, the WMI namespace: root\ccm\policy\defaultmacine\requestedconfig becomes invalid. This is important because in In-Place upgrade scenarios from Windows 7 to Windows 10, the task sequence agent cannot resume the task sequence without being able to read this namespace. I know this is a combination of WMF and ConfigurationManager so I will post there as well.
2 votesThis issue was recently reported via another channel, and is being actively investigated.
Don’t have an ETA at this time, but will update this thread as we learn more. -
[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 -
No StdOut output on console until second object
Let me explain. I have a script that is collecting data, and I send it to StdOut by simply piping it into Select (but problem also happens if I add a ForEach loop and simply make [PSCustomObject] objects). Then my script loops to the next server. That output is not displaying on the screen. All is not lost though, when the script loops to the second server and displays both the first and second will now display. When the third server finishes it displays OK, as does the 4th.
So it looks like it's just the first one. Normally I…
6 votesThanks, Martin! I’ll get a bug filed.
-
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,…
142 votesYour votes on this and other features helps us in our feature prioritization.
Thank you!!
MarkG
-
Find-Module and Install-Module does not get the modules from the custom nuget fileshare repositories though they are registered successfully
PS C:\Windows\system32> Get-PSRepository
Name InstallationPolicy SourceLocation
PSGallery Untrusted https://www.powershellgallery.com/api/v2/
TestRepo Trusted \NugetServer\BMNNuGet\packagesPS C:\Windows\system32> Find-Module * -Repository TestRepo
Version Name Repository Description
1.0.1 cConfigNode TestRepo Provides a way to manipulate nodes of the xml configu...
1.3.0 cNtfsAccessControl TestRepo The cNtfsAccessControl module contains DSC resources ...
3.2.0 xNetworking TestRepo Module with DSC Resources for Networking area
1.0.0 xReleaseManagement TestRepo Host a custom DSC Resource to transform files based o...
1.17.0 xWebAdministration TestRepo Module with DSC Resources for Web AdministrationPS C:\Windows\system32> Find-Module xNetworking -Repository TestRepo
PackageManagement\Find-Package : No match was found for the specified search criteria and module name 'xNetworking'. Try …2 votesSorry for the long lag in responding to this, all I can say is that we missed it.
This problem is not something we’re familiar with. If the problem is still repro’ing, please try re-running your commands with -Verbose, and attach the information to this thread.
One additional question that might help us: what version of the NuGet server are you using?
-
Powershell (self) update
It would be very helpful if we could update PowerShell to newest version through PS package manager or OS included script - with all dependencies and prerequisites checks.
8 votesThis is definitely something we’re thinking about and working towards. The question becomes whether it’s “good enough” to update all the built-in modules (like MS.PS.Utility or MS.PS.Management) via PowerShellGet or if we need to actually update PowerShell itself.
As we work on PowerShell Core on GitHub (https://github.com/powershell/powershell) we’re beginning to think about how more engine work might be abstracted into individual modules (which, again, could be updated async from the Gallery).
That being said, there also is probably some value in installing PowerShell Core all up via “Install-Package” or “Update-Package”. Given that PS Core is fully side-by-side enabled, you could slap down a new version of PowerShell Core next to the one from which you’re actually running PowerShell Core.
At the same time, updating Windows PowerShell (the Windows-only edition of PowerShell that sits on top of the full, .NET Framework) from within Windows PowerShell is significantly trickier…
-
Double click highlight occurrences
Double clicked strings and integers should be clearly highlighted (like in Notepad++ or in VSCode) if there are multiple occurrences of the same word or number.
48 votesWe’re not sure how much work this might be, but we’ll look into it.
Thanks,
Joey -
converting multiple lines of code to comment
Votes from Connect: 5
Original Date Submitted: 2/20/2015 2:01:32 PM
Description:
Contact Information
Handle: john.s2011n
Site Name: PowerShell
Feedback ID: 1139497
Frequency: Always Happens
Regression: Yes, this happens in all previous versionsProblem Description:
in PS 4.0 and also previous versions, there is no option to easily convert multiple selected lines to comment block. so when we have selected multiple lines & we want to make them as comment, we have to insert comment block in another location on the pane, and then cut these multiple lines and paste them inside comment block which is a bit cumbersome.
but in…82 votesHi John,
We’d like to do this at some point. We’ll post back here if it happens in the ISE Preview. Read more about it here: https://blogs.msdn.microsoft.com/powershell/2016/01/20/introducing-the-windows-powershell-ise-preview/
Thanks,
Joey -
Windows Update Provider for Powershell Package Manager
Votes from Connect: 3
Original Date Submitted: 6/1/2015 12:20:47 AM
Description:
Contact Information
Handle: Matt McNabb
Site Name: PowerShell
Feedback ID: 1386686
Problem Description:
Please distribute Windows Updates via a package provider. This will allow browsing and installing updates via existing cmdlets such as Find-Package and Install-Package.Product Studio item created by Connect Synchronizer due to creation of feedback ID 1386686 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=1386686).
Repro Steps:
Internal BugId: 14531
67 votesThanks for the suggestion. This is something we are investigating, but no decision has been made at this time.
-
ISE should provide an option to restore previously opened files at startup
When ISE starts up, it should by default (make that configurable: always, prompt, never) restore all files that were open in the previous session.
58 votesHi Stephane,
I assume you mean the same behavior as when the ISE crashes and recovers your session? I would also love to see this. We’ll post back here if/when it gets implemented.
Thanks,
Joey -
Allow Register-PSRepository to persist credentials
NuGet feeds allow security around both listing/retrieving packages as well as pushing packages. NuGet.exe and other clients further allow you to persist credentials for listing/retrieving packages using the "nuget sources" command. (https://docs.nuget.org/consume/command-line-reference#sources-command)
This persistence is important for two reasons:
1) When you push a package to a secured NuGet feed, NuGet clients generally do a list/read operation first. That list/read operation doesn't contain any API key that you pass along in the push operation. In order for a push to succeed with an API key, you also need to have credentials set for the read operation. You can…
33 votesThanks for the input. We are investigating this, but can make no commitment at this time.
-
[Bug] Install-Module -Force prompts for user input when NuGet-anycpu.exe is not present
Steps to reproduce:
- Install WMF5 RTM on a fresh Windows 2012 R2 system
- Open an Administrator PS prompt and run "Install-Module Pester -Force"
Expected result: The -Force parameter causes the NuGet client to be installed without user intervention.
Actual result: The following message is displayed:
NuGet-anycpu.exe is required to continue.
PowerShellGet requires NuGet-anycpu.exe to interact with NuGet based galleries. NuGet-anycpu.exe must be available in
'C:\Program Files\PackageManagement\ProviderAssemblies' or
'C:\Users\Administrator\AppData\Local\PackageManagement\ProviderAssemblies'. For more information about NuGet provider,
see http://OneGet.org/NuGet.html. Do you want PowerShellGet to download NuGet-anycpu.exe now?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"):The MSDN documentation for…
25 votesUnderstand the problem, will take a look at what we can do.
-
Option to disable scroll-to-prompt on left mouse click in ISE console window.
In PowerShell v3 there was a "feature" added, that moved cursor/ scrolled down to prompt whenever console window gets focus. It makes selecting text in output from previous commands a real nightmare.
I would love to get rid off this "feature", or if not possible - at least have an option to turn it off. If possible, make it a default behavior.
44 votesHi Bartek,
You’re right in that this is annoying. We will likely change the behavior as a bugfix. If anyone really, really likes the old behavior, we may decide to add an option to re-enable it.
Thoughts everyone?
Joey
-
PowerShell ISE VariableExplorer
Votes from Connect: 6
Original Date Submitted: 10/16/2015 2:00:41 PM
Description:
Contact Information
Handle: Gimli92
Site Name: PowerShell
Feedback ID: 1907258
Problem Description:
It would be nice to have a built in VariableExplorer in order to see and browse through all variables of the current PowerShell session.Product Studio item created by Connect Synchronizer due to creation of feedback ID 1907258 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=1907258).
Repro Steps:
Internal BugId: 15901
58 votesWe may evaluate this is a potential future add-on under the new ISE Preview model. Read more about the ISE Preview here: https://blogs.msdn.microsoft.com/powershell/2016/01/20/introducing-the-windows-powershell-ise-preview/
-
Would be better if the exit command in PowerShell ISE only closed the current tab
In PowerShell ISE, if you invoke the exit command, it closes the entire application regardless of how many tabs you have open. It would be better if the exit command simply closed the current tab (if you have multiple tabs open) or the entire application if you only have one runspace open. This would prevent accidentally closing runspaces that you wanted to go back to just because you used the all-too-familiar exit command.
Also, making this change would address this issue within PowerShell ISE: when you invoke exit, the Runspace.StateChanged event is only fired for the current/active runspace (tab), even…
20 votesSee David’s response below
-
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…
39 votes -
Out-GridView needs a -DisplayProperty parameter
Votes from Connect: 42
Original Date Submitted: 4/10/2015 11:19:28 PM
Description:
Contact Information
Handle: Trevor Sullivan [MVP]
Site Name: PowerShell
Feedback ID: 1238786
Problem Description:
The Out-GridView command displays all of the properties of each object that is fed into it. Consequently, in order to make the tool more usable, the Select-Object command can be used to inclusively filter the key properties of each object, to display to the end user. Unfortunately, this process results in a modified object, that cannot be used for all intended purposes.Instead of using Select-Object, a -DisplayProperty parameter should be added to Out-GridView, so…
32 votesThis is something we’d like to fix, but we’re still evaluating at a high-level how to make future improvements to Out-GridView.
Thanks,
Joey -
ISE hangs after using a Windows Forms dialog
Votes from Connect: 12
Original Date Submitted: 4/4/2015 8:50:49 AM
Description:
Contact Information
Handle: Arnoud Jansveld
Site Name: PowerShell
Feedback ID: 1224213
Frequency: PowerShell ISE
Regression: function Show-Form
{[reflection.assembly]::LoadWithPartialName("System.Windows.Forms") >$null
$form = New-Object System.Windows.Forms.Form
$label = New-Object System.Windows.Forms.Label
$label.Text = "Please close this form"
$label.AutoSize = $true
$form.Controls.Add($label)
$form.ShowDialog()}
$result = Show-Form
Workaround (slow):
$result = Start-Job ${function:Show-Form} | Receive-Job -Wait -AutoRemoveJob
"Form result: " + $result.ToString()
Write-Warning "The following step may hang PowerShell ISE, save your work!"
Read-Host -Prompt "Hit Enter or Ctrl-C to abort"This generates a WM_SETTINGCHANGE broadcast message
Problem Description:
After using ShowDialog() to…30 votesThanks for the report! We’re looking to see if this can get fixed in a future release of ISE Preview: https://blogs.msdn.microsoft.com/powershell/2016/01/20/introducing-the-windows-powershell-ise-preview/
-Joey
-
Find in ISE needs to be able to wrap rather than stopping when it reaches the end of the file
Find in ISE starts from the cursor position and stops at the end of the file. This is extremely annoying behavior since to perform a full file search you need to move the cursor to the beginning of the file before beginning "Find".
Find needs the ability to find within an entire file from anywhere the search is started -- just like notepad++, notepad2, and any other modern text editor.
20 votesHi Adam,
You’re right, that’s really annoying. We’d like to do it as some point in the ISE Preview: https://blogs.msdn.microsoft.com/powershell/2016/01/20/introducing-the-windows-powershell-ise-preview/
Thanks,
Joey -
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.
- Don't see your idea?