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. Get-ChildItem -LiteralPath doesn't support long path

    Get-ChildItem -LiteralPath doesn't support long path, for example:

    Get-ChildItem -LiteralPath 'D:\aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeffffffffffgggggggggghhhhhhhhhhiiiiiiiiiijjjjjjjjjjkkkkkkkkkkllllllllllmmmmmmmmmmnnnnnnnnnnooooooooooppppppppppqqqqqqqqqqrrrrrrrrrrssssssssssttttttttttuuuuuuuuuuvvvvvvvvvvwwwwwwwwwwxxxxxxxxxxyyyyyyyyyyzzzzzzzzzz.txt'

    Which path is longer than 260 bytes, even if the file DO exists in that path.

    But Get-ChildItem WITHOUT -LiteralPath works well with that long-path file.

    $PSVersionTable

    Name Value


    PSVersion 5.1.17763.134
    PSEdition Desktop
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
    BuildVersion 10.0.17763.134
    CLRVersion 4.0.30319.42000
    WSManStackVersion 3.0
    PSRemotingProtocolVersion 2.3
    SerializationVersion 1.1.0.1

    5 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 →
  2. Make Add-Type support .EXE assemblies (works on rename to .DLL)

    Running Add-Type with a .EXE assembly gives, 'Cannot add type. The ".EXE" extension is not supported'. But it works if I rename the assembly to .DLL. I think this limitation is artificial and should be removed.

    5 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. Set-mpioSetting -NewRetryInterval input validation is too strict

    When I run the following command in powershell
    (Windows Server 2012 R2, PS Version - 5.1.14409.1005)

    "Set-mpioSetting -NewRetryInterval 1 "
    returns the error
    "Set-MPIOSetting : Cannot validate argument on parameter 'NewRetryInterval'. The 1 argument is less than the minimum allowed range of 3. Supply an argument that is greater than or equal to 3 and then try the command again."

    The documentation at https://docs.microsoft.com/en-us/powershell/module/mpio/set-mpiosetting?view=win10-ps says that the default is 1 second, and we can use the GUI to be able to set the retry interval, but I want to be able to use powershell to automate the configuration of my…

    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 →
  4. How do I download modules manually from gallery behind a firewall/proxy?

    For companies like banks which are very restrictive regarding internet downloads, I have no internet connectivity directly from powershell, only from my browsers. As such I cannot use install-module from powershell.

    Our desktops are only windows 7 but locked down running ps version 2 and powershell console doesn't have proxy access. I cannot run install-module on my servers neither as my servers have no internet connection.

    Is there a workaround to download a module manually as a zipped file so that I can I unzip and install them manually in my server?

    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 →
  5. Disable-ScheduledTask -TaskName will fail with tasks including spaces in name.

    Steps to reproduce

    Disable-ScheduledTask -TaskName "Data Integrity Scan for Crash Recovery"
    Disable-ScheduledTask : The system cannot find the file specified.
    At line:1 char:1
    + Disable-ScheduledTask "Data Integrity Scan for Crash Recovery"
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (PS_ScheduledTask:Root/Microsoft/...S_ScheduledTask) [ 
    

    Disable-ScheduledTask], CimException

    + FullyQualifiedErrorId : HRESULT 0x80070002,Disable-ScheduledTask
    

    Expected behavior

    This should disable the scheduled task and not crash.

    You can workaround this by searching for the task object and disabling that way:

    $Name = "Data Integrity Scan for Crash Recovery"
    Get-ScheduledTask | where-object {($_.TaskName -eq $Name)} | Disable-ScheduledTask

    Actual behavior

    Crashes with the following exception:
    Disable-ScheduledTask : The system cannot find…

    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. Start-Transcript Does Not Capture Enter-PSSession

    Start-Transcript
    "local stuff"
    Enter-PSSession Server1
    "remote stuff"
    Exit-PSSession
    "more local stuff"
    Stop-Transcript

    Transcript does not show the remote stuff.

    5 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 →
  7. 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 →
  8. Add a Duration column to the History output

    The output of Get-History has Start and End times which can be put together to calculate a Duration. Why not add that to the default formatting of history objects?

    As a workaround, I use these:
    https://gist.github.com/Jaykul/2d4dc5e4f5195c726368435055b8acdb

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  9. BUG: ScheduledTaskTrigger -RandomDelay does not work

    New-ScheduledTaskTrigger -AtLogOn -RandomDelay 0:15:00; or
    New-ScheduledTaskTrigger -AtLogOn -RandomDelay (new-Timespan -Minutes 15)
    does not set the delay option. The checkbox in ScheduledTask Panel never gets set.
    Windows 10.0.14393 x64 de-DE (German Installation)

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  10. Anti human design:about tee-ojbect

    【say】
    This is not a bug, just advice.

    tee-object
    can use -FilePath -Append both!
    can not use -LiteralPath -Append both!

    look:
    Parameter Set: File
    Tee-Object [-FilePath] <String> [-Append] [-InputObject <PSObject> ] [ <CommonParameters>]

    Parameter Set: LiteralFile
    Tee-Object -LiteralPath <String> [-InputObject <PSObject> ] [ <CommonParameters>]

    【reason】
    Anti human design

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

    【date】
    2016-04-08

    5 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 →
  11. 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&#39;, 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 →
  12. 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 →
  13. New-JobTrigger why is there no -Monthly switch?

    Votes from Connect: 3

    Original Date Submitted: 7/24/2014 8:47:12 PM

    Description:
    Contact Information
    Handle: Lee Wilmott
    Site Name: PowerShell
    Feedback ID: 927973


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

    Problem Description:
    Please can you add a "-Monthly" switch (including a "DaysOfMonth" parameter) to the New-JobTrigger cmdlet?

    Many thanks,

    Lee

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

    Repro Steps:
    Expected Results:

    Internal BugId: 8911

    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 →
  14. [BUG] Get-LocalGroupMember and unresolved SID throws error

    If there is an unresolved SID in a local group the cmdlet Get-LocalGroupMember (and maybe others) throws and error.

    Module: Microsoft.PowerShell.LocalAccounts

    Get-LocalGroupMember : Failed to compare two elements in the array.
    At line:1 char:1
    + Get-LocalGroupMember -Group 'RDS Endpoint Servers'
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Get-LocalGroupMember], InvalidOperationException
    
    + FullyQualifiedErrorId : An unspecified error occurred.,Microsoft.PowerShell.Commands.GetLocalGroupMemberCommand

    If the SID is removed, the cmdlet once again works as expected.

    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 →
  15. Register-ScheduledTask

    Register-ScheduledTask -password parameter should accept secure string or PScredential. Currently it accept plain text and the password shows up in event log when register

    4 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 →
  16. get-credential with a smart card

    I work in an environment that enforces 'smart card required' for all accounts admin or otherwise so I have multiple certificates on the smart card. I understand you can use a smart card with get-credential but the problem is it only has the first cert available when prompted. I need there to be a way to make all certs on the smart card available when prompted with get-credential. I'm also stuck using ActivClient so hopefully this isn't a limitation of the smart card provider.

    4 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 →
  17. Get-Content bug: A parameter cannot be found that matches parameter name 'Encoding'

    Get-Conent with the Encoding parameter works against local file system paths such as this example:
    Get-Content -Encoding Byte -Path C:\Users\desktop.ini

    However, against a mapped network drive it does not:
    Get-Content -Encoding Byte -Path I:\Users\desktop.ini
    Get-Content : A parameter cannot be found that matches parameter name 'Encoding'.
    At line:1 char:13
    + Get-Content -Encoding Byte -Path I:\Users\desktop.ini

    The issue can be re-produced against a non-existing network drive as well.
    The behaviour is not expected and the error message is very misleading to users who don`t know what dynamic parameters is, since the same code works against a local path where -Encoding is…

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  18. Get-Service throws wrong exception if remote host is offline

    Get-Service returns exception as "Cannot find any service with service name" even if we give an offline/not existing host as argument for -ComputerName parameter

    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 →
  19. 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 →
  20. Invoke-RestMethod fails to convert large JSON requests

    Invoke-RestMethod fails to convert large JSON requests.
    "For JavaScript Object Notation (JSON) or XML, Windows PowerShell converts (or deserializes) the content into objects."

    If the request is large, Invoke-RestMethod returns just a string. This isn't documented anywhere and there's no way to change the limit. This could be related to: https://windowsserver.uservoice.com/forums/301869-powershell/suggestions/11088000-convertfrom-json-doesn-t-allow-you-to-modify-the-m

    4 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 →
  • Don't see your idea?

Feedback and Knowledge Base