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. Unregister-ScheduledJob -Name 'Name' -WhatIf does not honor WhatIf

    Steps to reproduce

    Import-Module PSScheduledJob
    Register-ScheduledJob -Name 'test' -ScriptBlock {echo 'hello world'}
    Unregister-ScheduledJob -Name test -WhatIf
    Get-ScheduledJob

    Expected behavior

    I expect the job to still be there.

    It does work with Unregister-ScheduledJob -Id 11 -WhatIf.

    Actual behavior

    The scheduled job is corrupted.

    Get-ScheduledJob : Cannot get the test scheduled job because it is corrupted or in an irresolvable state. Because
    it cannot run, Windows PowerShell has deleted test and its results from the computer. To recreate the scheduled
    job, use the Register-ScheduledJob cmdlet. For more information about corrupted scheduled jobs, see
    aboutScheduledJobs_Troubleshooting.

    Environment data

    > $PSVersionTable
    Name Value

    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 →
  2. 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 →
  3. 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 →
  4. 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 →
  5. 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 →
  6. "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 →
  7. BUG: Set-Clipboard -AsHtml puts invalid CF_HTML on clipboard with non-ASCII text

    Repro with PowerShell 5.1.14986.1000:
    1) Set-Clipboard -AsHtml "abc"
    2) Paste into Word
    3) Text appears correctly as: abc
    4) Set-Clipboard -AsHtml "àbc"
    5) Paste into Word
    6) Text appears incorrectly as: ࢣ

    Appears CP 1251 text is being put in the CF_HTML, not UTF8.

    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 →
  8. Get-Content bug: A parameter cannot be found that matches parameter name 'Encoding'

    Get-Conent with the Encoding parameter works against local file system paths such as this example:
    Get-Content -Encoding Byte -Path C:\Users\desktop.ini

    However, against a mapped network drive it does not:
    Get-Content -Encoding Byte -Path I:\Users\desktop.ini
    Get-Content : A parameter cannot be found that matches parameter name 'Encoding'.
    At line:1 char:13
    + Get-Content -Encoding Byte -Path I:\Users\desktop.ini

    The issue can be re-produced against a non-existing network drive as well.
    The behaviour is not expected and the error message is very misleading to users who don`t know what dynamic parameters is, since the same code works against a local path where -Encoding is…

    4 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 →
  9. 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 →
  10. Get-Service throws wrong exception if remote host is offline

    Get-Service returns exception as "Cannot find any service with service name" even if we give an offline/not existing host as argument for -ComputerName parameter

    4 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. 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. Don't require -LogName parameter for Write-EventLog

    The documentation https://msdn.microsoft.com/en-us/powershell/reference/5.1/microsoft.powershell.management/write-eventlog#-logname says it's required.
    However, the .NET framework doesn't require it (https://msdn.microsoft.com/en-us/library/system.diagnostics.eventlog.source.aspx clearly shows this in example, and the documentation says Source names must already be unique), so why does PowerShell?

    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. 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 →
  14. 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 →
  15. WMF5.1 - Get-ComputerInfo unable to find entry point GetFirmwareType

    Running the new Get-ComputerInfo returns the following error
    C:&gt; Get-ComputerInfo
    Get-ComputerInfo : Unable to find an entry point named 'GetFirmwareType' in DLL 'kernel32.dll'.

    This is on a XenDesktop VM hosted on VMWare, so I guess it's due to the desktop being virtualised. OS is Win7x64

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

    We’ll send you updates on this idea

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

Feedback and Knowledge Base