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. OutVariable gets the output from the next command (select) in the pipeline

    When running something like:
    gsv -ov all | sort -ov sorted | select name -first 10 -ov first10

    I'd expect $all.Count to be equal to $sorted.Count, but $sorted.Count is 10 and contains the same objects as $first10.
    This is different than in older versions (tried with -ver 2, and the variables have the expected objects. e.g. $all.Count == $sorted.Count)

    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. Hardware Manufacturing Guides: Adding DISM cmdlets in PowerShell to complement guides & GitHub contribution

    Following the Manufacturing guides - the PowerShell DISM Module is still lacking several cmdlets for the remaining DISM command lines available in the command prompt.
    Is there a reason for not having them all there?
    I wanted to make some scripts for the module, but could only find the DSC xDISMFeature
    Is there a DISM Module GitHub repository?

    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. [bug]: Get-ADUser -Filter {[attribute] -ne "ms"} filters out objects that return as null

    If you do a get-aduser -filter {company -ne "ms"}, the results filter out accounts that have no value for the company attribute defined. In my opinion this should not be the expected behavior; it should return all accounts, including the ones with a null company attribute, however it should not include results that have the company equal to "ms". The same behavior is also present with other attributes, such as "manager".

    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. [BUG]New-PSDrive FileSystem does not work for Backup-SqlDatabase

    The -BackupFile parameter for the Backup-SqlDatabase cmdlet does not work properly with a drive created with the New-PSDrive cmdlet. It will first pull the default backup drive for the SQL Server then append the string for the file system. For example:

    New-PSDrive -Name "fs" -PSProvider FileSystem -Root "\MyFileServer\Backups"
    Backup-SqlDatabase -Database "MyDatabase" -ServerInstance "MySQLServer" -BackupFile "fs:\MyDatabase.bak"

    Would error with "Cannot find the path 'C:\BackupPath\fs:\MyDatabase.bak'"

    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. When is Powershell v6 due to be released?

    When is Powershell v6 due to be released Will it work with Windows 10?

    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. Expand-Archive does not return a System.IO.FileInfo nor System.IO.DirectoryInfo

    The docs clearly say that Expand-Archive should return a System.IO.FileInfo or System.IO.DirectoryInfo but it has no output

    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 →
  7. [Bug] Test-Path -PathType Containers Allows Users to Bypass Security Restrictions on Existence Testing

    Under PowerShell 5.1, the Test-Path command will return a [UnauthorizedAccessException] when you try to test a path the current user does not have access to. Normally this error is uncatchable, but it becomes so if you set the PathType to Container. Despite the name, Test-Path will verify the existence of both Containers and Leafs in this mode. Because the [UnauthorizedAccessException] error is ONLY returned for extant files and folders, a user can use it to confirm the existence of files and folders they should not be able to see or access.

    This one-liner allows you to bypass security restrictions:
    try{…

    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 →
  8. Does sqlps need to be imported for PS vers 4.0

    In PS 3.0, it was known to have to do an Import-Module sqlps -DisableNameChecking command in order to get the SQL SMO CMDLETS for working with SQL Server. Is this still needed for PS 4.0? There doesn't seem to be any Documentation on this difference.

    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. BUG: Import-Module does not autocomplete parameter switch "-Name"

    Typing "Import-Module -Na<tab>" does not autocomplete to "-Name", as if parameter switch "-Name" is no recognized.

    Other switches "-g<tab" and so forth work ok

    $PSVersionTable.PSVersion
    Major Minor Build Revision


    5 1 14393 953

    @arisaastamoinen

    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. Property UserName and UserGroupName of Add-PswaAuthorizationRule command don't work

    OS : Windows Server 2016

    The command prompt an error when I add authorization rule in PowerShell Web Acces. It's syntax error : "domain/user".

    But, this is my commande :
    Add-PswaAuthorizationRule -ComputerName SRVDC01 -UserName 'FRPSUG\Test' -ConfigurationName Microsoft.PowerShell

    It's same issue with group, no quote, simple quote, double quote, local user...

    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. 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 →
  12. 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 →
  13. 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 →
  14. 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 →
  15. 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 →
  16. 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.

  17. 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 →
  18. 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 →
  19. 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.

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

Feedback and Knowledge Base