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: Copy-Item -ToSession does not copy the first folder and instead copies that folder's items to the top-level directory of the destinatio

    TLDR

    When copying files via the code below, if the first item copied is a folder it is not created in the destination. The files within that folder are instead copied to the top-level folder of the destination. All other files and folders copy normally.

    Code

    Copy-Item -ToSession $Session -Path C:\Some\Path* -Destination C:\Another\Path

    Result

    If there is a subfolder in C:\Some\Path called 'Folder' with files inside it called 'First.txt', 'Second.txt', and 'Third.txt', and if this is the first folder copied the destination will look like this:

    C:\Another\Path\First.txt
    C:\Another\Path\Second.txt
    C:\Another\Path\Third.txt
    ... Other Files and folders

    Executed on a Server 2012R2 with…

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

    We’ll send you updates on this idea

    1 comment  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  2. Test-Path does not support PSCredential

    Votes from Connect: 4

    Original Date Submitted: 8/12/2014 2:16:43 AM

    Description:
    Contact Information
    Handle: Graeme Bray
    Site Name: PowerShell
    Feedback ID: 943873


    Frequency: Always Happens
    Regression: I do not know if this issue existed previously

    Problem Description:
    Test-Path states that it supports a PSCredential, however it does not and errors when you attempt to pass a Credential object to it. This should either be removed or it should be changed to allow the passage of credentials.

    This can especially be an issue if there is no trust between domains/forest and you have to pass a credential in a script that…

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  3. SmbShare module localization does not work when UICulture is not en-US

    I am attempting to use invoke-command to run a script on a remote computer. The UICulture of my local machine is en-GB. During the execution of the script on the remote computer, it does an "Import-Module SmbShare". This fails with the following error:

    Cannot find the Windows PowerShell data file 'SmbLocalization.psd1' in directory 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\SmbShare\en-GB', or in any parent culture directories.

    Looking at the modules folder, I can see that the SmbShare folder does not contain an en-GB folder but does contain an en-US folder with an SmbLocalization.psd1 file inside. However, there is no default SmbLocalization.psd1 file located directly within the…

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

    We’ll send you updates on this idea

    3 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  4. PowerShell: Get-Service ComputerName parameter binding bug

    Please refer to the following examples. The ComputerName parameter (ValueFromPipelineByPropertyName) in combination with the "Name" or "DisplayName" parameters does not always scan the correct computers with the Get-Service cmdlet. Just in the first case, all target comptuers are queried. In the other cases, the first object is queried multiple times.

    $Objects = [PSCustomObject] @{ ComputerName = 'LON-DC1' }, [PSCustomObject] @{ ComputerName = 'LON-CL1' }

    SUCCESS: Works as expected, gets the service for each machine

    $Objects | Get-Service -Name Netlogon | Format-Table MachineName, ServiceName, Status -AutoSize

    MachineName ServiceName Status


    LON-DC1 Netlogon Running
    LON-CL1 Netlogon Running

    ERROR: Uses the first comptuer name

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

    We’ll send you updates on this idea

    2 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  5. Add -Ordered switch to ConvertFrom-StringData to enable creating ordered hashtables.

    Votes from Connect: 6

    Original Date Submitted: 8/19/2014 2:22:41 PM

    Description:
    Contact Information
    Handle: Bartosz Bielawski
    Site Name: PowerShell
    Feedback ID: 949805


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

    Problem Description:
    Currently we can easily create ordered hashtable using [ordered]@{} syntax. I would like to be able to do the same using ConvertFrom-StringData cmdlet, preferably using switch parameter -Ordered

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

    Repro Steps:

    Order kept...

    [ordered]@{

    one = 1
    
    two = 2
    three = 3

    }

    Ordered not kept, as expected...

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

    We’ll send you updates on this idea

    1 comment  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  6. psreadline module bug: cursor position error

    TITLE
    psreadline module bug: cursor position error

    【version】
    tested on powershell 5.0 in win10 1511 10586.104

    【reason】
    Cursor position error when chinese characters folder,or filename in console.
    see under test code.

    【reporter】
    By the chinese powershell research group. QQ group No. is 183173532

    【test code】
    PS F:\MP3\振奋> pwd <----- In any chinese characters folder,some block on 'pwd' left.

    Path

    F:\MP3\振奋

    PS F:\MP3\振奋> Remove-Module psreadline
    PS F:\MP3\振奋> pwd <----- Normal

    Path

    F:\MP3\振奋

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

    We’ll send you updates on this idea

    2 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  7. Get-FileHash only accepts single argument for -Algorithm parameter

    Votes from Connect: 3

    Original Date Submitted: 7/11/2014 10:53:05 PM

    Description:
    Contact Information
    Handle: Trevor Sullivan
    Site Name: PowerShell
    Feedback ID: 918243


    Frequency: Always Happens
    Regression: No, this is new to the most recent version

    Problem Description:
    The Get-FileHash command only accepts a single argument for its Algorithm parameter. If you want to retrieve two different hashes, then the command must be called once for each hashing algorithm. Please enable multiple algorithms to be passed into the Get-FileHash command.

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

    Repro Steps:
    Run Get-FileHash…

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  8. List which module contains which CmdLets.

    I am trying to figure out which module contains Get-PcsvDevice. I am running PS 5.1 on Server2012 R2.

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  9. Case-Sensitive option for Test-Path

    An option to force Test-Path to be case-sensitive would be extremely helpful, especially given a script could be run on either a case-sensitive filesystem or a case-insensitive one and produce different output. At the moment, this requires a fair amount of manual work for a common goal. An option to force case-insensitivity may also be desitable, given PowerShell can encounter case-sensitive filesystems.

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  10. Error attempting to create a RAP/CAP policy containing parenthesis characters

    In module "RemoteDesktopServices"

    Run powershell as administrator, execute next:

    Import-Module RemoteDesktopServices
    New-Item -Path "RDS:\GatewayServer\RAP" -Name "TestRAP1 (test)" -UserGroups "Remote Users@DomainName" -ComputerGroupType 1 -ComputerGroup "RDS_group@DomainName"

    Get error:
    New-Item : The path contains characters that are not valid.
    At line:1 char:1
    + New-Item -Path "RDS:\GatewayServer\RAP" -Name "TestRAP1 (test 123)" ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidArgument: (RDS:\GatewaySer...AP_1 (test 123):String) [New-Item], ArgumentException
    
    + FullyQualifiedErrorId : IllegalCharacters,Microsoft.PowerShell.Commands.NewItemCommand

    but if execute without parenthesis characters, its will executed with success

    New-Item -Path "RDS:\GatewayServer\RAP" -Name "TestRAP1 test" -UserGroups "Remote Users@DomainName" -ComputerGroupType 1 -ComputerGroup "RDS_group@DomainName"

    Moreover, if you create a policy through…

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  11. Enable-ClusterStorageSpacesDirect Needs a -FORCE parameter for consistency

    The Enable-ClusterStorageSpacesDirect cmdlet does not have a -FORCE parameter.

    When you run the cmdlet, you get a pop-up confirmation prompt. To avoid this, the cmdlet should have a -FORCE parameter.

    It's true you can use -CONFIRM:$FALSE - but that is inconsistent with other cmdlets throughout PowerShell.

    For consistency add a -FORCE parameter to this cmdlet that avoids the popup confirmation. OF course, for compatibility, keep the $Confirm:$False.

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  12. Please use your own Naming Conventions for PmemDisk.ps1xml / PmemPhysicalDevice.ps1xml

    M$$ will probably ignore this issue, too:

    All 110 format ps1xml Files use the Naming Convention:
    <Type>.Format.ps1xml

    Once more, it's a shame that the Naming Convention is not validated before a M$$ Product is deployed, those files would fail:

    PmemDisk.ps1xml
    PmemPhysicalDevice.ps1xml

    Such bugs are annoying - and could very easily be prevented. If you need help with the basics, please ask.

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  13. M$ Shame #1427: Invalid XML File: MSFT_NetEventWFPCaptureProvider.format.ps1xml

    Yes, this will be the ignored issue #1427:

    This XML File does not pass any XML Validation:
    c:\Windows\System32\WindowsPowerShell\v1.0\Modules\NetEventPacketCapture\MSFT_NetEventWFPCaptureProvider.format.ps1xml

    M$$ is really not able to integrate the most basic function tests before Files are distributed to many millions of paying customers?

    This is really one more issue which must never happen at M$$.
    A scripting kiddy could make this kind of errors - but usually, they smart enough...

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  14. Bug: wrong encoding in some *.format.ps1xml files

    It's probably useless and a shame that M$$ is usually not fixing this kind of bugs:

    Some PowerShell xml Files have the wrong encoding, for example this one:
    c:\Windows\System32\WindowsPowerShell\v1.0\Event.Format.ps1xml

    It states that it is using:
    <?xml version="1.0" encoding="utf-8" ?>
    but in fact, it's utf-16.

    Test it:
    $xmldoc = New-Object xml.XmlDocument
    $xmldoc.Load('c:\Windows\System32\WindowsPowerShell\v1.0\Event.Format.ps1xml')
    Exception calling "Load" with "1" argument(s): "'.', hexadecimal value 0x00, is an invalid character. Line 2, position 1."

    Change the header to:
    <?xml version="1.0" encoding="utf-16" ?>
    and it will work.

    M$ still does not have the most basic unit tests to assure that config files must have the right…

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  15. Bug: wrong encoding in some *.format.ps1xml files

    It's probably useless and a shame that M$$ is usually not fixing this kind of bugs:

    Some PowerShell xml Files have the wrong encoding, for example this one:
    c:\Windows\System32\WindowsPowerShell\v1.0\Event.Format.ps1xml

    It states that it is using:
    <?xml version="1.0" encoding="utf-8" ?>
    but in fact, it's utf-16.

    Test it:
    $xmldoc = New-Object xml.XmlDocument
    $xmldoc.Load('c:\Windows\System32\WindowsPowerShell\v1.0\Event.Format.ps1xml')
    Exception calling "Load" with "1" argument(s): "'.', hexadecimal value 0x00, is an invalid character. Line 2, position 1."

    Change the header to:
    <?xml version="1.0" encoding="utf-16" ?>
    and it will work.

    M$ still does not have the most basic unit tests to assure that config files must have the right…

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  16. BUG: Get-DnsServer* cmdlets with -ErrorAction SilentlyContinue mask pipeline exceptions

    PS > Get-DnsServerZone -ComputerName properdnsserver -ZoneName existingdnszone -ErrorAction SilentlyContinue| % { throw "OOPS!" }

    NO ERROR !

    PS > Get-DnsServerZone -ComputerName properdnsserver -ZoneName existingdnszone | % { throw "OOPS!" }
    Exception calling "EndProcessing" with "0" argument(s): "OOPS!"
    At line:354 char:17
    + $_cmdletizationobjectModelWrapper.EndProcessing()
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException
    
    + FullyQualifiedErrorId : RuntimeException

    PS >Get-Item . -ErrorAction SilentlyContinue | % { throw "OOPS" }
    Get-Item : OOPS
    At line:1 char:1
    + Get-Item . -ErrorAction SilentlyContinue | % { throw "OOPS" }
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : OperationStopped: (OOPS:String)
    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  17. Get-Item / Get-ChildItem returns wrong Target-Property if Item is on a Directory Junction to another drive

    It's annoying that we have to report Bugs in UserVoices
    and its a shame that M$$ is fixing BUGS only if there are enough UserVoices.

    Anyway:

    Hello

    If we create this Directory Junction between local Drives:
    mklink /J C:\Temp D:\Data\Temp\

    So that accessing: C:\Temp\
    in fact works here: D:\Data\Temp

    Now, if we call e.g.
    (Get-Item C:\Temp\MyFile.txt).Target

    We get:

    Wrong: Target : {C:\Data\Temp\MyFile.txt}
    Should be: Target : {D:\Data\Temp\MyFile.txt}
    It's a shame that M$ still does not have Unit Tests to validate the most basic situations.
    (Assuring to return the right Target on different LinkTypes, is the most important reason for this…

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  18. Get-Item / Get-ChildItem returns wrong Target-Property if Item is on a Directory Junction to another drive

    It's annoying that we have to report Bugs in UserVoices
    and its a shame that M$$ is fixing BUGS only if there are enough UserVoices.

    Anyway:

    Hello

    If we create this Directory Junction between local Drives:
    mklink /J C:\Temp D:\Data\Temp\

    So that accessing: C:\Temp\
    in fact works here: D:\Data\Temp

    Now, if we call e.g.
    (Get-Item C:\Temp\MyFile.txt).Target

    We get:

    Wrong: Target : {C:\Data\Temp\MyFile.txt}
    Should be: Target : {D:\Data\Temp\MyFile.txt}
    It's a shame that M$ still does not have Unit Tests to validate the most basic situations.
    (Assuring to return the right Target on different LinkTypes, is the most important reason for this…

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  19. 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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  20. The task "Windows Defender Verification" is producing a restore point every day.

    The task "Windows Defender Verification" is producing a restore point every day. There should be an additional parameter in "Set-MpPreference" to handle that issue.

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  • Don't see your idea?

Feedback and Knowledge Base