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. PSCredential prompts for credentials even without Credential() attribute.

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

    ```powershell
    function Test-CredentialAsString {
    Param (
    [Parameter()]
    [PSCredential]$Credential
    )
    $Credential.UserName
    }
    Test-CredentialAsString -Credential 'usernameAsString'
    ```

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

    Error:
    ```none
    Test-CredentialAsString : Cannot process argument transformation on parameter 'Credential'. Cannot convert the "usernameAsString" value of type "System.String" to type "System.Management.Automation.PSCredential".
    ```
    Actual behavior
    ---------------

    Prompts user for credentials (i.e. the same behaviour we'd expect had the `[System.Management.Automation.Credential()]` attribute been used.

    Environment data
    ----------------

    ```powershell
    > (Get-WmiObject -class Win32_OperatingSystem).Version
    6.1.7601
    ```

    ```powershell
    > $PSVersionTable
    Name Value
    ---- -----
    PSVersion 5.1.14409.1012
    PSEdition Desktop
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
    BuildVersion 10.0.14409.1012
    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

      0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
    • Behaviour of `System.Management.Automation.Credential()` in NonInteractive session

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

      **Demo.ps1**

      ```powershell
      function Test-CredentialAttribute {
      Param (
      [Parameter()]
      [System.Management.Automation.PSCredential]
      [System.Management.Automation.Credential()]
      $Credential
      )
      $Credential.UserName
      }
      Test-CredentialAttribute -Credential 'usernameAsString'
      ```

      ```batchfile
      powershell -noninteractive -file "c:\somewhere\Demo.ps1"
      ```

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

      Error:
      ```none
      Test-CredentialAttribute : Windows PowerShell is in NonInteractive mode. Read and Prompt functionality is not available.
      ```

      Actual behavior
      ---------------

      Prompts user for credentials (i.e. the same behaviour we'd expect had the command been run in interactive mode.

      Environment data
      ----------------

      ```powershell
      > (Get-WmiObject -class Win32_OperatingSystem).Version
      6.1.7601
      ```

      ```powershell
      > $PSVersionTable
      Name Value
      ---- -----
      PSVersion 5.1.14409.1012
      PSEdition Desktop
      PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
      BuildVersion 10.0.14409.1012
      CLRVersion 4.0.30319.42000 …

      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 →
      • [Suggestion] Include Universal Dashboard features

        How about include in PowerShell Engine, the excellent features of Universal Dashboard by Adam Driscoll ?

        - Design of web dashboard using Powershell cmdlets
        - REST API exposure using Powershell cmdlets

        https://www.powershellgallery.com/packages/UniversalDashboard/
        https://poshtools.com/powershell-universal-dashboard/

        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 →
        • new-service, assign virtual service account

          When creating a new service, I would like to set the user account to a virtual service account. Since the -Credential parameter expects a PSCredential object, which doesn't seem to accept predefined local accounts at all, this isn't currently possible.

          Having a -VirtualAccount switch would be great.

          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 →
          • Get-MpPreference .AttackSurfaceReductionRules_Actions returns incorrect value(s)

            Get-MpPreference .AttackSurfaceReductionRules_Actions returns incorrect value(s) compared to registry. Specifically a value of 2 is always returned for rule id BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550. There may be other anomalies that I haven't yet found for different rule id's.

            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 →
            • PS showing more DNS records then the MMC snap-in

              Get-DnsServerResourceRecord shows more records then the MMC snap-in for DNS shows.
              In my case it shows records that were pre-2005 (NT4 domain, before switching to AD).

              Forum topic over at Technet forums suggested to post here as well.
              Sorry for the long link: https://social.technet.microsoft.com/Forums/en-US/1a920c4a-d82e-46f8-b0d9-8ed501e8e852/getdnsserverresourcerecord-shows-more-then-mmc?forum=winserveripamdhcpdns

              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 →
              • [bug]register-scheduledjob and new-jobtrigger bug report

                If I scheduled a job for weekly running on specific days it will always fail with error code Task Scheduler stopped instance "{[GUID]}" of task "\Microsoft\Windows\PowerShell\ScheduledJobs\[myjob]" as request by user [my windows logon]

                However the job works with the -daily switch. It only fails with -daysofweek

                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] IE automation script will no longer work in PowerShell version 5

                  To be better notified of incoming tickets in our ticket system I developed a script that opens a hidden IE instance:

                  $ie = New-Object -ComObject InternetExplorer.Application
                  (I tried the respective registry entry and "$ie = new-object -Com InternetExplorer.ApplicationMedium", no better.)

                  (This input box is too small.)

                  After some script statements to log in and navigate to the incoming tickets monitor, I do a

                  $newcalls = $ie.Document.getElementsByName("callid")

                  (This input box is too small.)

                  That's working perfectly fine in PowerShell version 4, but in v5 I get

                  Exception from HRESULT: 0x800A138A
                  At <path>.ps1:89
                  char:5
                  + $newcalls = $ie.Document.getElementsByName("callid")
                  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  + CategoryInfo…

                  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

                    5 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                  • think about user profile - and make it so!

                    So, the case is that I work on a confidential system. I cannot login to any user account except mine. The is stated by the law. So I want to create user account, and make its profile to exist because I need to put some data to that user profile, lets say document folder. Is there any solution in PowerShell sorcery?

                    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 →
                    • Disable SSL CRL check on Linux boxes

                      I tried to follow "How to Script Disabling CRL Checking With Netsh and Powershell" guide: (https://blogs.msdn.microsoft.com/timomta/2013/06/24/how-to-script-disabling-crl-checking-with-netsh-and-powershell/)
                      However netsh is not available on Powershell 6.0.0-alpha Linux version. Could you provide me an alternative?

                      Regards,

                      ~~~
                      PS /root> $PSVersionTable

                      Name Value
                      ---- -----
                      PSVersion 6.0.0-alpha
                      PSEdition Core
                      PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
                      BuildVersion 3.0.0.0
                      GitCommitId v6.0.0-alpha.14
                      CLRVersion
                      WSManStackVersion 3.0
                      PSRemotingProtocolVersion 2.3
                      SerializationVersion 1.1.0.1

                      PS /root> netsh netsh : The term 'netsh' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling
                      of the name, or if a path was included, verify that…

                      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  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
                      • WinRM

                        Possible Bug WFM 5.1 with WinRM via Command line. (Can provide Screenshots of issue)

                        When trying to authenticate to WinRM via command line receive the following error using password with ^ as a special character.

                        Example Command:

                        winrm id -r:https://servname:5986 -a:Kerberos -u:serviceaccount@localdomain.local -p:gt^qB%CxkaSQ -encoding:utf-8

                        Error:
                        WSManFault
                        Message = The user name or password is incorrect.

                        Error number: -2147023570 0x8007052E

                        When change ^ to ! receive the following output:

                        C:\Users\shawns>winrm id -r:https://servername:5986 -a
                        :Kerberos -u:serviceaccount@localdomain.local -p:gt!qB%CxkaSQ -encoding:ut
                        f-8
                        IdentifyResponse
                        ProtocolVersion = http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd
                        ProductVendor = Microsoft Corporation
                        ProductVersion = OS: 6.3.9600 SP: 0.0 Stack: 3.0
                        SecurityProfiles
                        SecurityProfileName = …

                        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  ·  WinRM  ·  Flag idea as inappropriate…  ·  Admin →
                        • The module nesting limit is imposed over the length of the module dependency chain

                          Currently (Powershell 5.1) there is a limit of 10 levels of module nesting. It is strange that this limit exists and is hard-coded (non configurable).

                          However, the real problem is that this limit is applied when importing the dependent modules (listed in the RequiredModules section in its .psd1 manifest). Apparently, when importing a module that the current one depends on, the dependent module is counted as "nested". So if you have a long enough dependency chain, you hit the limit of 10 eventually.

                          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 →
                          • join-object

                            Hello,

                            Would it be possible to natively have the Join-Object command as explained on the following MSDN blog: https://blogs.msdn.microsoft.com/powershell/2012/07/13/join-object/

                            Being able to cross data so easily (especially with left join) would really be a plus I think.

                            thank you

                            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 →
                            • Invoke-Item not accepting Credentials ends in error

                              I want to use "Invoke-Item" cmdlet with credentials but is not taking it.

                              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 →
                              • [BUG] Cannot import both PSDesiredStateConfiguration in-box module and PSDscResources (gallery module) in the same configuration

                                OS: Windows Server 2016 1607 (14393.1593)
                                PSVersionTable:
                                Name Value
                                ---- -----
                                PSVersion 5.1.14393.1532
                                PSEdition Desktop
                                PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
                                BuildVersion 10.0.14393.1532
                                CLRVersion 4.0.30319.42000
                                WSManStackVersion 3.0
                                PSRemotingProtocolVersion 2.3
                                SerializationVersion 1.1.0.1

                                PSDscResource module: v2.8.0.0

                                Take a look at this configuration:
                                Configuration DependentConfig
                                {
                                Import-DscResource -ModuleName PSDscResources -Name Registry

                                Node MyNode01
                                {

                                File SetupScript
                                {
                                DestinationPath = 'C:\Scripts\hello.txt'
                                Contents = 'somecommand'
                                Type = 'File'
                                Ensure = 'Present'
                                DependsOn = '[Registry]regCheck'
                                }

                                Registry regCheck
                                {
                                Key = 'HKEY_LOCAL_MACHINE\SYSTEM\SomeKey'
                                ValueName = 'SomeValue'
                                ValueData = 0
                                ValueType = 'DWord'
                                Ensure = 'Present'
                                }
                                }
                                }

                                DependentConfig -OutputPath C:\DependentConfig

                                This requires PSDscResources module version 2.8.0.0 from…

                                4 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

                                  investigating  ·  4 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
                                • [BUG] help function output erased if executed from top console line

                                  PSv3, PSv4, PSv5

                                  Sample command is 'help about*esc*' executed from the top line on the console. The (write-progress) banner that appears during search does not reinstate the console text it was hiding at completion. Empty console lines appear instead yielding missing output

                                  If command is re-executed (up arrow) from a line below the banner, it obviousely appears where it should.

                                  Please note that the 'get-help about*esc*' command does not exhibit this buggy behaviour

                                  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 →
                                  • Add ExportTo-Markdown

                                    Hi

                                    Using Markdown is common nowadays in VCS tools like Git for readme files.

                                    Plus it's handy to get a tabular strcture for better visibility.

                                    Example use cases:
                                    - Get-Process output comparison at different dates and time
                                    - SQL query results in tabular form with column names as headers

                                    So it'd be someInput|ExportTo-MarkDown

                                    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: Get-Date handles slashes wrong

                                      If I use the -format parameter with Get-Date, and provide slashes in the format string, the slashes are treated as hyphens in the output.

                                      Get-Date -Format 'yyyy/MM/dd'
                                      2017-11-08

                                      I'm running on a US English WIndows 10 with Regional Settings set to Danish.

                                      PS C:\> gcim win32_operatingsystem | % caption
                                      Microsoft Windows 10 Pro
                                      PS C:\> $PSVersionTable.PSVersion

                                      Major Minor Build Revision
                                      ----- ----- ----- --------
                                      5 1 16299 19

                                      Also, I've reproduced this on a Windows server 2012R2 machine:

                                      PS C:\scripts> Get-Date -Format 'yyyy/MM/dd'
                                      2017-11-08
                                      PS C:\scripts> gcim win32_operatingsystem | % caption
                                      Microsoft Windows Server 2012 R2 Standard
                                      PS C:\scripts> $PSVersionTable.PSVersion

                                      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 →
                                      • Windows PowerShell ISE freezes in windows 10

                                        Windows powershell ISE freezes very often after running even simple command. This has been happening since we moved to Windows 10.

                                        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  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →

                                          Hey there,

                                          We haven’t heard anything about this from anyone else, so I’m guessing there might be something messed up with your machine configuration. Would you mind posting the output of $PSVersionTable. Also, is this happening on all Win10 machines across your deployment? Do you have similar issues when using powershell.exe isnstead of PowerShell ISE, or is it limited to the ISE?

                                          Thanks,
                                          Joey

                                        • 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…

                                          4 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

                                            5 comments  ·  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…

                                          • Don't see your idea?

                                          Feedback and Knowledge Base