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

      8 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 →
                • 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 →
                            • 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 →
                                      • [BUG] Executing any Exchange 2007 powershell command after using test-connection results in a crash

                                        Steps to reproduce:
                                        1) test-connection <servername>
                                        2) get-exchangeserver <servername>
                                        (note: you can use any Exchange 2007 powershell command in step 2)

                                        Platforms tested on:
                                        W2k12/W7
                                        Powershell 4
                                        E2k7 RU15/RU21

                                        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 →
                                        • Double DependsOn in mof when using foreach loops

                                          When using a foreach loop to create a set of resources and trying to set the previous item key as the dependsOn resource, it adds it twice in the mof file.

                                          Configuration example:
                                          configuration Test-DependsOnWithLoop {
                                          param([string[]]$Directories)
                                          Import-DscResource -ModuleName PSDesiredStateConfiguration
                                          node localhost {
                                          $dependsOn = $null
                                          $dirs.ForEach({
                                          $res = $_ -replace '\\|:', '_'
                                          File $res {
                                          Ensure = 'Present'
                                          DestinationPath = $_
                                          DependsOn = $dependsOn
                                          Type = 'Directory'
                                          }
                                          $dependsOn = "[File]$res"
                                          })
                                          }
                                          }

                                          $dirs = 1..10 | % { "C:\Temp\_$_" }
                                          Test-DependsOnWithLoop -Directories $dirs

                                          And if you look at the localhost.mof you'll see:
                                          DependsOn = { "[File]C__Temp__1", "[File]C__Temp__1"};

                                          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

                                            In Queue  ·  0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
                                          • Don't see your idea?

                                          Feedback and Knowledge Base