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-Service Name parameter allows Null value

    Get-Service -Name $Null returns all services. Expected behavior would be for Name to have ValidateNotNullOrEmpty attribute assigned.

    4 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 →
  2. Get-Winevent - Execution with only -MaxEvents parameters specified

    When executing the Get-Winevent cmdlet with only the -MaxEvents parameter specified the cmdlet ends up in an infinite loop spewing errors:

    Get-WinEvent -MaxEvents 1

    Get-WinEvent : The data is invalid
    At line:1 char:9
    + $null = Get-WinEvent -MaxEvents 1
    + ~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Get-WinEvent], EventLogInvalidDataException
    
    + FullyQualifiedErrorId : The data is invalid,Microsoft.PowerShell.Commands.GetWinEventCommand

    I reproduced this error on PowerShell 5.1 and 4.0 on multiple systems. The behavior I expected was to receive the most recent event from any of the event logs. I feel this error could be prevented by using proper parameter validation.

    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 →
  3. 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 →
  4. 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.

  5. Invoke-RestMethod ignores ErrorAction parameter

    If a request made using Invoke-RestMethod receives a 400 or 500 error, it just calls Write-Error and always fails irrespective of the value of the ErrorAction parameter.

    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 →
  6. Resolve-Path should take [-Container] [-Leaf] [-Provider <string>]

    -Leaf only returns paths that resolve to leaf nodes
    -Container only returns paths that resolve to container nodes
    -Provider only returns paths that resolve to the provider specified

    As an example of why this is useful, the Get-FileHash cmdlet has the following code:

    begin {
    
    $hasher = [System.Security.Cryptography.HashAlgorithm]::Create($Algorithm)
    }
    process {
    $pathsToProcess = @()

    if($PSCmdlet.ParameterSetName -eq &#39;LiteralPath&#39;) {
    $pathsToProcess += Resolve-Path -LiteralPath $LiteralPath | Foreach-Object ProviderPath
    } else {
    $pathsToProcess += Resolve-Path $Path | Foreach-Object ProviderPath
    }

    foreach($filePath in $pathsToProcess) {
    if (Test-Path -LiteralPath $filePath -PathType Container) {
    continue
    }
    ...
    }
    }

    which can be simplified (and made more…

    2 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 →
  7. 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 →
  8. NPSRadiusClient cmdlets don't affect running NPS configuration, require IAS restart

    Changes made to RADIUS clients using the NPSRadiusClient cmdlets don't take immediate effect, unlike changes made using netsh. For these changes to take effect a restart of the IAS service is required.

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  9. 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 →
  10. 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 →
  11. [Bug] Module identity: #Require throw an exception if the path order change

    I have the following folders :

    Powershell v4

    > tree modules
    C:\TEMP\TEST\MODULES
    ├───Computer1.0
    │ └───Computer
    ├───Computer2.0
    │ └───Computer
    └───Computer3.0

    └───Computer
    

    C:\TEMP\TEST\FABRIKAMMODULES
    ├───Computer1.0
    │ └───Computer
    ├───Computer2.0
    │ └───Computer
    └───Computer3.0

    └───Computer
    

    Powershell v5

    C:\TEMP\TEST\MODULESV5
    └───Computer

    ├───1.0
    
    ├───2.0
    └───3.0

    C:\TEMP\TEST\FABRIKAMMODULESV5
    └───Computer

    ├───1.0
    
    ├───2.0
    └───3.0

    When a use the statement '#Requires -Modules' inside a script :
    #Requires -Modules @{ModuleName="Computer";ModuleVersion='1.0';GUID = '9df5e76c-91a5-46f2-8e3f-1683d42ea1c8' }

    I get an exception 'ScriptRequiresException'.

    Code :
    #---------------
    #..\Modules : GUID = 'a5d7c151-56cf-40a4-839f-0019898eb324'
    #..\FabrikamModules : GUID = '9df5e76c-91a5-46f2-8e3f-1683d42ea1c8'

    $oldPSModulePath=$env:PSModulePath

    $Path=$PSScriptRoot #c:\temp\Tests
    $env:PSModulePath +=";$Path\FabrikamModules\Computer1.0;$Path\Modules\Computer1.0"
    #OR $env:PSModulePath +=";$Path\FabrikamModulesV5;$Path\ModulesV5"

    ipmo -FullyQualifiedName @{ModuleName="Computer";ModuleVersion='1.0';GUID = '9df5e76c-91a5-46f2-8e3f-1683d42ea1c8' }
    Get-module Computer|Select Name,Version,GUID
    # Name Version Guid
    # ---- -------…

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  12. Set-UnifiedGroup -identity <name> -HiddenGroupMembershipEnabled:$True (Fails every time)

    I am unable to hide membership of modern groups. Same error every time. I am unable to create and use modern groups for private company purposes.

    We failed to update the unified group. Please try again later.

    + CategoryInfo          : NotSpecified: (:) [Set-UnifiedGroup], TaskException
    
    + FullyQualifiedErrorId : [Server=DM2PR0501MB1309,RequestId=075ee919-1a5a-453d-8f13-7808630a8a4e,TimeStamp=3/30/2016 3:50:16 PM] [FailureCategory=Cmdlet-TaskException] 3AA52605,Microsoft.Exchange.M

    anagement.RecipientTasks.SetUnifiedGroup

    + PSComputerName        : ps.outlook.com
    

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  13. DirectorySearcher's FindOne method returns data more slowly than FindAll.

    Please consider reviewing the underlying code and optimizing the DirectorySearcher .NET Class for performance.

    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 →
  14. Need PowerShell native alternatives to "cmd /c assoc" / "cmd /c ftype"

    Interacting with filetype associations in PowerShell today requires using "cmd /c assoc" and "cmd /c ftype", which involves nice quoting / parsing constraints.

    Native PowerShell mechanisms would be way better.

    One possible source of inspiration: http://www.mkssoftware.com/docs/man1/assoc.1.asp / http://www.mkssoftware.com/docs/man1/ftype.1.asp

    6 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 →
  15. 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 →
  16. 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 →
  17. 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 →
  18. invoke-command and get-adcomputer

    As it stands because Get-ADComputer uses the name property and invoke-command uses the Computername property results from Get-ADComputer cannot be piped in directly to the invoke-command cmdlet. Adding aliases for one or both properties to make them work together seamlessly would be great.

    6 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. Get-Credential Smart Card Across Domains

    When using New-PSSession -ComputerName -Credential (Get-Credential) and specifying a smart card certificate, authentication fails.

    The smart card option seems to pull my credentials from the domain my workstation is on (Alpha\Username) instead of passing the smart card certificate forward to be authenticated as (Bravo\Username).

    Is there a way to change or prevent this?

    Scenario:
    Username = "User"
    Workstation Domain = "Alpha"
    Server Domain = "Bravo"
    User is logged into his workstation and attempts to authenticate to his server in Bravo using his smart card. User's authentication is denied. The logs on the Server indicate that "Alpha\User" was denied access.

    This…

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

Feedback and Knowledge Base