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. Job cmdlets fail with UTF-8 codepage

    Powershell jobs (eg, Start-Job, Wait-Job, Receive-Job) fail when Powershell's codepage is set to UTF8.

    Simple reproduction on Server 2012R2 w/ PS5:
    from cmd.exe, set the parent process codepage and start powershell with:

    chcp 65001
    powershell

    from the powershell that just started:
    $job = Start-Job -ScriptBlock { Write-Output yo }
    Receive-Job $job -Wait

    The Receive-Job call will fail with: "
    [localhost] The background process reported an error with the following message: Cannot process an element with node type "Text". Only Element and EndElement node types are supported. at
    System.Management.Automation.Remoting.OutOfProcessUtils.ProcesData(String data, DataProcessingDelegates callbacks).

    + CategoryInfo          : OpenError: (localhost:String) [], PSRemotingTransportException
    
    + FullyQualifiedErrorId
    5 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    survey  ·  4 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  2. Enhance Set-PSBreakpoint to allow us to set Exception breakpoints

    It is annoying when I’m debugging in the ISE and an unhandled exception occurs - the ISE debugger just exits. It gives me no chance to debug the issue that caused the unhandled exception while still debugging. The importance of stopping in the debugger, is that I can examine the state of variables throughout the call stack which can be very helpful in tracking down "why" the unhandled exception occurred.

    So first, I want to set an "unhandled" exception breakpoint that would cause PowerShell to “break into” the debugger on any unhandled exception i.e. put the brakes on just before…

    19 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 →
  3. Test-Path needs parameter for finding hidden files

    Votes from Connect: 5

    Original Date Submitted: 8/27/2015 8:45:51 PM

    Description:

    Contact Information
    Handle: Eric Hodges
    Site Name: PowerShell
    Feedback ID: 1719027


    Problem Description:
    Right now Test-Path has no way of checking for the existence of a hidden file. I would suggest -force to search all files (hidden or not), and/or -hidden to test only for hidden files.

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

    Repro Steps:
    Test-path hidden.txt
    True

    Test-Path h*.txt
    False

    Expected:
    True

    Internal BugId: 15763

    39 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 →
  4. PS 5.0 Bug: Transcript stops after restarting a remote computer using ‘Restart-Computer’ with '-Wait' parameter.

    PS 5.0 Bug: Transcript stops after restarting a remote computer using ‘Restart-Computer’ with '-Wait' parameter.

    Example script:
    Start-Transcript c:\test.log
    $computername = "Fred"
    $credential = (get-credential "domain\user")

    Restart the remote computer.

    Restart-Computer -ComputerName $computername -Credential $credential -protocol WsMan -WsmanAuthentication Default -force -wait -for powershell -erroraction stop
    Stop-Transcript

    My tests were performed in the following environment - the source computer is Windows 7 SP1 with PowerShell 5.0, the target is Windows 7 SP1 with PowerShell 4.0.

    Upon completion of the reboot, the transcription is stopped. This is recorded in the transcript log file as “Windows PowerShell transcript end”. This results in 'Stop-Transcript'…

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

    We’ll send you updates on this idea

    survey  ·  2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  5. Cmdlet for getting list of Installed Software via Registry instead of win32_product.

    Would be great to have a builtin Cmdlet for getting list of Installed Software via Registry instead of win32_product.

    Why win32product is bad:
    https://sdmsoftware.com/group-policy-blog/wmi/why-win32
    product-is-bad-news/

    It would be faster, and would not trigger validation of all installed packages.

    Would use the following regkeys to return list of software (name, version, installDate) on local or remote machine (requires Remote Registry to be enabled on remote machine).

    HKLM:\Software\microsoft\windows\currentVersion\Uninstall
    HKLM:\Software\wow6432node\microsoft\windows\currentVersion\Uninstall

    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 Engine  ·  Flag idea as inappropriate…  ·  Admin →

    Will watch for folks to add their voices to this.
    In the meantime, if there is someone who wants to publish a user-contributed item to the PowerShell Gallery that does this, it would certainly be welcomed.

  6. Unable to have multiple enum and/or Class in a Class

    After some testing I was able to determine in the current version of PowerShell I am unable to include more than one Enum of custom Class inside of a declared class.

    Using example code from: https://blogs.technet.microsoft.com/heyscriptingguy/2015/09/02/adding-enums-to-powershell-5-classes/

    I declare both enums:

    Enum MakeOfCar
    {

    Chevy = 1
    
    Ford = 2
    Olds = 3
    Toyota = 4
    BMW = 5

    }

    Enum ColorOfCar
    {

    Red = 1
    
    Blue = 2
    Green = 3

    }

    After I test that I am able to create each enum:

    Looks good so far.

    Now lets declare the class:

    Class Car
    {

    [String]$vin
    
    static [int]$numberOfWheels = 4
    8 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    5 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  7. new parameter -markdown for Format-Table

    Example:

    $Get-Process | select -First 5 | ft -au

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


    716     47 32832 43396   587          1764 AdminManagerClient
    
    257 34 3432 9352 84 1128 AgentService
    495 78 15700 28528 154 3744 AppVClient
    244 35 60952 41796 692 0.56 5416 AppVStreamingUX
    591 18 17280 22992 108 1,751.98 4672 audiodg

    $Get-Process | select -First 5 | ft -markdown

    |Handles|NPM(K)|PM(K)|WS(K)|VM(M)| CPU(s)| Id|ProcessName |
    |-------|------|-----|-----|-----|--------|----|------------------|
    | 716| 47|32832|43396| 587| |1764|AdminManagerClient|
    | 257| 34| 3432| 9352| 84| |1128|AgentService |
    | 495| 78|15700|28528| 154| |3744|AppVClient |
    | 244| 35|60952|41796| 692| 0.56|5416|AppVStreamingUX |
    | 591| 18|17280|22992| 108|1,751.98|4672|audiodg |

    This could be…

    5 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 →
  8. invoke-webrequest hangs/freeze at many websites

    Powershell 4.0 / IE 11

    Works:
    invoke-webrequest "http://www.google.de"
    GET http://www.google.de with 0-byte payload
    received 189489-byte response ...
    - Result: Microsoft.Powershell.Commands.HtmlWebResponseObject

    Works not:
    invoke-webrequest "http://www.heise.de"
    GET http://www.heise.de with 0-byte payload
    received 179789-byte response ...
    hangs, no success, no result

    invoke-webrequest "http://windows.microsoft.com/en-US/windows-8/system-requirements"
    GET http://windows.microsoft.com/en-US/windows-8/system-requirements with 0-byte payload
    received 91075-byte response ...
    hangs, no success, no result

    the same with -UseBasicParsing

    16 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 →
  9. Bug: Move-Item

    Noticed a bug with the "Move-Item" cmdlet.

    Example:
    The source folder and destination folder have different permissions sets.

    $src = "C:\Path\To\Source"
    $dest = "D:\Path\To\Dest"

    ForEach($file in $src)
    {

      Move-Item $($file.fullname) -destination $dest
    

    }

    Using this block of code to move files from one folder to another will result in the files not inheriting permissions from the destination folder.

    The files that were moved retain the permissions from the source folder.

    This doesn't happen with Copy-Item or when you drag / drop files.

    Workaround I found is to add "icacls $dest /T RESET" to the end of the script.

    7 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 →
  10. Implement cmdlets for manipulating Timezone on workstations and servers

    currently Powershell does not provide a native cmdlet to manipulate timezone. this functionality would help enable desktop, server and DSC scenarios. I realize that calling tzutil.exe is a viable workaround. but it seems like an easy thing to expose as a cmdlet

    27 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 →
  11. Bug in WMF5 with inaccessible network path in PSModulePath environment variable

    In WMF5, if the PSModulePath environment variable has a UNC Path in it that is currently inaccessible, powershell fails to load many built-in modules.

    For instance, if PSModulePath looks like this:

    C:\Users\jmmurrah\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\windows\system32\WindowsPowerShell\v1.0\Modules;\badservername\folder

    When powershell loads and times out trying to access the path, many standard cmdlets are not found; get-host, test-path, format-list, etc.

    Get-member -listavailable reports back the modules, but does not list their path on disk, and many of them have no exported commands. When trying to import one of these modules powershell reports an error that the module path cannot be found.

    This doesn't appear to happen…

    9 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. Import-Module -Verbose:$False doesn't suppress verbose messages

    Compare the following:

    $VerbosePreference = 'Continue'
    Import-Module -Name Storage -Verbose:$False

    and

    $VerbosePreference = 'SilentlyContinue'
    Import-Module -Name Storage

    The first produces lots of verbose output: "Importing function", etc. The second produces no verbose output. It seems to me that neither should produce any verbose output.

    8 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 →
  13. Invoke-WebRequest hangs in some cases, unless -UseBasicParsing is used

    Votes from Connect: 3

    Original Date Submitted: 7/18/2015 2:03:55 AM

    Description:
    Contact Information
    Handle: sba923
    Site Name: PowerShell
    Feedback ID: 1557783


    Frequency: PowerShell
    Regression: Run:

    $URL='http://windows.microsoft.com/en-US/windows-8/system-requirements'
    (Invoke-WebRequest -Uri $URL).parsedhtml.title

    This hangs.

    $URL='http://windows.microsoft.com/en-US/windows-8/system-requirements'
    (Invoke-WebRequest -Uri $URL -UseBasicParsing).parsedhtml.title

    doesn't, but no output is produced, so this is not an acceptable workaround.

    Problem Description:
    $URL='http://windows.microsoft.com/en-US/windows-8/system-requirements'
    (Invoke-WebRequest -Uri $URL).parsedhtml.title

    hangs.

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

    Repro Steps:
    Run:

    $URL='http://windows.microsoft.com/en-US/windows-8/system-requirements'
    (Invoke-WebRequest -Uri $URL).parsedhtml.title

    This hangs.

    $URL='http://windows.microsoft.com/en-US/windows-8/system-requirements'
    (Invoke-WebRequest -Uri $URL -UseBasicParsing).parsedhtml.title

    doesn't, but no…

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

    We’ll send you updates on this idea

    6 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  14. Properly handle multi-line commands when read from stdin (and stdin is not a tty)

    If Powershell is reading scripts from stdin, when executed using "Powershell -Command - ", then it exits as soon as it sees a multi-line statement. This can be solved by adding an extra newline, but this should not be necessary if stdin is not a tty, and definitely not if "-NonInteractive" is specified.
    Further details and investigation here: http://stackoverflow.com/questions/37417613

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  15. PowerShell 5 - bug in GetType() for COM objects IADSUser

    Votes from Connect: 9

    Original Date Submitted: 6/16/2015 3:12:31 AM

    Description:
    Contact Information
    Handle: Ondrej Sevecek
    Site Name: PowerShell
    Feedback ID: 1437366


    Frequency: PowerShell
    Regression: run the mentioned script on Windows 10.0.10074 in its built-in PowerShell 5.

    Problem Description:
    When I run the following on Windows 10.0.10074 in PowerShell 5, it does not work for user members of the local group:

    $admins = [ADSI] 'WinNT://./Administrators,group'

    foreach ($oneMember in $admins.Members()) {

    $oneMemberName = $oneMember.GetType().InvokeMember('Name', 'GetProperty', $null, $oneMember, $null)
    Write-Host $oneMemberName

    }

    The error is: Error while invoking GetType. Could not find member.

    While the code works fine on any other OS…

    18 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 →
  16. Allow whitespace between final newline and quotation mark in here-string

    Votes from Connect: 10

    Original Date Submitted: 12/10/2011 12:21:15 AM

    Description:
    Contact Information
    Handle: JoshGav
    Site Name: PowerShell
    Feedback ID: 712796


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

    Problem Description:
    The final delimiter in a here-string is defined as newline-quotemarks-atsign. This means that the "@ has to be at the beginning of the final line, with no whitespace preceding it. This ruins attempts at tab indentation in scripts and functions. Whitespace should be allowed as part of the ending pattern between the newline and quotemarks so that tab indentation can be cleanly utilized.

    Product Studio item…

    18 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 →
  17. Splatting for class method input parameters

    Votes from Connect: 23

    Original Date Submitted: 5/28/2015 11:09:44 PM

    Description:
    Contact Information
    Handle: Trevor Sullivan [MVP]
    Site Name: PowerShell
    Feedback ID: 1376904


    Problem Description:
    In the spirit of splatting, a cool feature to have for PowerShell v5 or vNext, would be to be ale to splat method parameters on PowerShell classes.

    Right now, an error message appears: "The splatting operator '@' cannot be used to reference variables in an expression. '@NewPerson' can be used only as an argument to a command. To reference variables in an expression use '$NewPerson'."

    class Person {

    [string] $FirstName;
    
    [string] $LastName;

    Person ([string] $First,…

    15 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 →
  18. Invoke-Command -Scriptblock may incorrectly pass arrays as argument

    Dear Powershell team,

    I am running Powershell V 4.0 and recently I have come across an issue as arrays as passed as parameters to -Scriptblock.

    It is easily reproducible:

    Define array as array of strings

    [string []] $array1 = @()

    Load values into variable

    $array1 = "value1","value2","value3"

    Contents of variable

    $array1
    value1
    value2
    value3

    I pass my array as the argument to scriptblock

    However the array is broken on its members and considered as individual parameters

    args[0] should be an array of strings not a single string

    Invoke-Command -Scriptblock {$args[0]} -Args $array1 -ComputerName TestTarget
    value1

    If I invoke the whole

    2 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 →
  19. Add automatic PSModule and PSModuleRoot variables to all script modules

    Votes from Connect: 9

    Original Date Submitted: 8/26/2015 4:39:27 AM

    Description:
    Contact Information
    Handle: Kirk Munro
    Site Name: PowerShell
    Feedback ID: 1712772


    Problem Description:
    It is common to need to access the module info object or the module root folder from within a module. To facilitate this, two automatic variables should be defined within every module scope:

    $PSModule - set to $ExecutionContext.SessionState.Module
    $PSModuleRoot - set to $PSModule.ModuleBase

    With these defined, you have the root folder allowing you to reference the relative file structure of the module, and you can reference the module info to set the on close event handler,…

    12 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 →
  20. nCurses-like Library for PowerShell

    Votes from Connect: 10

    Original Date Submitted: 5/22/2015 10:16:03 PM

    Description:
    Contact Information
    Handle: Trevor Sullivan [MVP]
    Site Name: PowerShell
    Feedback ID: 1356647


    Problem Description:
    Please include a text-GUI library, similar to nCurses, with PowerShell on Nano Server. This would enable the building of applications, such as text-based text editors.

    The framework should include support for building text-based windows, and keyboard shortcuts.

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

    Repro Steps:

    Internal BugId: 14507

    11 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