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. |
-
Compiling large number of DSC MOF files is slow
We use logic to dynamically compose a ConfigurationData structure and pass it to the configuration. This logic executes quickly. Calling the configuration generates more than 5,000 MOF files for unique nodes. The process takes 1.5 hours on modern server-class hardware with 16GB RAM. Also, the MOF files are all created at the end of the process, rather than one-at-a-time throughout the process. This causes high memory usage. Please optimize the PSDesiredStateConfiguration module to generate large quantities of MOF files more quickly. This issue adds significant delay to the DSC pipeline.
7 votes -
Curated Module Lists
The PowerShell gallery should allow users to create "lists" of modules (think of it as an Amazon wish list).
A user could create a "favorites" list and add modules and scripts to it to keep track of their favorites over time (maybe even "subscribe" to notifications of new releases of things on the list).
A user could also create a "user management modules" list or a "stretching PowerShell's limits" list or a "should have been in the box" list, or a "things I use in my prompt" list ...
But most importantly, users should be able to SHARE those lists,…
11 votes -
Bug: Get-DscConfigurationStatus doesn't show all resources/configurations
We started to use results from Get-DscConfigurationStatus in our monitoring (SCOM) and while analyzing the results we noticed that some partials are not showing up in the results of this command even though tests/set/get is performed on the target node. After analyzing different methods we found out that:
* MOF documents generated in C:\Windows\System32\Configuration\ConfigurationStatus seem to limit the results to ~40 last items in DSC configuration
* Get-DscConfigurationStatus and Test-DscConfiguration -Detail all use the same source of information, thus provide same, truncated output
* The only reliable source of information is details.json file generate when -Verbose output is requested, but…6 votesThanks for bringing this to our attention Bartek. We need some more information so will work with you offline and will update status here when we have it.
MarkG
-
Allow Environment Variable as default value for function parameter.
When defining a function, I would like to use an environment variable as the default value. If the environment variable exists and has a value that value will be used. For example,
function Get-Info ([Alias("name")] [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [string] $projectName = $env:Project_Name)
{
}Instead of having to passing in the Project Name for each call I would like to store it in an environment variable. When I do it would allow me to call Get-Info with no parameters and the value in the environment variable would be used. If the environment variable does not exist or is empty the user…
13 votesInteresting! As you say, there’s obviously workarounds here, but that syntax would make things easier. I don’t immediately have an edge case that adding this would break, but it miiiight exist.
Would one of you be so kind as to write up Adam’s generalized suggestion in a GitHub Issue at https://github.com/powershell/issues where the language is currently being developed.
-
WinUserLanguageList : InputMethodTips has been documented as Read\Write but is only Read
PS C:\Users\Administrator> $objLanguageList=New-WinUserLanguageList -Language us-US
PS C:\Users\Administrator> $objLanguageList[0].InputMethodTips="0409:0000040C"
'InputMethodTips' is a ReadOnly property.
At line:1 char:1
+ $objLanguageList[0].InputMethodTips="0409:0000040C"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyAssignmentExceptionPS C:\Users\Administrator> $objLanguageList |Get-Member -Name InputMethodTips
TypeName: Microsoft.InternationalSettings.Commands.WinUserLanguage
Name MemberType Definition
---- ---------- ----------
InputMethodTips Property System.Collections.Generic.List[string] InputMethodTips {get;}PS C:\Users\Administrator>
1 vote -
DynamicParam should recognize quoted string arguments (at least single quoted)
Using PSVersion 5.1.14393.576
Allowing quoted literals would be useful to allow argument values spaces.
Function Show-DynamicParam {
[CmdletBinding()]
Param(
[Parameter()]
[string]
$Test
)DynamicParam {
if ($Test -ine 'test') {
throw "Does not work. Value was '$Test'"
}
$ParameterDictionary = New-Object System.Management.Automation.RuntimeDefinedParameterDictionary
$Parameter = New-Object System.Management.Automation.RuntimeDefinedParameter('works', [switch], [System.Management.Automation.ParameterAttribute]::new())
$ParameterDictionary.Add('works', $Parameter)
return $ParameterDictionary
}Process {
}}
# when using an argument literal the -works switch appears
Show-DynamicParam -Test test -works# when using a string literal the value of $Test is 'test' WITH the quotes, see $Error[0]
Show-DynamicParam -Test 'test' -1 vote -
MSFT_WebDownloadManager issue
Hi there,
Please advise on the following failure I am facing while trying to apply DSC changes on the remote machine:
"
PS C:\Windows\system32> Set-DscLocalConfigurationManager -Path .\LCMPullMode
Undefined class: MSFT_WebDownloadManager
At line:15, char:2
Buffer:
Connection = True;
};^
ins
+ CategoryInfo : SyntaxError: (root/Microsoft/...gurationManager:String) [], CimException
+ FullyQualifiedErrorId : MiClientApiError_Failed
+ PSComputerName : be-lab-v17
"Thanks in advance,
Ofer1 vote -
Add a rich GPO provider
I'd like to see a good, rich GPO provider. One that would allow me to do a set-location to some node in any .ADM/.ADMX we have loaded, would allow me to load/remove ADMXs from scope, and get/set/new any value.
The idea is to enable IT Pros to automate fully any setting in any GPO object.
2 votes -
Get-AppxPackage not accepting pipeline input
The Get-AppxPackage command does not appear to accept pipeline input.
These work:
Get-AppxPackage -Name "9E2F88E3.Twitter"
Get-AppxPackage "9E2F88E3.Twitter"
"9E2F88E3.Twitter" | Foreach { Get-AppxPackage $_ }
These do not work and return nothing at all:"9E2F88E3.Twitter" | Get-AppxPackage
"9E2F88E3.Twitter" | Select @{ Name="Name"; Expression={$_} } | Get-AppxPackageUsing the -Verbose parameter simply gives:
VERBOSE: No packages found.
1 vote -
Property UserName and UserGroupName of Add-PswaAuthorizationRule command don't work
OS : Windows Server 2016
The command prompt an error when I add authorization rule in PowerShell Web Acces. It's syntax error : "domain/user".
But, this is my commande :
Add-PswaAuthorizationRule -ComputerName SRVDC01 -UserName 'FRPSUG\Test' -ConfigurationName Microsoft.PowerShellIt's same issue with group, no quote, simple quote, double quote, local user...
1 vote -
WhatIf switch does not work on cmdlet Install-AdcsCertificationAuthority
The whatif switch is not working when installing a ADCS with the cmdlet Install-AdcsCertificationAuthority. The cmdlet is executed in full.
I blogged about it here:
https://mssec.wordpress.com/2016/02/18/installing-ca-via-powershell-whatif-not-working/
Jeffery Snover himself asked me on Twitter to submit a bug reort on this, see here:
https://twitter.com/jsnover/status/8275241674655252491 vote -
Bug: Final line of Format-Hex output repeats previous line after EOF
When using Format-Hex ( PowerShell version 5.0.10586.672 as returned by $PSVersionTable.PSVersion ), at least with the "-path" parameter, the final line of output -- if more than 1 line of output -- will duplicate the previous line's characters, starting with the first position after the final character of the file.
Meaning, if there are two rows of output ( each row displaying 16 characters ) and the file naturally ends at the third character position (i.e. "02") in the second (and final) row, then character positions 4 - 16 (i.e. "03" - "0F") will duplicate character positions 4 - 16…
1 vote -
BUG: Set-Clipboard -AsHtml puts invalid CF_HTML on clipboard with non-ASCII text
Repro with PowerShell 5.1.14986.1000:
1) Set-Clipboard -AsHtml "abc"
2) Paste into Word
3) Text appears correctly as: abc
4) Set-Clipboard -AsHtml "àbc"
5) Paste into Word
6) Text appears incorrectly as: ࢣAppears CP 1251 text is being put in the CF_HTML, not UTF8.
1 vote -
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…
3 votesThanks, Martin! I’ll get a bug filed.
-
1 vote
-
PowerShell Classes: methods with hyphenated names - of course
Good evening
We really miss the days where Microsoft followed its own best practices.
We all know - and most love - the verb-noun naming convention in PowerShell.
Therefore, we have the very basic question:
Why isn't it allowed to create verb-noun method names in PowerShell classes??
(hyphenated names are not allowed)This is really annoying, because we are forced to break the naming conventions.
Kind regards,
Tom1 vote -
Multi Line description passes Test-ScriptFileInfo but fails to publish
When I tried to publish the script https://raw.githubusercontent.com/SQLDBAWithABeard/DataScienceVM/master/New-WindowsDataScienceVM.ps1 it fails with missing description but passed the Test-FileScriptInfo prior to me trying
1 voteWe’re investigating this. Can you please include the error message you received?
Also, we may need the following info – please include the output from
$psversiontable
get-packageprovider -
new-smbmapping: finally fix the bug so that Windows Explorer recognizes the new drives without kill & restart
Good evening
Since years(!), it's well known that if we map SMB Shares using the New-SmbMapping command,
then the Windows Explorer does not recognize the new Drives: we have to kill and restart explorer.exe.
Well, we can be happy that we do not have to reboot...We can not believe that this bug was never fixed and that we have to raise our user voice to solicitation so that such annoying bugs get finally fixed.
Of course, we could use the New-PSDrive command.
Unfortunately, this command is even worse: it does not validate if the credentials are valid nor if…1 vote -
Add KeepCDC flag to Smo.Restore class
Gets or sets a Boolean property value that specifies whether to maintain a change data capture configuration during a restore operation.
4 votes -
WMF 5.1 RestrictedRemoteServer session type fails to import the 'Microsoft.PowerShell.Utility' module
When importing this module in a restricted session type or when making a function or a cmdlet from this module visible, i.e:
VisibleFunctions = 'Get-FileHash'
the following message is returned:
WARNING: The 'Microsoft.PowerShell.Utility' module was not imported because the 'Microsoft.PowerShell.Utility' snap-in was already imported.
In practice, the module is not being imported.
Get-PSSnapin shows that a snapin with the same name is indeed loaded:
Name : Microsoft.PowerShell.Utility
PSVersion : 5.1.14409.1005
Description : This Windows PowerShell snap-in contains utility
cmdlets that are used to view and organize data in different ways.
but exposes no commands
Get-PSSnapin from a regular (not remote)…1 vote
- Don't see your idea?