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. Bug: WMF 5 Production Preview on Windows Server 2012 breaks Sysprep

    Installing the WMF Production Preview on a Windows Server 2012 machine causes sysprep to fail with the following messages:

    2016-01-14 15:58:26, Error [0x0f00bf] SYSPRP CreateSysprepActionList: Invalid action node sysprepOrder found for component Microsoft-Windows-SoftwareInventoryLogging-ScheduledTasks
    2016-01-14 15:58:26, Error SYSPRP SysprepSession::Execute: Error in executing actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x10dd
    2016-01-14 15:58:26, Error SYSPRP RunPlatformActions:Failed while executing SysprepSession actions; dwRet = 0x10dd
    2016-01-14 15:58:26, Error [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x10dd
    2016-01-14 15:58:26, Error [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep generalize internal providers; hr = 0x800710dd
    2016-01-14 15:58:26, Info [0x0f004c] SYSPRP WaitThread:Exiting…

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

    We’ll send you updates on this idea

    2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  2. BUG: current working directory is reset to $PSHOME when powershell is launched from a folder with square brackets

    To reproduce run this command line from a Command Prompt console or a .bat file:

    md "%temp%[test]" & cd /d "%temp%[test]" & powershell -c "$pwd"

    Prints "C:\Windows\System32\WindowsPowerShell\v1.0" instead of ".....[test]"

    There are other methods to reproduce as well, for example put a powershell script in a folder with square brackets and run it.

    Windows 7, Powershell 4.

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

    We’ll send you updates on this idea

    4 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  3. PS5: Get-Help -ShowWindow doesn't display help on parameters

    Votes from Connect: 23

    Original Date Submitted: 7/15/2015 10:30:37 PM

    Description:
    Contact Information
    Handle: sba
    Site Name: PowerShell
    Feedback ID: 1549114


    Frequency: PowerShell
    Regression: Run Get-Help for any command with the -ShowWindow parameter

    Problem Description:
    When I do "Get-Help <command> -ShowWindow", the resulting window doesn't contain the help on parameters, even if "Parameters" is checked under "Settings" (the default)

    Product Studio item created by Connect Synchronizer due to creation of feedback ID 1549114 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=1549114).

    Repro Steps:
    Run Get-Help for any command with the -ShowWindow parameter

    Expected Results:
    The resulting window should contain full help.

    Internal BugId: 15650

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

    We’ll send you updates on this idea

    4 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  4. Allow Splatting to work with mandatory parameters

    Frequency: Always Happens
    Regression: Yes, this happens in all previous versions

    Problem Description: Right now, the biggest barrier to splatting is that mandatory parameters will not not accept it.

    Any attempt to to "splat" against a module or function with a mandatory param will result in the following error:

    A parameter cannot be found that matches parameter name '<example>'

    I can't think of any good reason for this behavior and instead dream of the ease that would be allowed if this barrier was lifted (maybe add another variable if you're trying to force user defined input?)

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

    We’ll send you updates on this idea

    7 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  5. 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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  6. C-like return semantics

    Currently, PowerShell will return all values written to the output stream from a function. The problem is outlined in this Stack Overflow question: http://stackoverflow.com/questions/29556437/how-to-return-one-and-only-one-value-from-a-powershell-function

    Several workarounds are detailed here: http://stackoverflow.com/questions/5260125/whats-the-better-cleaner-way-to-ignore-output-in-powershell/5263780#5263780

    I would like a language feature that allowed me to return only the object specified to the "return" statement in a function. Obviously, the PowerShell team can't break all existing code that relies on the existing return semantics, but if a new keyword (e.g. return-only) that allowed the author of the function to ensure that only the intended value was returned without resulting to tactics like assigning the output of…

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

    We’ll send you updates on this idea

    2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  7. Allow changing of $profile storage locations

    As of right now there is no way to change any of the PowerShell $profile locations, which means it's a major pain to store and sync profile files for PowerShell; one can't simply have a custom dotfiles directory without making a junction (which allows a custom directory but not a custom filename) or another profile file opening your custom location profile (necessary if you want a custom filename). There's no standardized way of changing your profile location.
    Making this variable user-definable by means of the registry or an $env variable (i.e. $env:profile) would be much cleaner than the current best-practice…

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

    We’ll send you updates on this idea

    0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  8. Bug: Copy-Item -FromSession Fails if Local Machine Doesn't Have the Drive Being Copied From

    TLDR

    In the title. If you copy from the F:\ drive on the remote machine and the local machine doesn't have an F:\ drive, failure mode ensues.

    Scenario:

    Bob wants to copy a test.txt from &quot;F:\PowerShell&quot; on RemoteServer to &quot;C:\Users\Bob&quot; on LocalMachine.

    $Session = New-PSSession -ComputerName RemoteServer -Credential (Get-Credential RemoteDomain\Bob)
    
    Copy-Item -FromSession $Session -Path &quot;F:\PowerShell\Test.txt&quot; -Destination &quot;C:\Users\Bob&quot;

    Result:

    > Copy-Item : A parameter cannot be found that matches parameter name 'FromSession'.

    Notes:


    1. Bob has full permissions to both the F:\ drive and the file on RemoteServer.

    2. Bob is able to successfully copy files from C:\ and D:\ on the RemoteServer…
    11 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  9. Parsing error on "$("(")"

    PowerShell mistakenly detects unbalanced parentheses when a string literal with an open parentheses is inside of a string interpolation block inside of string literal.

    See further discussion at https://github.com/PowerShell/PowerShellEditorServices/issues/101

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

    We’ll send you updates on this idea

    7 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  10. Set-ClusteredScheduledTask should have an -Enable argument

    Set-ClusteredScheduledTask has a -Disable argument but no -Enable. My method of enabling a clustered scheduled task is fairly elaborate: modify the task via Task Scheduler, export the task to XML, and run Powershell to unregister the task and then register it from the exported XML. Being able to disable and enable these tasks via Powershell would be a significant help.

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  11. WMF 5.0 executing ScriptBlock over WinRM 2.0 fails

    Following c
    Code below will output only 1 but not when source from WMF 5.0 computer to WinRM 2.0

    Invoke-Command -ComputerName Windows2008box -ScriptBlock {Write-Output 1; Write-Output 2 }

    https://social.technet.microsoft.com/Forums/windowsserver/en-US/679bb655-4322-445c-8b7d-1f736c105489/can-somebody-verify-if-this-is-a-bug-in-wmf-50?forum=winserverpowershell

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  12. The parser for variable names isn't implemented according to spec

    According to the PowerShell language specification, the following variable names are illegal but the current PowerShell implementation accepts them:

    $:: = 3
    $::a = 3
    $variable:foo: = 5
    $:a:3 = 3

    which means that things like "$:a:3" currently act as "${:a:3}" rather than the expected "${:a}:3".

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  13. int32 keys in a hashtable do not match/equal int64 variables with the same value

    int32 keys in a hashtable do not match/equal int64 variables with the same value. If you force a int64 on the key by adding [int64] in the hashtable definition then the lookup works.

    Example:
    $Event = @{

    [int64]12 = &quot;Boot&quot;
    
    13 = &quot;Shutdown&quot;

    }

    @($event[[int64]12],$event[12],$event[13],$event[[int64]13]) | % { Write-Output "Result: $_" }

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  14. #Requires -Module needs RequiredVersion option

    Votes from Connect: 4

    Original Date Submitted: 11/14/2015 5:05:21 AM

    Description:
    Contact Information
    Handle: June Blender
    Site Name: PowerShell
    Feedback ID: 2014667


    Problem Description:
    To require the exact version of a module, I need a RequiredVersion option in #Requires.

    The ModuleVersion key in the #Requires -Module hashtable: @{ModuleName=''; ModuleVersion=''} behaves as a minimum version requirement. Not all versions of all modules are backward-compatible. With the proliferation of versions, including side-by-side in PowerShell 5.0, we need to be able to require a particular version.

    Also, about_Requires describes the ModuleVersion, but does not mention that it's a minimum (because I didn't know…

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

    We’ll send you updates on this idea

    0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  15. Potential Bug: PowerShell v5 timeout on getting output of remoting session when connected using CredSSP

    When connecting to a remote host using PowerShell Remoting and -Auth CredSSP, output of more than 21 objects will timeout when client is running PowerShell 5.0.

    When connecting to a remote host using:
    Enter-PSSession host.domain.local -Auth CredSSP -Cred domain\username

    any command yielding up to 21 objects will work as expected. However, if there are more than 21 objects, the client console shows no output and will run into timeout. The same seems to be true for the output of Invoke-Command.

    This can easily be reproduced entering the command:
    0..20 # Works as expected
    0..50 # Timeout!
    0..1000|Measure-Object # OK, supposedly…

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  16. Scope for Environment variables

    To enhance modularity PowerShell needs to allow for scoped environment variables. CMD.exe did this years ago, with the SETLOCAL command, but a more sophisticated approach incorporating concepts like module-scope would be a real boon...

    Global variables are generally regarded as a bad idea, but that's how PowerShell has always treated environment variables. For backward compatibility, that obviously needs to be retained. But it should be possible to do things like

    $local:env:PATH += ";C:\Foo\bin"

    in one function (or module) without impacting other code.

    Obviously when Powershell spawns child processes for native commands, it would need to construct and pass the appropriate…

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  17. ParameterSet names should not be case sensitive

    Votes from Connect: 130

    Original Date Submitted: 7/24/2014 11:42:29 PM

    Description:
    Contact Information
    Handle: Joel 'Jaykul' Bennett
    Site Name: PowerShell
    Feedback ID: 928085


    Frequency: Always Happens
    Regression: Yes, this happens in previous released versions

    Problem Description:
    Powershell is not a case sensitive language, and yet, ParameterSet names are case sensitive, and mixing up the case of a name can results in multiple sets. This should not be so.

    Product Studio item created by Connect Synchronizer due to creation of feedback ID 928085 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=928085).

    Repro Steps:
    function test-case {
    param(

      [Parameter(ParameterSetName=&quot;Test&quot;,Mandatory=$true)][Switch]$TitleCase,
    
    [Parameter(ParameterSetName=&quot;test&quot;,Mandatory=$true)][Switch]$LowerCase,
    [Parameter(ParameterSetName=&quot;TEST&quot;,Mandatory=$true)][Switch]$UpperCase

    )
    $PSCmdlet.ParameterSetName
    }

    Both of these

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

    We’ll send you updates on this idea

    0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  18. v5 special method `New` conflicts with static methods `New`

    PowerShell v5 comes with a new feature. Instead of old fashioned creation of an object

    New-Object System.Text.StringBuilder
    

    it is possible to use the new syntax

    [System.Text.StringBuilder]::new()
    

    The new syntax introduces a problem thought. If a class has a static method
    New then it cannot be called directly anymore. It looks like PowerShell
    thinks we are about to call a constructor, not this static method.

    My real problem case cannot be explained in here so I use an existing class
    just as an example.

    This code works in PowerShell v4

    [System.Linq.Expressions.Expression]::New([psobject])
    

    It calls the static method New and creates an expression.

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  19. Splatting for switch parameter with explicit value does not work properly

    function f {

    param(
    
    [Parameter(Position=1)]
    [Object]$PositionalParameter,
    [Switch]$SwitchParameter
    )
    &quot;`$PositionalParameter=$PositionalParameter;`$SwitchParameter=$SwitchParameter&quot;

    }

    function g {

    f @args
    

    }

    f -SwitchParameter:$false

    $PositionalParameter=;$SwitchParameter=False

    f -SwitchParameter:$true

    $PositionalParameter=;$SwitchParameter=True

    g -SwitchParameter:$false

    $PositionalParameter=False;$SwitchParameter=True

    g -SwitchParameter:$true

    $PositionalParameter=True;$SwitchParameter=True

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

    We’ll send you updates on this idea

    2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  20. Support op_addition on System.Object[]

    Votes from Connect: 4

    Original Date Submitted: 5/29/2015 12:55:07 AM

    Description:
    Contact Information
    Handle: Joel 'Jaykul' Bennett
    Site Name: PowerShell
    Feedback ID: 1377224


    Problem Description:
    PowerShell currently implements addition on arrays:

    $Array = 1,2,3
    $Array = $Array + 4
    $Array = $Array + 5,6,7
    $Array += 8
    $Array += 9,10

    I would like it to support subtraction, such that
    $array -= $object
    $array = $array - $object

    Both become alternate syntax for:
    $array = $array -ne $object

    Product Studio item created by Connect Synchronizer due to creation of feedback ID 1377224 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=1377224).

    Repro Steps:

    Internal BugId: 14522

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

    We’ll send you updates on this idea

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

Feedback and Knowledge Base