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.

Please feel free to provide feedback or file bugs here.

(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. update-help : Failed to update Help for the module(s) 'Provisioning'

    I receive the following error when running Update-Help in PowerShell.

    PS C:\WINDOWS\System32\WindowsPowerShell\v1.0\Modules\Provisioning> update-help
    update-help : Failed to update Help for the module(s) 'Provisioning' with UI culture(s) {en-US} : Unable to retrieve
    the HelpInfo XML file for UI culture en-US. Make sure the HelpInfoUri property in the module manifest is valid or
    check your network connection and then try the command again.
    At line:1 char:1
    + update-help -force
    + ~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ResourceUnavailable: (:) [Update-Help], Exception
    + FullyQualifiedErrorId : UnableToRetrieveHelpInfoXml,Microsoft.PowerShell.Commands.UpdateHelpCommand

    PowerShell info:
    PS C:\> $PSVersionTable.PSVersion

    Major Minor Build Revision
    ----- ----- ----- --------
    5 1 15063 138

    26 votes
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)

      We’ll send you updates on this idea

      7 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
    • Position of PowerShell window appears behind Windows taskbar when taskbar is at top

      Dynamically detecting the taskbar position, and dynamically modifying the starting position of the powershell window when opening powershell might be a good solution. I am on Windows 10 with three monitors. The taskbar is locked, not automatically hidden, taskbar is only shown on main display.

      2 votes
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        I agree to the terms of service
        Signed in as (Sign out)

        We’ll send you updates on this idea

        0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
      • [BUG] Drag and drop to scripts shortcuts split paths containing spaces

        Drag and dropping any file to a script shortcut split this path before passing the splitted strings as multiple parameters. Here's my detailed Issue Report :

        Steps to reproduce
        ------------------

        1 - Get any script, for example :
        [samplescript.psd1] :
        ```
        param([string]$path)
        Write-Host($path)
        pause
        ```
        or a simpler one-line sample: ```Write-Host($args);pause```

        2 - Create a shortcut that runs the script :
        [Shortcut Target ] : ```PowerShell "path\to\our\samplescript.psd1"```

        3- Drag and drop a file containing spaces in its name to the shortcut
        [sample file ] : ```C:\Some file with spaces.txt```

        Expected behavior
        -----------------

        Drag and dropping the file should pass its…

        2 votes
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          I agree to the terms of service
          Signed in as (Sign out)

          We’ll send you updates on this idea

          1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
        • Invoke-WebRequest and Invoke-RestMethod not working correctly with REST API like cURL

          Hi,
          Recently I am working on a Telegram Bot creation with power shell, everything working fine except uploading the images via API.

          If I use cURL, it is working fine using following command, So, technically it should work with native PowerShell commandlet.

          curl -s -X POST "https://api.telegram.org/bot11111111:Mykey/sendPhoto?chat_id=-123456789" -F photo="@D:\MyPic.JPG" -F caption="Test"

          I have already tried following, but none worked. As per the API Guide (https://core.telegram.org/bots/api), we have to use multipart/form-data for uploading any file, for cURL, without specifying this also works.

          Invoke-RestMethod -Uri "https://api.telegram.org/bot$MyBotKey/sendPhoto?chat_id=XXXXXXXXX" -Method Post -InFile "D:\MyPic.JPG" -ContentType "multipart/form-data"
          Invoke-WebRequest -Uri "https://api.telegram.org/bot$MyBotKey/sendPhoto?chat_id=-XXXXXXXXX&quot

          1 vote
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            I agree to the terms of service
            Signed in as (Sign out)

            We’ll send you updates on this idea

            0 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
          • Import-Clixml - Serialized XML is nested too deeply.

            Import-Clixml 'data.xml'

            Import-Clixml : Serialized XML is nested too deeply.
            At line:1 char:1
            + Import-Clixml 'data.xml ...
            + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            + CategoryInfo : NotSpecified: (:) [Import-Clixml], XmlException
            + FullyQualifiedErrorId : System.Xml.XmlException,Microsoft.PowerShell.Commands.ImportClixmlCommand

            1 vote
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              Password icon
              I agree to the terms of service
              Signed in as (Sign out)

              We’ll send you updates on this idea

              0 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
            • [Bug] Get-Recipient Filter

              when using a variable in -Filter the Filter will not applied.

              Get-Recipient -Filter {EmailAddresses -like 'smtp:test@mail.com'}
              --> is working

              $EmailAddress = 'smtp:test@mail.com'
              Get-Recipient -Filter {EmailAddresses -like $EmailAddress}
              --> is not working

              $PSVersionTable

              Name Value
              ---- -----
              PSVersion 4.0
              WSManStackVersion 3.0
              SerializationVersion 1.1.0.1
              CLRVersion 4.0.30319.36399
              BuildVersion 6.3.9600.18773
              PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
              PSRemotingProtocolVersion 2.2

              1 vote
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                I agree to the terms of service
                Signed in as (Sign out)

                We’ll send you updates on this idea

                0 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
              • PowerShell Classes should allow properties with get and set

                PowerShell classes should more closely mirror the abilities of a C# class imported and allow full differentiation between fields and properties. Properties should allow getter and setter code blocks

                3 votes
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  I agree to the terms of service
                  Signed in as (Sign out)

                  We’ll send you updates on this idea

                  0 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                • Command line parsing bug: spaces and trailing slash

                  There appears to be a bug parsing arguments to EXEs. If you pass a properly-quoted path that has spaces and a trailing slash, the rest of the command is lumped into the same argument. This also happens if you use a PowerShell variable to hold the path string.

                  To repro, first, install EchoArgs.exe (if using chocolatey: cinst -y echoargs). It demonstrates what arguments would get passed to any exe.

                  Then run:

                  PS> & EchoArgs "C:\spaces and trailing slash\" more args

                  Echo args shows that it all got lumped into one argument:

                  Arg 0 is <C:\spaces and trailing slash" more args>

                  6 votes
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    I agree to the terms of service
                    Signed in as (Sign out)

                    We’ll send you updates on this idea

                    0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                  • Fix get-help for format-volume

                    under example 2 it says the following

                    This example performs a full format of the D volume using the FAT32 file system.
                    with the example code:
                    PS C:\> Format-Volume -DriveLetter C -FileSystem FAT32 -FullFormat –Force
                    The example code formats the c drive but the explaination say it will format the d drive could you please make it consistent.

                    1 vote
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      I agree to the terms of service
                      Signed in as (Sign out)

                      We’ll send you updates on this idea

                      0 comments  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                    • Get-Credential does not support Smart Card user name hints

                      If you utilize Smart Cards with certificates that are not directly linked to users (no suitable user DN in Subject and no UPNs in SANs), you are able to link a single certificate to multiple accounts dynamically with the caveat that users need to provide explicit user name hints during logon in order to log on.

                      User name hints need to be enabled via GPO or registry settings ("X509HintsNeeded"), after which all standard credential dialogs in Windows support them, except PowerShell's Get-Credential. This effectively prevents using PowerShell remoting with such Smart Cards / certificates if different credentials are required.

                      In…

                      6 votes
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        I agree to the terms of service
                        Signed in as (Sign out)

                        We’ll send you updates on this idea

                        0 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                      • Stop-Transcript -ErrorAction doesn't work

                        The ErrorAction parameter on Stop-transcript doesn't work.

                        for instance with SilenlyContine:

                        PS G:\> Stop-Transcript -ErrorAction SilentlyContinue
                        Stop-Transcript : An error occurred stopping transcription: The host is not currently transcribing.
                        At line:1 char:1
                        + Stop-Transcript -ErrorAction SilentlyContinue
                        + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        + CategoryInfo : InvalidOperation: (:) [Stop-Transcript], PSInvalidOperationException
                        + FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.StopTranscriptCommand

                        Or with stop:
                        Script: Stop-Transcript -ErrorAction Stop; write-output "This message sould not be printed"
                        Result: Stop-Transcript : An error occurred stopping transcription: The host is not currently transcribing.
                        At home\Untitled4.ps1:1 char:1
                        + Stop-Transcript -ErrorAction Stop
                        + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        + CategoryInfo : InvalidOperation: (:) [Stop-Transcript], PSInvalidOperationException
                        + FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.StopTranscriptCommand

                        This message sould…

                        1 vote
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          I agree to the terms of service
                          Signed in as (Sign out)

                          We’ll send you updates on this idea

                          0 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
                        • [Bug] Windows Management Framework 5.1, ExecutionPolicy set via "User Configuration" (Group Policy) does NOT apply to the "UserPolicy" scope

                          [Bug] On Windows Management Framework 5.1, ExecutionPolicy set via "User Configuration" (Group Policy) does NOT apply to the "UserPolicy" scope (defaults to "Undefined") on OSs other than Windows 10 and Windows Server 2016

                          Affected operating systems:
                          Windows Server 2012 (confirmed)
                          Windows Server 2008 R2 (confirmed)
                          Windows 8.1 (unconfirmed)
                          Windows 8 (unconfirmed)
                          Windows 7 SP1 (confirmed)

                          Explanation:
                          I want to set ONLY the UserPolicy ExecutionPolicy scope to be "Restricted" and leave the MachinePolicy ExecutionPolicy scope as "Undefined" so that it isn't overriding the UserPolicy scope. This will allow the "Builtin\System" \ "NT Authority\System" \ "%ComputerName%$" account to run scripts but NOT…

                          2 votes
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                          • facebook
                          • google
                            Password icon
                            I agree to the terms of service
                            Signed in as (Sign out)

                            We’ll send you updates on this idea

                            0 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                          • Can you add some stuff to Get-ClipBoard?

                            I would have liked the default behaviour to be that an array of newline-split strings was returned from Get-ClipBoard. 97 % of the time I end up writing (Get-ClipBoard) -split "\r?\n" | ...... often filtering out empty elements - and that's just boring.

                            In my own version I used -Raw for a string and nothing for an array/list.

                            Of course you can't change that now in the 5.x version (or later, sigh, will this be our doom in some distant future), but can you maybe add at least -AsArray or similar? Make it so it can only be used with…

                            3 votes
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                            • facebook
                            • google
                              Password icon
                              I agree to the terms of service
                              Signed in as (Sign out)

                              We’ll send you updates on this idea

                              0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                            • Make Import-DSCResource dynamic keyword parameter -ModuleVersion mandatory or generate parsing warning

                              Configurations expire when the DSCResource modules they import change. It would be very welcomed if a warning was generated by the pasrser when the Import-DSCResource keyword was used without specifying either the Fully Qualified Module Name (FQMN) or the ModuleVersion parameter/Argument pair. This would simplfy managing different versions of a configuration both on the build server as well consuming blog posts that have you guessing what version of the Module was being used.

                              1 vote
                              Sign in
                              Check!
                              (thinking…)
                              Reset
                              or sign in with
                              • facebook
                              • google
                                Password icon
                                I agree to the terms of service
                                Signed in as (Sign out)

                                We’ll send you updates on this idea

                                0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                              • Pure Pain: Preinstalled PS Modules - Please Rationalize Them with Package Management Installs

                                I am trying to update Pester on Windows 2016 to 4.x because the preshipped Pester 3.4.0 emits a note about the depreciation of the -quiet switch when I use the quiet switch. This get's scooped into stdout when executing via AWS SSM remote commands. Version 3.x complains it does not understand "-Show None".

                                I want to update to 4.x - in which I ran into all the problems documented here: https://github.com/OneGet/oneget/issues/215

                                But ended up with "Install-module pester -force -SkipPublisherCheck.

                                So far so bad, but when I go to remove the 3.4.0 version (with admin rights) from: 'c:\program files\windowspowershell\modules\pester\3.4.0' I get…

                                2 votes
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                • facebook
                                • google
                                  Password icon
                                  I agree to the terms of service
                                  Signed in as (Sign out)

                                  We’ll send you updates on this idea

                                  1 comment  ·  Package Management  ·  Flag idea as inappropriate…  ·  Admin →

                                  The issues you have encountered can be frustrating, sorry that is the case for you.

                                  Moving this to Survey to try to gauge the scope of the problem for users generally.

                                  We are somewhat limited by security requirements: what ships with Windows will always be tagged so that nothing can replace it easily unless it is signed by Microsoft. While Pester is part of Windows, it is not owned or developed by Microsoft, so updates delivered via the Gallery cannot be Microsoft signed.

                                  Once the Gallery version is installed on a system, -SkipPublisherCheck is no longer required for future updates. That first experience, however, is bad.

                                  This leaves us with a dilemma: do we stop shipping Pester in with PowerShell in the future, or do we continue to provide the feature set knowing users who update from the Gallery will encounter these issues?

                                  Looking for feedback from as many users…

                                • OutVariable gets the output from the next command (select) in the pipeline

                                  When running something like:
                                  gsv -ov all | sort -ov sorted | select name -first 10 -ov first10

                                  I'd expect $all.Count to be equal to $sorted.Count, but $sorted.Count is 10 and contains the same objects as $first10.
                                  This is different than in older versions (tried with -ver 2, and the variables have the expected objects. e.g. $all.Count == $sorted.Count)

                                  1 vote
                                  Sign in
                                  Check!
                                  (thinking…)
                                  Reset
                                  or sign in with
                                  • facebook
                                  • google
                                    Password icon
                                    I agree to the terms of service
                                    Signed in as (Sign out)

                                    We’ll send you updates on this idea

                                    0 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
                                  • BUG:Powershell New-WBBackupTarget losing its setting when using Add-WBBackupTarget

                                    I am using the first example in the syntax box from here:
                                    https://technet.microsoft.com/en-us/library/jj873971(v=wps.630).aspx

                                    The description for PreserveExistingBackups confuses me a bit, since its mentioning network shares, but the syntax example is for a disk location. I think I need it for the disk location, so I tried with the lines below.

                                    Set-WBPerformanceConfiguration -OverAllPerformanceSetting AlwaysFull
                                    $policy = New-WBPolicy
                                    $disks = Get-WBDisk
                                    $backupLocation = New-WBBackupTarget - Disk $disks[12] -PreserveExistingBackups $true -Label "Backup"
                                    Add-WBBackupTarget -Policy $policy -Target $backupLocation

                                    If I singlestep the script then everything looks fine after I have initialized the variable $backupLocation. The PreserveExistingBackups are set to true, when I recall…

                                    1 vote
                                    Sign in
                                    Check!
                                    (thinking…)
                                    Reset
                                    or sign in with
                                    • facebook
                                    • google
                                      Password icon
                                      I agree to the terms of service
                                      Signed in as (Sign out)

                                      We’ll send you updates on this idea

                                      0 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                                    • Composite DSC Resources DependOn Bug?

                                      Composite Resources DependsOn Bug?

                                      Bumped into this URL and it seems I'm experiencing the same issue with composite resources DependsOn:

                                      https://powershell.org/forums/topic/composite-resource-dependson-bug/

                                      > $psversiontable

                                      Name Value
                                      ---- -----
                                      PSVersion 5.1.15063.502
                                      PSEdition Desktop
                                      PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
                                      BuildVersion 10.0.15063.502
                                      CLRVersion 4.0.30319.42000
                                      WSManStackVersion 3.0
                                      PSRemotingProtocolVersion 2.3
                                      SerializationVersion 1.1.0.1

                                      1 vote
                                      Sign in
                                      Check!
                                      (thinking…)
                                      Reset
                                      or sign in with
                                      • facebook
                                      • google
                                        Password icon
                                        I agree to the terms of service
                                        Signed in as (Sign out)

                                        We’ll send you updates on this idea

                                        1 comment  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Wrong Output format in Jenkins 2.77

                                        Name Value
                                        ---- -----
                                        PSVersion 5.1.14393.1480
                                        PSEdition Desktop
                                        PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
                                        BuildVersion 10.0.14393.1480
                                        CLRVersion 4.0.30319.42000
                                        WSManStackVersion 3.0
                                        PSRemotingProtocolVersion 2.3
                                        SerializationVersion 1.1.0.1

                                        Jenkins 2.77

                                        node('build') {
                                        stage('From sharedlibrary') {
                                        powershell 'Write-Output "Hello, World!"'
                                        }
                                        }
                                        Output:

                                        [QA_SharedLibrary] Running PowerShell script Hello, World!

                                        1 vote
                                        Sign in
                                        Check!
                                        (thinking…)
                                        Reset
                                        or sign in with
                                        • facebook
                                        • google
                                          Password icon
                                          I agree to the terms of service
                                          Signed in as (Sign out)

                                          We’ll send you updates on this idea

                                          0 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                                        • PS5: Get-Help <anycommand> -ShowWindow doesn't display help

                                          When executing "Get-Help <anycommand> -ShowWindow", the resulting window doesn't contain any help text.

                                          1 vote
                                          Sign in
                                          Check!
                                          (thinking…)
                                          Reset
                                          or sign in with
                                          • facebook
                                          • google
                                            Password icon
                                            I agree to the terms of service
                                            Signed in as (Sign out)

                                            We’ll send you updates on this idea

                                            0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                          • Don't see your idea?

                                          Feedback and Knowledge Base