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. Register-ArgumentCompleter Should Support Module-Qualified Command Names

    Register-ArgumentCompleter does not appear to support module-qualified command names, such as:

    Register-ArgumentCompleter -CommandName Microsoft.PowerShell.Management\Get-Process

    Running this command does not return an error, but does not function either. Module-qualified command names are often considered a best practice so it would be helpful if this was supported. Thanks!

    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 →
  2. Add -ListLoaded parameter to the Get-Module Cmdlet

    For the Get-Module cmdlet, there is a -ListAvailable parameter to show the modules that are available, but not loaded. Although Get-Module without any parameters does show which modules ARE loaded, it would be nice (i.e. intuitive - for those just learning PowerShell as well as enhance readability) if there was a corresponding -ListLoaded parameter as well.

    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 →
  3. New-EventLog needs to allow specifying CategoryCount

    New-EventLog allows specifying a CategoryResourceFile but not a 'CategoryCount'. This field then gets created in the registry as 0 and so I effectively have no categories.

    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 →
  4. Add the ability for Join-Path to accept a single -Path and an array for -ChildPath

    If Join-Path handled a single base path and an array of child paths then you could easily process a list of relative paths.

    I would pass in:

    -Path "C:\MyTargetDirectory"
    -ChildPath ".\Sub1",".\Sub2",".\Sub2\Sub2.1",".\Sub2\Sub2.1\Sub2.1.1"

    and it would return the following:

    C:\MyTargetDirectory\Sub1
    C:\MyTargetDirectory\Sub2
    C:\MyTargetDirectory\Sub2\Sub2.1
    C:\MyTargetDirectory\Sub2\Sub2.1\Sub2.1.1

    If it isn't possible to create parameter sets that can cope with both methods then you could always create Join-ChildPath to simplify things.

    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 →
  5. Bug in PowerShell Invoke-sqlcmd - Inserting duplicate rows if the second row of SQL insert statement table name is wrong.

    Bug in PowerShell Invoke-sqlcmd - Inserting duplicate rows if the second row of SQL insert statement table name is wrong.
    Example:
    create table TestDB..TestTable
    (Id Int,
    InsertedDate Datetime default (getdate()))

    Run below script in PowerShell, which has table name wrong in second row.

    $Query = "Use TestDB
    Insert into TestTable (id) values ('1')
    Insert into TestTable2 (id) values ('2')"
    Invoke-sqlcmd -Query "$Query" -ServerInstance "SQLInstanceName"

    SQLResult:
    Id InsertedDate
    1 2016-09-15 03:35:12.587
    1 2016-09-15 03:35:12.590

    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 →
  6. Get-WinEvent - FilterHashtable - query is wrong

    I do test:

    $a=Get-WinEvent -FilterHashtable @{LogName="Microsoft-Windows-PrintService/Operational";"Param5"=
    "UserPrinterName"} -Verbose -ComputerName printserver

    VERBOSE: Constructed structured query:
    <QueryList><Query Id="0" Path="microsoft-windows-printservice/operational"><Select
    Path="microsoft-windows-printservice/operational">[([EventData[Data[@Name='Param5']='UserPrinterName']] or
    [UserData/
    /Param5='UserPrinterName'])]</Select></Query></QueryList>.

    Get-WinEvent : No events were found that match the specified selection criteria.


    1. Really the log contain events under the filter!

    2. If you copy-paste the Constructed structured query into Eventvwr.msc then you get error!

    3. If I do the test with part of the generated query "[UserData//DocumentPrinted/Param5='UserPrinterName']" then you get the events in Powershell and in Eventvwr.msc

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

    We’ll send you updates on this idea

    4 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
    survey  ·  Zachary Alexander responded

    It looks like you found the issue and have a fix. Right now the easiest+ quickest way to get this fixed would be to go through GitHub. Please update this issue if you do go down that path and I will mark this as external.

  7. Unable to Enable credssp remotely

    I am trying to execute the below command to enable credssp remotely but it is giving below error and blocking our execution in prod. Can some one suggest me how to enable it.

    Invoke-Command -ComputerName Server1 -Credential domain\user1-ScriptBlock {

    Enable-WSManCredSSP -Role Server -Force
    Enable-WSManCredSSP -Role Client -DelegateComputer * -Force

    }
    Access is denied.

    + CategoryInfo          : InvalidOperation: (:) [Enable-WSManCredSSP], Inv 
    

    alidOperationException

    + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.EnableWSMa 
    

    nCredSSPCommand

    + PSComputerName        : civautowinclu02
    

    Access is denied.

    + CategoryInfo          : InvalidOperation: (System.String[]:String[]) [En 
    

    able-WSManCredSSP], InvalidOperationException

    + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.EnableWSMa 
    

    nCredSSPCommand

    + PSComputerName        : Server1
    

    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 →
  8. Fix the remotedesktop module

    It seems that the RemoteDesktop module for RDS isn't working correctly. When trying to configure constrained endpoints in powershell it seems nearly impossible to restrict the session to only use the RemoteDesktop-module. It appears as if the modules isn't loading in a constrained endpoint due do the use of aliases in the modules.

    https://powershell.org/forums/topic/creating-jea-endpoint-for-remote-desktop-services/

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

    We’ll send you updates on this idea

    investigating  ·  0 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  9. New Cmdlet(s) for AG Lease Events

    MSSQL Tiger Team gave a great presentation today about new extended events and properties for troubleshooting AoAG. These improvements rely on AG Lease & X-events. It would be great to have a set of Cmdlets added to the AG modules to return information captured by AG-Lease a few examples:

    Get-AGDiagnosticEvent
    Get-AGLeaseExpired
    Get-AGLeaseSystemComponent

    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 →

    We will forward the request, but this is really something you want to send to the SQL Server team. They develop the PowerShell cmdlets for SQL. I would recommend that you send this request to the people who gave the presentation, as feedback from the presentation.

  10. some unicode display none

    ps 5.0 bug:some unicode display none

    【Cause of the bug】
    unknown

    【bug with powershell version】
    powershell 2.0: no this bug
    powershell 3.0: no this bug
    powershell 4.0: no this bug
    powershell 5.0: have this bug
    ise in win10 10586:no this bug

    【test code】
    write-host 'a♦♣♥♠b'

    【how to fix】
    unknown

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

    【date】
    2016-06-04

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

    We’ll send you updates on this idea

    survey  ·  3 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  11. Get-Command -ListImported is *broken* in PowerShell 5.1

    As of PowerShell 5.1.14328.1000, the core Get-Command command is improperly IMPORTING modules when run with -ListImported, so that it ALWAYS finds the command.

    For example, the following series of commands will always return the command and the module, when it should return neither:

    Remove-Module Microsoft.PowerShell.Security
    Get-Command Get-ACL -ListImported
    Get-Module Microsoft.PowerShell.Security

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  12. Microsoft.PowerShell.LocalAccounts confirm impact

    the confirm impact on the Remove* cmdlets in the Microsoft.PowerShell.LocalAccounts module is not set to high.
    I think removing a local group or user (especially when the pipeline is involved) should have Confirm impact set to high to prevent accidental mass deletion

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  13. BUG: Remove-Item "Incorrect function" error for Remote to Remote Symbolic Links

    In Powershell 5 the ability to create/delete links (SymbolicLink, HardLink or Junction) was introduced using new-item and remove-item. However remove-item does not work for remote to remote symbolic links.

    Remote to remote symbolic links are typically not enabled by default. They can be enabled by doing:
    fsutil behavior set SymlinkEvaluation R2R:1

    Issue can be replicated by doing:
    fsutil behavior set SymlinkEvaluation R2R:1
    sl "\$servername\$servershare\$serverpath"
    new-item Data -ItemType Directory
    new-item DataPtr -ItemType SymbolicLink -Target Data
    remove-item DataPtr -force -Recurse

    This generates the error:
    remove-item : Incorrect function

    Workaround is to do:

    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. Impossible to set -RunOnlyIfIdle flag

    New-ScheduledTaskSettingsSet -RunOnlyIfIdle doesn’t do anything. Fixing that wouldn’t really help either as we’d need an idle task trigger as well. I documented all the problems at the below link, and really hope this could be sorted out.
    https://www.slightfuture.com/devel/idle-task-scheduler-powershell

    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. PS ConstrainedLanguage mode on Windows 10 with SRP

    We have Windows 10 computers (PS version 5) with SRP (Software Restriction Policy) enabled.

    We realized that when we have PS Version 5 and SRP enabled, the system will put PowerShell into ConstrainedLanguage mode, which prevents some of our PS scripts to run in the user context.

    If we try other combinations we can see that things works:
    -If we start the PS with elevated admin rights, then PS in admin context run in FullLanguage mode.
    -If we disable SRP, then PS in user context will run in FullLanguage mode.
    -If we run PS Version 4 (Win 7 or 8)…

    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. Get-ChildItem and Test-Path on IIS:\SslBindings can fail to show SNI bindings

    On IIS8

    After Importing the WebAdministration module and using Get-ChildItem and Test-Path against IIS:\SslBindings I find it gives it can give inconsistent results.

    If I create a new site with only an SNI SSL binding and try to enumerate the SSL bindings using either

    Test-Path IIS:\SslBindings!443!my.test.site
    (which will return false)
    or
    Get-ChildItem -Path IIS:\SslBindings\
    (which can fail to return the SNI bindings)

    Adding a HTTP binding to the IIS site makes these SNI SslBindings visible (it can be removed afterwards).

    This does not occur using netsh http show sslcert which seems to return the information reliably.

    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. 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 →
  18. Add write-information logic to write-warning and error

    Please give Write-Warning and Error the same functionality as the new write-information in WMF5.0.

    Would especially like the tag functionaliy

    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. "Logon as a Service"

    Please create Cmdlets allowing us to query, add and remove the "Logon as a Service" right to users and groups in a reasonably performant manner.

    I have found that all solutions involving secedit take far too long to execute across hundreds of servers. Whilst this I could work around this by creating background jobs and running them in parallel, it would be great if we had native PowerShell Cmdlets that work fast enough that we don't have to worry about this.

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  20. Get or Set-WebConfiguration and Get or Set-WebConfigurationProperty does not work for 32-bit applications when pspath is 'MACHINE/WEBROOT'

    When configuring IIS using Powershell, the cmdlets that read or write to configuration do not work when the application pool is 32-bit.

    There is no way of specifying the "bitness" of the application therefore by default the configuration is written to the web.config file in the Framework64 folder which is ignored for 32-bit applications.

    This is also the case for IIS manager when using "Configuration Editor". You can choose the location of "Root Web.Config <location path="my website"> however this ignores whether the application is 32 or 64 bit and always writes to the 64 bit location in the Framework64 folder.

    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