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. Dynamic inplace syntax help without ISE

    Hi Microsoft,
    ever used to program a Switch or Router. Not only at Cisco's you can issue a ? anytime to know what you can do next, instead of browsing each command in technet or completely dump your line to enter get-help ... this is too complicated!

    ISE is a help but I don't want ISE all the time. Make your "command line" user-friendly please

    1 vote
    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 →

    Starting in PowerShell 5 (shipped with Windows 10, Windows Server 2016, and WMF 5), we included the PSReadline module by default in powershell.exe for improved usability. Based off of what you’re looking for, I’d highly recommend trying Ctrl+Space to see all available Tab completions wherever you’re at in your expression.

    Also check out the PSReadline GitHub repo for more documentation on using all of its available features: https://github.com/lzybkr/psreadline#usage

  2. -format not working with concatenated string

    The format (-f) command does not replace a token if the token is in a string followed by another concatenated string, if the -f is executed when the string is defined. Reproduced on PowerShell v4 and v5.
    Example:
    $concat = "select * from '{0}'" + " stringpart2" -f 'tab1'
    $concat

    Result:
    select * from '{0}' stringpart2

    However if -f is applied after the concatenation, it works correctly.
    Example:
    $concat = "select * from '{0}'" + " stringpart2"
    $concat -f 'tab1'

    Result:
    select * from 'tab1' stringpart2

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  3. powershell.exe -Command - is broken on Windows 10 14393

    See the details at https://social.technet.microsoft.com/Forums/windowsserver/en-US/4a52d235-5b10-4e4d-9c24-c2b354a57c26/invoking-powershellexe-with-command-reading-input-from-stdin-broken-in-windows-10-14393

    I wrote a post that includes the source for a tiny C# program that demonstrates that trying to launch powershell.exe with its "-Command -" parameter to get the script from StdIn no longer works after installing the Anniversary Update on Windows 10. Does not happen on Server 2016 TP5. I can duplicate the details here if that makes more sense.

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

    We’ll send you updates on this idea

    9 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →

    The fix for this issue has been backported from 6.0-alpha to 5.1 in the latest fully patched Win10 Anniversary Update. This repro should show powershell.exe -Command with -RedirectStandardInput working, and also demonstrates the version of PowerShell you should be on.

    C:\temp> set-content .\in.txt ‘$psversiontable’ -Encoding ascii
    >> Start-Process -FilePath ‘powershell.exe’ -ArgumentList “-Command -” -RedirectStandardOutput "out.txt
    " -RedirectStandardInput “in.txt”
    C:\temp> cat .\out.txt

    Name Value
    -- -
    PSVersion 5.1.14393.206
    PSEdition Desktop
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
    BuildVersion 10.0.14393.206
    CLRVersion 4.0.30319.42000
    WSManStackVersion 3.0
    PSRemotingProtocolVersion 2.3
    SerializationVersion 1.1.0.1

    Note: if your problems aren’t fixed, and you’re on this version of PowerShell 5.1 or greater, please file another issue here on UserVoice to address it.

    Thanks!
    Joey

  4. Assigning a value to `$?` (`$? = $false`) crashes powershell.exe

    PowerShell crashes when I run an invalid command such as $? = $false. Just enter and run $? = $false in powershell.exe or powershell_ise.exe.

    [[[
    Test-Path "C:\test"
    if ( $? = $false ) {
    Out-Host "Hello World"
    }
    ]]]

    I guess that PowerShell should display an error telling that I'm trying to perform an invalid action.

    The problem reproduces on Windows 10 Pro and PowerShell 5.1.14393.206. The problem does not seem to reproduce with PowerShell 5.0 (5.0.10586.122).

    bucket 127386360339, type 5
    Event Name: PowerShell
    Response: Not available
    Cab Id: 0
    Problem signature:
    P1: powershell.exe
    P2: 10.0.14393.206
    P3: stem.Management.Automation.PSInvalidCast
    P4:…

    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 →
  5. WMF5.0 Prod Preview (KB3066437) installation problem

    BUG: WMF5.0 Prod Preview (KB3066437) cannot be installed anymore on 2012 R2
    Since yesterday when I launch WMF5.0 Prod Preview (KB3066437) installation an error message box show up : "the timestamp signature and/or certificate could not be verified or is malformed"

    Indeed : Microsoft Time-Stamp Service certificate is out of date : 20/06/2016 !

    How can I install this Preview version without changing date time on the server (SQL Production server !) ?

    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 →
  6. Long path support

    PowerShell really needs to be able to handle long paths.
    It is really tedious having to drop out to RoboCopy to enumerate/copy/etc. files with more than 260 character paths.
    We all know that these paths exist on our file servers etc., yet core support for them in various bits of Windows (including the newer ones like PowerShell) still seems to be lacking.

    66 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 →
  7. PS has to be restarted to run a script that was unblocked during the same session

    If your execution policy is RemoteSigned and you try to execute a downloaded, unsigned script, PowerShell reports an error (as it should.) However, if you then run Unblock-File on that same script and try to run it again, you continue to get the error until you restart PowerShell.

    I did some digging, and it turns out that the method PowerShell uses to determine the security zone for a file (IInternetSecurityManager.MapUrlToZone) uses caching, by default. This method has a flag called MUTZDONTUSE_CACHE, which I have confirmed does fix the problem, but will require a code update from the PowerShell…

    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 →
  8. Add a FullName alias to file types to improve pipeline compatibility

    It would be great to run code as:

    mkdir foo | cd
    mkdir foo | pushd

    However this doesn't work due to name mismatch of the path property.

    My workaround:
    Update-TypeData -MemberName Path -TypeName IO.DirectoryInfo -MemberType AliasProperty -Force -Value FullName
    Update-TypeData -MemberName Path -TypeName IO.FileSystemInfo -MemberType AliasProperty -Force -Value FullName

    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 →
  9. PowerShell Jobs / Error Handling

    While I was creating a script for running SQL scripts, I needed a way
    to control the chaos that was a script running scripts.

    To do this, I used jobs in PowerShell.

    For the purpose of this post, $job is the current element for $jobs = Get-Job

    While I was attempting to gather the output of the error messages, I noticed the following behavior:

    The job state would sometimes be completed, but with an error message stored in $job.ChildJobs[0].Error.

    The job state would sometimes be failed, and have an error in $job.ChildJobs[0].Error.

    Sometimes the JobStateInfo property would have the failure…

    1 vote
    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 →
  10. connect network drive with credentials

    Hi there

    it isn't possible to connect to an password-protected network drive via powershell only.

    The easiest solution is to use the old "net use" command because there its possible to add credentials.

    Powershell should be able to connect to network drives without old commands and huge workarounds.

    And before all are screaming about security - no one knows my environment and don´t know about the level of security I need.
    Also when I´m using (have to use) the net use command the security stops when someone else can read the script.

    1 vote
    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 →
  11. Get-Help cmdlet fails to show about topics when invalid module is installed

    When a malformed module is present on a computer, the Get-Help cmdlet stops working when viewing about help topics.

    Steps to reproduce:
    1. Create a new module directory in one of PowerShell's module path named "fubar".
    2. Create an empty "fubar.psd1" file in that module directory.
    3. Run help about_functions_advanced_parameters. Note the error [1].

    I would expect PowerShell to fail a little more gracefully. Than a NullReferenceException.

    [1]
    > help aboutfunctionsadvanced_parameters
    Get-Help : Object reference not set to an instance of an object.
    At line:55 char:7
    + Get-Help @PSBoundParameters | more
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified:
    10 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 →
  12. Get-Service does not return the service startup type

    This seems like a some kind of weird oversight?
    I can get all kinds of useful info about a service by using get-service, but it won't tell me what the startup type is (Automatic/Manual/Disabled/etc.).
    Please add this to the info returned.

    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 →
  13. BUG: WMF5 RTM $PSModulePath

    After installation of the WMF5 RTM the $PSmodulePath is RESET to default.
    Update the $PSModulePath instead of resetting it.
    If additional modules are installed these are not available after installation of WMF5 RTM.

    WorkAround : Store your system variable PSModulePath before installing WMF5
    After installation of WMF5 restore your original PSModulePath

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

    We’ll send you updates on this idea

    10 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  14. BUG: WMF 5.0 RTM not installing on Windows server 2012 R2

    I am trying to install W2K12-KB3134759-x64.msu and get an error saying the update is not applicable to this computer
    The server is windows 2012R2, WMF 4.0, .NET 4.5 is installed and it has all the latest security patches from February 2016. Any ideas what could cause this error. The WMF 5.0 technical preview was never installed on this server

    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 →
    completed  ·  Zachary Alexander responded

    Hi Gabriel,

    The package you are attempting to install (W2K12-KB3134759-x64.msu) is meant for Windows Server 2012, not 2012 R2.

    Please try the installation with the correct package (Win8.1AndW2K12R2-KB3134758-x64.msu) and let us know if you experience any other issues.

    Further details on the packages and requirements, along with the installation details are available at: https://msdn.microsoft.com/en-us/powershell/wmf/requirements

    Thanks,
    Neema

  15. 6 years old bug with powershell copy-item!

    Votes from Connect: 8

    Original Date Submitted: 4/9/2015 9:24:03 AM

    Description:
    Contact Information
    Handle: 响叮咚
    Site Name: PowerShell
    Feedback ID: 1234983


    Frequency: PowerShell
    Regression:

    Problem Description:
    【version】
    all version.
    from powershell 2.0 to powershell 5.0 in windows 10 preview 10049!

    【reason】
    copy-item parameter "-exclude" don't work !

    many man say this problem 6 years before.has yet to repair.
    look:
    http://poshcode.org/3475
    http://stackoverflow.com/questions/731752/exclude-list-in-powershell-copy-item-does-not-appear-to-be-working

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

    Repro Steps:
    Expected Results:

    Internal BugId: 14373

    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. !($a[0]=[psobject]($a=,0))

    That command crash PowerShell with StackOverflowException.

    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 →
  17. Executing Get-Help about_<anytopic> very slow in PowerShell 5 April Preview

    Votes from Connect: 3

    Original Date Submitted: 5/1/2015 3:01:28 AM

    Description:
    Contact Information
    Handle: Greg Wojan
    Site Name: PowerShell
    Feedback ID: 1292439


    Frequency: PowerShell
    Regression: Open PowerShell console Window with many modules available in the PSModulesPath.
    Execute Get-Help about_Aliases
    Wait...

    Problem Description:
    I installed WMF 5.0 April 2015 preview on Windows 7. Any time I try and execute Get-Help about_<pick a topic> it can take up to four minutes to display the help.

    It appears to be the way PowerShell 5 is crawling all the help for CIM cmdlets and loaded modules. If there are 20 or 30 modules installed…

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

Feedback and Knowledge Base