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-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 →
  2. 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 →
  3. Format-Wide : Allow -AutoSize (or a -Compact) parameter to shrink spacing between columns

    Format-Wide doesn't allow AutoSize and Column in the same command because AutoSize is used to determine number of columns by itself. Column alone used the console width and you get alot of spacing.

    It would be really useful to be able to run Format-Wide -Column 5 -AutoSize to let it shrink the spacing between the columns just like -AutoSize does in Format-Table. Or add a new -Compact-switch.

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  4. [System.ServiceProcess.ServiceController] should add StartType to its formatting

    Get-Service | Format-List
    Get-Service | Format-Table

    should display the "StartType" column, i.e. "StartType" should appear in "System.ServiceProcess.ServiceController" <TableControl> and <ListControl> in DotNetTypes.format.ps1xml.

    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 →
  5. Start-Transcript: poor error message on a bad -Path

    The following command

    Start-Transcript \zz*\z.log
    

    produces an error

    Start-Transcript : Transcription cannot be started.
    
    At C:\tmp\_160209_203322\test.ps1:2 char:1
    + Start-Transcript \zz*\z.log
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [Start-Transcript], PSInvalidOperationException
    + FullyQualifiedErrorId : CannotStartTranscription,Microsoft.PowerShell.Commands.StartTranscriptCommand

    The reason of the error is a bad -Path argument.
    It is difficult to get this from the error information.

    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 →
  6. PowerShell: Get-Service ComputerName parameter binding bug

    Please refer to the following examples. The ComputerName parameter (ValueFromPipelineByPropertyName) in combination with the "Name" or "DisplayName" parameters does not always scan the correct computers with the Get-Service cmdlet. Just in the first case, all target comptuers are queried. In the other cases, the first object is queried multiple times.

    $Objects = [PSCustomObject] @{ ComputerName = 'LON-DC1' }, [PSCustomObject] @{ ComputerName = 'LON-CL1' }

    SUCCESS: Works as expected, gets the service for each machine

    $Objects | Get-Service -Name Netlogon | Format-Table MachineName, ServiceName, Status -AutoSize

    MachineName ServiceName Status


    LON-DC1 Netlogon Running
    LON-CL1 Netlogon Running

    ERROR: Uses the first comptuer name

    3 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. $_ should be accessible without curly brackets with Where-Object

    Votes from Connect: 5

    Original Date Submitted: 10/30/2014 6:04:29 AM

    Description:
    Contact Information
    Handle: Peter M10
    Site Name: PowerShell
    Feedback ID: 1014939


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

    Problem Description:
    I would like to access the pipeline object with Where-Object without curly brackets like so:

    1..10 | Where-Object $_ % 2 -eq 1

    to get only uneven numbers.

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

    Repro Steps:
    1..10 | Where-Object $_ % 2 -eq 1

    Expected Results:
    Gives an "Cannot validate argument on parameter 'Property'."…

    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 →
  8. Write-Error allows both Message and Exception parameters without an error saying the parameters are mutually exclusive

    Votes from Connect: 3

    Original Date Submitted: 8/22/2014 2:01:53 AM

    Description:
    Contact Information
    Handle: Aaron Jensen
    Site Name: PowerShell
    Feedback ID: 951925


    Frequency: Always Happens
    Regression: I do not know if this issue existed previously

    Problem Description:
    Write-Error isn't supposed to take both a message and an exception (see help Write-Error), but you can pass both without getting the "Parameter set cannot be resolved using the specified named parameters." error message.

    Also, when you use Write-Error in a catch block, and use both parameters, the original exception bubbles up instead of what gets written with Write-Error.

    Product Studio item…

    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 →
  9. New Get-Content parameter for XML content support

    Votes from Connect: 19

    Original Date Submitted: 12/19/2010 9:54:31 PM

    Description:
    Contact Information
    Handle: Shay Levi
    Site Name: PowerShell
    Feedback ID: 632433


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

    Problem Description:
    To load an XML file we usually do the following:

    $xml = xml

    To make it easier and type less I suggest to add a new parameter:

    $xml = Get-Content -Path .\file.xml -AsXml

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

    Repro Steps:
    Expected Results:

    Internal BugId: 2772

    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 →
  10. Get-DnsServerResourceRecord returns duplicate records when a subzone name matches the parent zone name.

    BUG: Get-DnsServerResourceRecord returns incorrect objects with the FQDN name in the hostname field if the parent zone contains a subzone with the same name.

    Reproduction:

    Setup:
    Create a DNS zone:

     testzone.fake.domain.zzz
    

    Create a sub zone:

     testzone.fake.domain.zzz 
    
    (subzone fqdn: testzone.fake.domain.zzz.testzone.fake.domain.zzz)

    Create an A record:

     Zone Name: 
    
    testzone.fake.domain.zzz (the parent zone)
    Record Name:
    testrecord
    Data:
    10.1.2.3

    Create an A record:

     Zone Name: 
    
    testzone.fake.domain.zzz.testzone.fake.domain.zzz (the subzone)
    Record Name:
    testrecord
    Data:
    10.3.2.1

    Test:
    Get-DnsServerResourceRecord will return these records:
    Item# HostName______________________________________________________ RecordData RecordType

    1 testrecord                                                     10.1.2.3   A
    
    2 &lt;various&gt; &lt;various&gt; &lt;various&gt;
    3 testzone.fake.domain.zzz 10.1.2.3 A
    4 testrecord.testzone.fake.domain.zzz.testzone.fake.domain.zzz 10.3.2.1 A
    5 &lt;various&gt;.testzone.fake.domain.zzz &lt;various&gt; &lt;various&gt;

    Item 1…

    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 →
  11. DISM creates corrupt archive

    If two (or more) files are present with the exact same content, where file extension is irrelevant also content of file, as long as its the exactly the same; Dism will create a corrupted archive

    e.g.

    a.txt & b.txt

    Content of both files: 0x6c

    Shouldn't this be a case for the dedublication? Both files are separeted inside the wim (Both have only 1 link)

    https://sourceforge.net/p/sevenzip/discussion/45798/thread/db110477b8/

    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 →
  12. Update-Help doesn't work for some modules because HTTP redirection on module's Help URI

    Update-Help doesn't work for some modules because there're >10 redirection on module's given Help URI.
    On my machine concerned modules are:
    ConfigDefender, Defender, HgsClient, HgsDiagnostics, Microsoft.PowerShell.Operation.Validation, ShieldedVMDataFile, UEV, Whea, WindowsDeveloperLicense.
    Step to reproduce:
    -Open Windows Powershell 5.1.18362.628 on a Windows 10 1909 machine
    -Type: Update-Help -UICulture en-US -Scope AllUsers -Force -Verbose -Debug

    Expected behavior: Help is updated
    Actual behavior: You receive this error: "Update-Help: Failed to update Help for the module(s) 'ConfigDefender, Defender, HgsClient, HgsDiagnostics, Microsoft.PowerShell.Operation.Validation, ShieldedVMDataFile, UEV, Whea, WindowsDeveloperLicense' with UI culture(s) {en-US} : A Help URI cannot contain more than 10 redirections. Specify a valid Help URI.."

    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 →
  13. Powershell webadministration module commandlet new-WebApplication fails in double-hop

    in the WebAdministration module, the commandlet "new-WebApplication" fails if the physicalPath is a UNC location.

    AppCmd.exe and the .NET lib Microsoft.Web.Administration do not have this limitation.

    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. [Bug] module actrivedirectory 1.0.1.0 - Set-Location on PSDrive with PSProvider active directory

    There seems to be a problem to use Set-Location on a specific mounted Active Directory PSDrive, with the new Version of activedirectory module 1.0.1.0

    the commands bellow do all work on module 1.0.0.0

    PSDrive mapping:
    New-PSDrive -Name "myAD" -PSProvider ActiveDirectory -Root "DC=A,DC=B,DC=C,DC=D"

    works:
    Set-Location "myAD:"

    does not work anymore:
    Set-Location "myAD:\OU=subOU"

    does not work
    PS myAD:&gt; cd subOU

    does not work
    PS myAD:&gt; set-location "subOU"

    Error:
    Set-Location : The object name has bad syntax
    At line:1 char:1
    + Set-Location "OU=subOU,DC=A,DC=B,DC=C,DC=D"
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (\\RootDSE\\Root...s,DC=C,DC=D:String) [Set-Location], ADException
    
    + FullyQualifiedErrorId : ADProvider:ItemExists::ADError,Microsoft.PowerShell.Commands.SetLocationCommand

    Set-Location : Cannot find path 'myAD:\RootDSE\OU=subOU,DC=A,DC=B,DC=C,DC=D,DC=A' because…

    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 →
  15. Get-VMProcessor doesn't show state of ExposeVirtualizationExtensions

    Set-VMProcessor -ExposeVirtualizationExtensions $true -VMName <VMNAME>

    Get-VMProcessor -VMName <VMNAME>

    This should show a column for ExposeVirtualizationExtensions but it doesn't

    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 →
  16. convertto-json fails on result from Get-AzDiagnosticSetting

    The user reported an issue of Convertto-json cmdlet.
    Here is the details. Please take a loot at it.

    https://github.com/Azure/azure-powershell/issues/10216

    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 →
  17. ActiveDirectory PowerShell module isn't thread-safe

    Accessing Active Directory Web Services (ADWS) by launching and running a number of PowerShell Runspaces in parallel from within the same process makes ADWS fail with error message "invalid enumeration context".

    Apparently, the ActiveDirectory PowerShell module is not thread-safe.

    Please fix soon. There is no workaround for this issue.

    See this repository for steps to reproduce:

    https://github.com/SetTrend/powershell-test

    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 →
  18. Honour -Confirm and -WhatIf on Remove-PrintJob Cmdlet

    -Confirm & -WhatIf Optional Parameters not honoured on Remove-PrintJob even though they are included in documentation.

    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 →
  19. Bug: Write-Output -InputObject (,'Test') -NoEnumerate

    The -NoEnumerate switch doesn't work when when the input is named using the -InputObject argument in PowerShell version 5.1.

    The following script returns False:

    Function Test {Write-Output -InputObject (,&#39;Test&#39;) -NoEnumerate}
    
    (Test) -is [Array]

    While this script returns True:

    Function Test {Write-Output (,&#39;Test&#39;) -NoEnumerate}
    
    (Test) -is [Array]

    $PSVersionTable

    Name Value


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

    This issue doesn't appear with PowerShell Core 6.2

    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 →
  20. ConvertFrom-String

    Make ConvertFrom-String available in PowerShell core as it's super useful when parsing txt files.

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

Feedback and Knowledge Base