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. BUG: new-localuser fails to allow connection to Microsoft account

    The New-LocalUser cmdlet available in Windows 10 Anniversary Update cannot perform a function described in the documentation.

    Local user accounts may be connected with existing Microsoft accounts. New-LocalUser should support this by accepting a -Name parameter of the form "MicrosoftAccount<user>@outlook.com". This is described in the detailed help.

    However this fails because the parameter fails validation as it is over 20 characters in length (already true with "MicrosoftAccount" and "@outlook.com" let alone the "actual" user name). The 20 character limit is valid for a regular local account name, but shouldn't be valid for an MS account name.

    There appears no other…

    10 votes
    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 →
  2. performance of out-null drastically worse then using [void] or assigning result to $null

    Votes from Connect: 4

    Original Date Submitted: 3/28/2015 6:08:31 AM

    Description:
    Contact Information
    Handle: JasonHorner
    Site Name: PowerShell
    Feedback ID: 1208677


    Frequency: PowerShell
    Regression: gci | out-null
    void

    $null = gci

    run the above inside of measure-command the problem gets worse as the number of iteration increase

    Problem Description:
    It seems to me that:

    gci | out-null

    should be the preferred way of expressing: discard output in PowerShell

    However when running timings against alternatives
    some of the the other constructs are much faster:

    void

    $null = gci

    I realize this is likely due to the pipeline overhead. Would it be…

    10 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 →
  3. Test-Connection should support suppressing errors and returning the full result objects

    Use case:

    Test-Connection (1..15 | % { "comp{0:00}" -f $ }) -Count 1 | select Address, IPV4Address, ResponseTime, @{Name='Success'; Expression={$.StatusCode -eq 0}} | ft

    Currently, the code above will produce a table with successful pings, interleaved with error records for unreachable machines. It would be very useful to be able to provide a switch so that Test-Connection would return objects with appropriate status instead of errors.

    As an icing on the cake, the objects returned by Test-Connection could be extended with a bool Success property, calculated based on StatusCode (like in the example above).

    9 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. Smartcard support

    Add Smartcard support to Get-Credential in Powershell 7. Add a cmdlet for enumerating certificates on a smartcard

    8 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. "Get-ADGroupMember: An operations error occurred" with cross-forest members

    Any group that contains a user account that is cross-forest to the group object is hitting the non-descriptive error in the title when running Get-ADGroupMember. I can successfully run the command with on groups where all members are in the same forest as the group object.

    The current workaround is to use Get-ADGroup and expand the Members property and then make a subsequent Get-ADObject call for each member. This takes about 5x longer to run.

    8 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 →
  6. BUG: Get-RDSessionCollection always generates exception on Windows Server 2019

    Get-RDSessionCollection of the RemoteDesktop module always throws an exception:

    PS C:\windows\system32> Get-RDSessionCollection
    New-Object : Exception calling ".ctor" with "1" argument(s): "Invalid parameter "
    At C:\windows\system32\WindowsPowerShell\v1.0\Modules\RemoteDesktop\SessionDesktopCollection.psm1:520 char:14
    + ... $scope = New-Object System.Management.ManagementScope("\" + $Conn ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException 
    
    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

    CollectionName Size ResourceType CollectionType CollectionDescription


    mycollection 0 RemoteApp programs PooledUnmanaged My first collection

    PS C:\windows\system32>

    --

    Changing C:\Windows\System32\WindowsPowerShell\v1.0\Modules\RemoteDesktop\SessionDesktopCollection.psm1 line 520

    $scope = New-Object System.Management.ManagementScope("\" + $ConnectionBroker + "" + $wmiNamespace, $connectionOptions)

    into

    $msuri = "\" + $ConnectionBroker + "" + $wmiNamespace
    $scope = New-Object System.Management.ManagementScope($msuri, $connectionOptions)

    fixes the problem.

    This issue breaks…

    8 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. "Test-NetConnection" add timeout

    please add timeout to "Test-NetConnection" see https://superuser.com/q/805621/216033

    8 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. Compress-Archive does not include hidden files/folders

    Creating an Archive with Compress-Archive does not include hidden files of folders.

    I would recommend to adapt the behavior of Windows internal compressed Zip functionality which is including hidden files by default.
    Additional i would prefere a sidenote in the documentation of

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

    We’ll send you updates on this idea

    survey  ·  1 comment  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  9. [BUG] Start-Process might not return Handle/ExitCode

    Issue:
    In order to obtain the Exit Code from a Process we are executing the Start-Process cmdlet with the following parameters:
    -PassThru -Wait -WindowStyle Hidden
    or
    -PassThru -Wait -NoNewWindow

    In rare cases, this leads to the following exception:
    System.Management.Automation.CmdletInvocationException: Cannot process request because the process (<ProcessIdHere>) has exited. ---> System.InvalidOperationException: Cannot process request because the process (<ProcessIdHere>) has exited.
    at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
    at System.Diagnostics.Process.OpenProcessHandle(Int32 access)
    at System.Diagnostics.Process.get_Handle()

    After the Exception occurred, the returned Object does not contain a Handle nor Exit Code but the executable itself executed without issue.

    We also tried to remove the “-Wait” Parameter and…

    7 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. Better Write-Progress bar, like in yarn.

    The current Write-Progress bar is ugly, and shows at the top of the sreen. Showing yello text over dark cyan, representing progress with some weird circles...

    It should be more like the yarn progress bar, that shows immediately after the command.

    https://imgur.com/GfJRHfp

    7 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 →
  11. Change the default for Windows System's Culture, DateFormat & Local settings.

    At present the Regional & Localisation Powershell commands are per user &/or session based.

    There does not appear to be a way to change the default Regional settings for all users. eg: Default user, System User &/or the setting for the entire windows system. (ie All System accounts, all existing accounts & any new ones etc)

    I'd like an option on the existing powershell commands to force a system wide change for default accounts & possibly for all existing accounts.

    The goal is to change the DateFormat, Culture & Location to something else. In our case DMY & Australia

    Background: …

    7 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 →
  12. Get-ComputerInfo most properties are empty

    I try the new CMDLet Get-ComputerInfo, but the most properties in the result are empty.
    Only this properties show values:
    WindowsBuildLabEx,WindowsCurrentVersion,WindowsEditionId,WindowsInstallationType,WindowsInstallDateFromRegistry,WindowsProductId,WindowsProductName,WindowsRegisteredOrganization,WindowsRegisteredOwner,WindowsSystemRoot,TimeZone,LogonServer,PowerPlatformRole,DeviceGuardSmartStatus

    Try also as Admin and with different Hardware and VM's. (Windows 10 x64 Versiom 1607)

    Beste regards
    brima

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

    We’ll send you updates on this idea

    survey  ·  2 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  13. Bug: Integrated Modules are not loaded if you have a Network Path in $env:PSModulePath which is not reachable

    Integrated Modules are not loaded if you have a Network Path in $env:PSModulePath which is not reachable.

    #

    I have customized the PSModulePath:

    PS C:\Users\username> ($env:PSModulePath).split(';')
    C:\Users\username\Documents\WindowsPowerShell\Modules
    C:\Program Files\WindowsPowerShell\Modules
    C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
    c:\Program Files\Microsoft Security Client\MpProvider\
    C:\Program Files\Microsoft Monitoring Agent\Agent\PowerShell\
    \my.domain\share\Modules\

    #

    If i try to execute e.g. Invoke-RestMethod

    PS C:\Users\username> Invoke-RestMethod
    Invoke-RestMethod : The 'Invoke-RestMethod' command was found in the module 'Microsoft.PowerShell.Utility', but the
    module could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.Utility'.
    At line:1 char:1
    + Invoke-RestMethod
    + ~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (Invoke-RestMethod:String) [], CommandNotFoundException
    
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

    PS C:\Users\username> Get-Command Invoke-RestMethod
    Get-Command : The term…

    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 →
  14. "update-help -module powershellget" errs apparently because helpinfoURI is called with https rather than http

    update-help : Failed to update Help for the module(s) :
    'PowerShellGet'
    The HelpInfoURI https://go.microsoft.com/fwlink/?LinkId=393271 does not start with HTTP.
    At line:1 char:1
    + update-help -module powershellget
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (HelpInfoUri:Uri) [Update-Help], Exception
    
    + FullyQualifiedErrorId : InvalidHelpInfoUriFormat,Microsoft.PowerShell.Commands.UpdateHelpCommand

    6 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 →
  15. Improve the speed of Get-EventLog

    As you describe here:
    https://blogs.technet.microsoft.com/heyscriptingguy/2011/03/08/how-to-improve-the-performance-of-a-powershell-event-log-query/
    The Get-EventLog command is slow. Using Get-WinEvent is much faster.The Get-EventLog is still easier to use though.
    Maybe Get-EventLog could be refactored to use Get-WinEvent

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

    We’ll send you updates on this idea

    survey  ·  1 comment  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  16. Non-closing Out-Gridview for running custom functions

    When writing scripts for endusers without powershell - knowledge the Out-Gridview -PassThru is a great way of providing a GUI for a user menu. You can find a good example here:
    https://mcpmag.com/articles/2016/02/17/creating-a-gui-using-out-gridview.aspx

    Many times the user just wants to 'Run' what he selects with a 'Run' Button without closing the view. The problem with the current Out-Gridview -PassThru is that the view closes after you click OK or Cancel. So we need to create a loop around it to make the Out-Gridview start all over again. Pretty crude but it works.

    I'm not sure how easy that is but I'm…

    6 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 →
  17. 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 →
  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. Make ad-hoc use of Get-WinEvent easier

    Being a longtime user of PowerShell, I am used to using Get-EventLog at the command line to quickly check the event log entries. I have tried the same specific scenarios where I use Get-EventLog at the command line but with Get-WinEvent instead and they are much more complicated. For example, it's just so easy to:

    Get-EventLog System -Newest 20 -EntryType Warning,Error

    Comparitively speaking, the same functionality can be had with Get-WinEvent with this syntax, although it is much less intuitive:

    Get-WinEvent -FilterHashtable @{LogName='System';Level=@(1,2)} -MaxEvents 20

    Note that I only came up with this syntax after figuring out the integer equivalents…

    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 →
  20. Accept NuGet Interval Notation for Specifying Version Numbers

    When attempting to load a module by fully qualified module name, PowerShell should allow for a single "ModuleVersion" field that accepts NuGet's interval notation for specifying ranges. This change could be added without breaking change as this spec (in interval notation):

    $fqn = @{ModuleName='BingWallpaper';ModuleVersion='1.0'}

    Tells PowerShell to load any module >= 1.0 which is backwards compatible with how PowerShell would interpret that version string today. But if I wanted to follow semver rules, I could specify:

    $fqn = @{ModuleName='BingWallpaper';ModuleVersion='[1.0,2.0)'}

    Which says load any matching module >= 1.0 but < 2.0.

    The interval notation is quite expressive. See the NuGet docs…

    6 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 →

    We understand that this would allow a single-point expression of MinimumVersion and MaximumVersion. However, it’s unclear why changing to that nomenclature going to be a high priority. Additional information, particularly about why the existing functionality is insufficient – would help – thanks!

  • Don't see your idea?

Feedback and Knowledge Base