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 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…

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

    We’ll send you updates on this idea

    3 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  2. Remember last command output eg PSLastItem - forgot to assign object to variable

    When you type in and run a cmdlet (especially one with side-effects) and forget to assign the output to a varialbe, it would be nice to be able to pick up the last output still stored in object form, from an automatic PS variable (eg PSLastItem) to feed into another command.
    Example: running Start-Process with -PassThru, then wanting the ExitCode of the result which I forgot to assign. Maybe even re-use $_ as shorthand, because we're not in the pipeline?

    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  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  3. Out-Gridview should provide a count of the number of objects displayed

    It would be very useful if Out-Gridview provided a build in display of the number of objects in the grid. This could be in a status bar at the bottom or at the top along with the Add Criteria button.

    This would update as the filters are applied. It would also be nice if the selected items had a count as well.

    It would be especially useful with -passthru as you could have an estimate on the number of objects being passed to the next cmdlet in the pipeline.

    You can come up with the count by using measure-object, but…

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

    We’ll send you updates on this idea

    4 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →

    It would certainly be cool, but we’re not really investing in Out-GridView at this point in time. I’ll leave this open as a Survey to see if the demand surpasses our bar (though I’d caveat that demand would have to be fairly high).

    Thanks,
    Joey

  4. Allow Description in Markdown format

    It could be useful to have Markdown formatting in manifest file to provide rich description on PowershellGallery

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

    We’ll send you updates on this idea

    1 comment  ·  PowerShell Gallery  ·  Flag idea as inappropriate…  ·  Admin →

    Specific ask for the voters: If you are willing, please add a note what your expectations are, and how you would see this providing extra value in the Gallery when we display this content.

    This type of feature is something we are generally a little bit cautious about.
    Rendering active MD content can include links & other items that result in some amount of risk for users of a site.

  5. Set the PowerShell Gallery up for Twitter Cards

    When posting a link to a GitHub repo on Twitter, the URL is generally replaced with a Twitter summary card. This is not the case, currently, when posting links to items on the Gallery. The display of cards makes these links stand out more and (should) help with social sharing of PowerShell content.

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

    We’ll send you updates on this idea

    survey  ·  0 comments  ·  PowerShell Gallery  ·  Flag idea as inappropriate…  ·  Admin →
  6. 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 →
  7. 1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    survey  ·  0 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  8. ConfigurationAST should include resource modules being imported

    The ConfigurationAST added in v4 for PowerShell DSC does a good job at providing resource configuration details. However, to determine what modules are being imported, we should still use the keyword AST to find the resource module names from the Import-DSCResource command. While this is a workaround, it will be easier if ConfigurationAST can provide this information for simplicity.

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

    We’ll send you updates on this idea

    survey  ·  0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  9. Support basic line wrapping in ISE Script Pane

    All IDE's support line wrapping inside the editor, except Powershell ISE (even Notepad has it)! This is useful, for example, when using ISE in a virtual machine console session, where the screen is often smaller than your screens actual resolution.

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

    We’ll send you updates on this idea

    survey  ·  0 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  10. IntelliSense pane's width should be user-configurable

    Even better if it can be specified through $psISE.Options.

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

    We’ll send you updates on this idea

    survey  ·  1 comment  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  11. Block WinRM operations during servicing

    The WinRM service starts normally and accepts requests during component servicing operations (eg, "Working on Updates", "Working on Features" screens after a post-update/feature-change reboot). This causes problems for configuration management in cases where the servicing process triggers further reboots, especially since there doesn't appear to be a documented way to determine that servicing is underway. WinRM should either wait to accept requests until servicing is complete, or a way for third-party tools to determine that servicing is underway from Powershell should be documented.

    2 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  ·  WinRM  ·  Flag idea as inappropriate…  ·  Admin →
  12. PowerShell fails to start if path contains brackets

    In a variety of cases, attempting to launch PowerShell from a path containing square brackets either fails entirely, or fails to resolve the relative working directory. For example:

    With this command, PowerShell won't launch:

    PS C:\T[e]st> Start PowerShell

    Start : Cannot perform operation because the wildcard path C:\T[e]st did not resolve to a file.
    
    At line:1 char:1
    + Start PowerShell
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : OpenError: (C:\T[e]st:String) [Start-Process], FileNotFoundException
    + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.StartProcessCommand

    From CMD or Powershell, this command starts Powershell, but with the wrong working directory:

    C:\T[e]st> PowerShell

    Windows PowerShell
    
    Copyright (C) 2015 Microsoft Corporation. All rights reserved.

    PS…

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

    We’ll send you updates on this idea

    survey  ·  1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  13. Get-WinEvent - FilterHashtable - query is wrong

    I do test:

    $a=Get-WinEvent -FilterHashtable @{LogName="Microsoft-Windows-PrintService/Operational";"Param5"=
    "UserPrinterName"} -Verbose -ComputerName printserver

    VERBOSE: Constructed structured query:
    <QueryList><Query Id="0" Path="microsoft-windows-printservice/operational"><Select
    Path="microsoft-windows-printservice/operational">[([EventData[Data[@Name='Param5']='UserPrinterName']] or
    [UserData/
    /Param5='UserPrinterName'])]</Select></Query></QueryList>.

    Get-WinEvent : No events were found that match the specified selection criteria.


    1. Really the log contain events under the filter!

    2. If you copy-paste the Constructed structured query into Eventvwr.msc then you get error!

    3. If I do the test with part of the generated query "[UserData//DocumentPrinted/Param5='UserPrinterName']" then you get the events in Powershell and in Eventvwr.msc

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    4 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
    survey  ·  Zachary Alexander responded

    It looks like you found the issue and have a fix. Right now the easiest+ quickest way to get this fixed would be to go through GitHub. Please update this issue if you do go down that path and I will mark this as external.

  14. Get-Date -UFormat %V is incorrect

    Get-Date -UFormat %V is supposed to return the ISO 6801 week number like Unix does. I don't understand what value it currently returns (I think it's nothing sensible), but it definitely is NOT the correct week number!

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

    We’ll send you updates on this idea

    survey  ·  0 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  15. Bug: Workflow -> InlineScript -> Function -> Function -> Write-Verbose throws an uncatchable and fatal exception

    I've blogged about this with full examples here: https://www.codykonior.com/2016/08/31/if-you-dont-mind-me-saying-powershell-workflows-are-awfully-broken/


    1. If you have a workflow and call it with -Verbose

    2. If that workflow has an InlineScript which calls a function

    3. And that function calls another function which does a Write-Verbose

    A terminating, uncatchable exception is thrown:

    Object reference not set to an instance of an object.

    + CategoryInfo          : ResourceUnavailable: (:) [], ParentContainsErrorRecordException
    
    + FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemotingDataStructureException
    + PSComputerName : [localhost]

    It seems to be with how Write-Verbose gets overridden in workflows to prefix output with the computer name it's running on. Creating a Write-Verbose wrapper around itself alleviates the issue.

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    survey  ·  0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  16. pipelinevariable vs outputvariable processing bug

    PS C:\Users\Administrator\Downloads\Lync\Lync> $outputtest = $null

    PS C:\Users\Administrator\Downloads\Lync\Lync> get-process -PipelineVariable pipelinetest -OutVariable outputtest | ? {$outputtest.name -like "vmwp"}

    Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName


    617      31    48096      27688   170   371.03    328 vmwp                                                                                                                                                
    
    535 57 39700 17712 135 251.22 2124 vmwp
    541 57 9584 18932 135 234.36 2644 vmwp
    85 7 760 3736 20 0.05 592 wininit
    161 8 1488 6564 66 0.25 624 winlogon
    227 11 10744 14144 56 2.45 1200 WmiPrvSE
    238 15 6072 11876 70 0.64 3592 WmiPrvSE

    PS C:\Users\Administrator\Downloads\Lync\Lync> get-process -PipelineVariable pipelinetest -OutVariable outputtest | ? {$pipelinetest.name -like "vmwp"}

    Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id…

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    survey  ·  1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  17. [type] should use type completion rather than directory completion

    It's strange that this uses type completion:

    New-Object -TypeName l

    <tab> completes to "long"

    but this uses directory completion:

    Update-TypeData -TypeConverter l

    <tab> completes to ".\Links&quot;

    Even though the former takes a [string] and the latter takes a [type]

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    survey  ·  0 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  18. Use the type of variables in the same way as OutputTypeAttribute when doing tab completion

    Use the type of variables in the same way as OutputTypeAttribute

    Get-Process | % <tab> #completes members of [Diagnostics.Process].

    [Diagnostics.Process[]] $proc = Get-Process

    $proc | % <tab> # does not complete members of [Diagnostics.Process] although the type is known.

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

    We’ll send you updates on this idea

    survey  ·  0 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  19. Please make -NoTypeInformation the default for Export-CSV

    I'm pretty sure that Export-CSV is used for creating Excel compatible files far more often than it is used for Serialising and Deserialising Type-consistent PS Objects.

    Alternatively / additionally adding a PS preference variable to set the default behaviour.

    I understand that this is simply a convenience thing, eliminating the need to add an extra parameter for the most common use case.

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

    We’ll send you updates on this idea

    survey  ·  1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  20. Register-ArgumentCompleter is not documented

    The cmdlet Register-ArgumentCompleter is not documented.

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

    We’ll send you updates on this idea

    survey  ·  0 comments  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
  • Don't see your idea?

Feedback and Knowledge Base