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. 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!

  2. New-ScheduledTaskTrigger missing option to NOT 'Synchronize across time zones'

    New-ScheduledTaskTrigger missing option to NOT 'Synchronize across time zones'

    The default is to always set it. This should not be an implied default as it creates problem with Daylight Saving etc.

    To remove must do as follows which should not be needed:

    $str = Get-ScheduledTask -TaskName TESTTASK

    $NewTriggers = @()
    foreach($trigger in $str.Triggers)
    {

    if($trigger.StartBoundary -match &#39;\+01:00$&#39;)
    
    {
    $Trigger.StartBoundary = $Trigger.StartBoundary.Substring(0,$Trigger.StartBoundary.Length-6)
    }
    $NewTriggers += $trigger

    }

    $str.Triggers = $NewTriggers
    Set-ScheduledTask -InputObject $str

    Please add switch to disable either through New-ScheduledTaskTrigger or via Set-ScheduledTask

    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 →
  3. [BUG] Get-LocalGroupMember and unresolved SID throws error

    If there is an unresolved SID in a local group the cmdlet Get-LocalGroupMember (and maybe others) throws and error.

    Module: Microsoft.PowerShell.LocalAccounts

    Get-LocalGroupMember : Failed to compare two elements in the array.
    At line:1 char:1
    + Get-LocalGroupMember -Group 'RDS Endpoint Servers'
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Get-LocalGroupMember], InvalidOperationException
    
    + FullyQualifiedErrorId : An unspecified error occurred.,Microsoft.PowerShell.Commands.GetLocalGroupMemberCommand

    If the SID is removed, the cmdlet once again works as expected.

    5 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. Get-ChildItem -LiteralPath doesn't support long path

    Get-ChildItem -LiteralPath doesn't support long path, for example:

    Get-ChildItem -LiteralPath 'D:\aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeffffffffffgggggggggghhhhhhhhhhiiiiiiiiiijjjjjjjjjjkkkkkkkkkkllllllllllmmmmmmmmmmnnnnnnnnnnooooooooooppppppppppqqqqqqqqqqrrrrrrrrrrssssssssssttttttttttuuuuuuuuuuvvvvvvvvvvwwwwwwwwwwxxxxxxxxxxyyyyyyyyyyzzzzzzzzzz.txt'

    Which path is longer than 260 bytes, even if the file DO exists in that path.

    But Get-ChildItem WITHOUT -LiteralPath works well with that long-path file.

    $PSVersionTable

    Name Value


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

    5 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 →
  5. Make Add-Type support .EXE assemblies (works on rename to .DLL)

    Running Add-Type with a .EXE assembly gives, 'Cannot add type. The ".EXE" extension is not supported'. But it works if I rename the assembly to .DLL. I think this limitation is artificial and should be removed.

    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 →
  6. Set-mpioSetting -NewRetryInterval input validation is too strict

    When I run the following command in powershell
    (Windows Server 2012 R2, PS Version - 5.1.14409.1005)

    "Set-mpioSetting -NewRetryInterval 1 "
    returns the error
    "Set-MPIOSetting : Cannot validate argument on parameter 'NewRetryInterval'. The 1 argument is less than the minimum allowed range of 3. Supply an argument that is greater than or equal to 3 and then try the command again."

    The documentation at https://docs.microsoft.com/en-us/powershell/module/mpio/set-mpiosetting?view=win10-ps says that the default is 1 second, and we can use the GUI to be able to set the retry interval, but I want to be able to use powershell to automate the configuration of my…

    5 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 →
  7. How do I download modules manually from gallery behind a firewall/proxy?

    For companies like banks which are very restrictive regarding internet downloads, I have no internet connectivity directly from powershell, only from my browsers. As such I cannot use install-module from powershell.

    Our desktops are only windows 7 but locked down running ps version 2 and powershell console doesn't have proxy access. I cannot run install-module on my servers neither as my servers have no internet connection.

    Is there a workaround to download a module manually as a zipped file so that I can I unzip and install them manually in my server?

    5 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 →
  8. Disable-ScheduledTask -TaskName will fail with tasks including spaces in name.

    Steps to reproduce

    Disable-ScheduledTask -TaskName "Data Integrity Scan for Crash Recovery"
    Disable-ScheduledTask : The system cannot find the file specified.
    At line:1 char:1
    + Disable-ScheduledTask "Data Integrity Scan for Crash Recovery"
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (PS_ScheduledTask:Root/Microsoft/...S_ScheduledTask) [ 
    

    Disable-ScheduledTask], CimException

    + FullyQualifiedErrorId : HRESULT 0x80070002,Disable-ScheduledTask
    

    Expected behavior

    This should disable the scheduled task and not crash.

    You can workaround this by searching for the task object and disabling that way:

    $Name = "Data Integrity Scan for Crash Recovery"
    Get-ScheduledTask | where-object {($_.TaskName -eq $Name)} | Disable-ScheduledTask

    Actual behavior

    Crashes with the following exception:
    Disable-ScheduledTask : The system cannot find…

    5 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. Start-Transcript Does Not Capture Enter-PSSession

    Start-Transcript
    "local stuff"
    Enter-PSSession Server1
    "remote stuff"
    Exit-PSSession
    "more local stuff"
    Stop-Transcript

    Transcript does not show the remote stuff.

    5 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 →
  10. Get-Date -UFormat %V is incorrect

    Get-Date -UFormat %V is supposed to return the ISO 6801 week number like Unix does. I don't understand what value it currently returns (I think it's nothing sensible), but it definitely is NOT the correct week number!

    5 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 →
  11. Add a Duration column to the History output

    The output of Get-History has Start and End times which can be put together to calculate a Duration. Why not add that to the default formatting of history objects?

    As a workaround, I use these:
    https://gist.github.com/Jaykul/2d4dc5e4f5195c726368435055b8acdb

    5 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 →
  12. 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.

    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 →
  13. 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 →
  14. SmbShare module localization does not work when UICulture is not en-US

    I am attempting to use invoke-command to run a script on a remote computer. The UICulture of my local machine is en-GB. During the execution of the script on the remote computer, it does an "Import-Module SmbShare". This fails with the following error:

    Cannot find the Windows PowerShell data file 'SmbLocalization.psd1' in directory 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\SmbShare\en-GB&#39;, or in any parent culture directories.

    Looking at the modules folder, I can see that the SmbShare folder does not contain an en-GB folder but does contain an en-US folder with an SmbLocalization.psd1 file inside. However, there is no default SmbLocalization.psd1 file located directly within the…

    5 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 →
  15. Add -Ordered switch to ConvertFrom-StringData to enable creating ordered hashtables.

    Votes from Connect: 6

    Original Date Submitted: 8/19/2014 2:22:41 PM

    Description:
    Contact Information
    Handle: Bartosz Bielawski
    Site Name: PowerShell
    Feedback ID: 949805


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

    Problem Description:
    Currently we can easily create ordered hashtable using [ordered]@{} syntax. I would like to be able to do the same using ConvertFrom-StringData cmdlet, preferably using switch parameter -Ordered

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

    Repro Steps:

    Order kept...

    [ordered]@{

    one = 1
    
    two = 2
    three = 3

    }

    Ordered not kept, as expected...

    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 →
  16. New-JobTrigger why is there no -Monthly switch?

    Votes from Connect: 3

    Original Date Submitted: 7/24/2014 8:47:12 PM

    Description:
    Contact Information
    Handle: Lee Wilmott
    Site Name: PowerShell
    Feedback ID: 927973


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

    Problem Description:
    Please can you add a "-Monthly" switch (including a "DaysOfMonth" parameter) to the New-JobTrigger cmdlet?

    Many thanks,

    Lee

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

    Repro Steps:
    Expected Results:

    Internal BugId: 8911

    5 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. AzureAD - Cannot properly read System.Byte[] value even when loading the module using "-UseWindowsPowerShell".

    AzureAD - Cannot properly read System.Byte[] value even when loading the module using "-UseWindowsPowerShell".

    Whenever I troubleshoot Conditional Access issues, I use to retrieve the certificate hash of AzureADDevice. Long story short, I retrieve "AlternativeSecurityIds.Key" property of AzureADDevice.

    Get-AzureADDevice -SearchString XXXX| fl displayname,deviceid,objectid,@{n='DevCerHash';e={ [System.Text.Encoding]::Unicode.GetString($_.AlternativeSecurityIds.key).substring(21,40) }}

    I know that PS7 isn't compatible with AzureAD module, and for this reason I use "-UseWindowsPowerShell" flag to load the module. Unfortunately, in PS5 the byte array is properly read, while in PS7 (-UseWindowsPowerShell) an object of wrong type is returned.

    Get-AzureADDevice -SearchString XXXX| select AlternativeSecurityIds |gm

    The above command returns "TypeName: Selected.Microsoft.Open.AzureAD.Model.Device" in PS5…

    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 →
  18. get-localgroup does not have SID parameter

    Get-Localgroup does not have SID parameter when running x86 version.

    Version: 5.1.17763.771 (x86)
    Running "(Get-LocalGroup -SID 'S-1-5-32-544').Name" will return error about non matched param.

    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 →
  19. Register-ScheduledTask

    Register-ScheduledTask -password parameter should accept secure string or PScredential. Currently it accept plain text and the password shows up in event log when register

    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 →
  20. get-credential with a smart card

    I work in an environment that enforces 'smart card required' for all accounts admin or otherwise so I have multiple certificates on the smart card. I understand you can use a smart card with get-credential but the problem is it only has the first cert available when prompted. I need there to be a way to make all certs on the smart card available when prompted with get-credential. I'm also stuck using ActivClient so hopefully this isn't a limitation of the smart card provider.

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

Feedback and Knowledge Base