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. Powershell and collections (in particular, collection of preference variables)

    I've been struggling with exporting and importing preference variables from local to remote sessions. One idea that came to me was the idea of a collection of preference variables. According to a fellow at StackOverflow, Powershell doesn't institute these kinds of collections. If this is true, I would kindly request them to be implemented.

    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

      0 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →

      What are the environment variables you are interested in exporting? If it’s possible to enumerate them, then you can set them up in multiple locations.
      Take a look at the New-PSSessionConfigurationFile cmd (start with the help for it). It’s designed to enable part of the scenario you are interested in, but not sure if that is enough of what you are asking for.

    • aliases should be able to contain parameters

      While PowerShell's introduction of aliases to Windows command lines is a (long due) help, they are very limited. Compared to aliases found in Linux shells such as bash, aliases in PowerShell have one glaring weakness: they can only replace a single token with another single token.

      For example, on Linux, I can do the following:
      # Add default parameters to ls so it shows hidden files and uses color
      alias ls='ls -A --color=auto'
      # Add an alias that shows ls long-form output and file type indicators
      alias ll="ls -lF"

      On Po9werShell, I can't do anything like that. "ls" is aliased…

      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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
      • Powershell help in 2012r2 Virtual machine (Evaluation copy) won't update

        Powershell commands: get-help get-vm, update-help will not work in Hyper-V.

        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 →
        • WMF 5 - Invalid callee when using variant wrapper

          If I use the Runtime.InteropServices.VariantWrapper in WMF5 I get errors trying to interact with the system center orchestrator 2012 com object.. (x86)

          IE if I do this without WMF5:

          $oisMgr = new-object -com OpalisManagementService.OpalisManager
          $oHandle = New-Object Object
          $handle = New-Object Runtime.InteropServices.VariantWrapper($oHandle)
          $oisMgr.Connect($Username, $Credential.Password, [ref]$handle)

          It works fine, if I run with WMF5 I get an Invalid Callee Error.

          OS is windows 2012.. thinking about it as I write this, has the 'Object' type changed at all between the two?

          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

            3 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →

            To be honest PowerShell historically does not handle variants particularly well. We may have regressed in this area, which would be bad, so we have question and some pointers to articles that may help.

            Can you give us the information in $PSVersionTable, please?

            There is a good article in StackOverflow that talks about using Variants and offers some suggestions: http://stackoverflow.com/questions/30512785/retrieving-session-id-from-com-method

            One of the better suggestions is in a link from that article: http://www.archivum.info/microsoft.public.windows.powershell/2010-01/00361/RE--quot-Invalid-callee-quot--calling-a-com-object.html. While the content is valuable, I will apologize in advance for the ad placement on that page :-(

          • WMF 5.1 RestrictedRemoteServer session type fails to import the 'Microsoft.PowerShell.Utility' module

            When importing this module in a restricted session type or when making a function or a cmdlet from this module visible, i.e:
            VisibleFunctions = 'Get-FileHash'
            the following message is returned:
            WARNING: The 'Microsoft.PowerShell.Utility' module was not imported because the 'Microsoft.PowerShell.Utility' snap-in was already imported.
            In practice, the module is not being imported.
            Get-PSSnapin shows that a snapin with the same name is indeed loaded:
            Name : Microsoft.PowerShell.Utility
            PSVersion : 5.1.14409.1005
            Description : This Windows PowerShell snap-in contains utility
            cmdlets that are used to view and organize data in different ways.
            but exposes no commands
            Get-PSSnapin from a regular (not remote)…

            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

              3 comments  ·  WinRM  ·  Flag idea as inappropriate…  ·  Admin →

              This report is a bit confusing, so need some information.
              On the system where you received this error, please try running any of the commands from Microsoft.PowerShell.Utility, such as get-member, or get-date. The error message and the information you provided seems to indicate that the module is already loaded, so we are looking for other indications that it is not.

            • WMF: It's annoying to not have an independent setup for Win10

              Hello

              It is really annying that Microsoft still patronizes their Customers and don't allow to setup WMF (e.g. Version 5.1) on Windows 10 without Windows Update / without upgrading to the anniversary release.

              We have 650 Desktops and we have not yet finished all compatibility tests, but we have Developers which needs WMF 5.1.

              Please, keep in mind simple, friendly installations and not microsoft internal political decisions.

              Because there are many Operating Systems with open source package managers, you could peek how they are solving such problems. Since decades.

              Kind regards, Thomas

              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

                1 comment  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
              • Bug: Here string - When using invoke-command when here string starts with [

                Using a here string to create an LCM file using a Hyper-V VM and invoke-command.
                If the here string starts with [ the file created is blank if viewing with get-content. Viewing the file with PSEdit, the file is full of squares.

                Code used to generate this:

                $lcmscript = @'
                [DSCLocalConfigurationManager()]
                configuration LCMPush
                {
                Node $AllNodes.Where{$_.Role -eq "Primary DC"}.Nodename
                {
                Settings
                {
                RebootNodeIfNeeded = $true
                ActionAfterReboot = 'ContinueConfiguration'
                ConfigurationMode = 'ApplyAndAutoCorrect'
                CertificateID = "REPLACEWITHFRESHLYCREATEDTHUMBPRINT"
                }
                }
                }

                # Create the computer.meta.mof in folder
                LCMPush -configurationData c:\dsc\dscconfigdata.psd1 `
                -OutputPath c:\dsc\LCM
                '@

                Invoke-Command -VMName $vmname -Credential $cred -ScriptBlock { New-Item c:\dsc\lcm -ItemType…

                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 →

                  Interesting…I’m not able to repro it from a PowerShell 5.1 to 5.1 box. Could you paste the output of your $PSVersionTable?

                  Also, I’m assuming you’ve saved the script that includes the here string somewhere? Could you paste the output of Format-Hex .\hereString.ps1 | Select-Object -First 1? Even better, could you paste the same thing on the resultant output (i.e. Format-Hex C:\dsc\lcm\dsclcm.ps1 | Select-Object -First 1)?

                • Powershell ConvertTo-Json Error when has string with trailing backslash

                  Votes from Connect: 13

                  Original Date Submitted: 5/9/2014 3:59:33 AM

                  Description:
                  ********Contact Information********
                  Handle: George Mauer
                  Site Name: PowerShell
                  Feedback ID: 869768
                  ***************************************

                  Frequency: Always Happens
                  Regression: I do not know if this issue existed previously

                  Problem Description:
                  [The following bit of code generates an error](http://stackoverflow.com/questions/23552000/convertto-json-throws-error-when-using-a-string-terminating-in-backslash)

                  W:\surge\ogre> @{SolutionDir='W:\Surge\ogre\'} | ConvertTo-Json
                  ConvertTo-Json : The converted JSON string is in bad format.
                  At line:1 char:35
                  + @{SolutionDir='W:\Surge\ogre\'} | ConvertTo-Json
                  + ~~~~~~~~~~~~~~
                  + CategoryInfo : InvalidOperation: (System.Collections.Hashtable:PSObject) [ConvertTo-Json], InvalidOperationException
                  + FullyQualifiedErrorId : JsonStringInBadFormat,Microsoft.PowerShell.Commands.ConvertToJsonCommand

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

                  Repro…

                  5 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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                  • BUG: WMF 5.0 RTM - removes PSSession registration of microsoft.powershell

                    Hi.

                    We deploy WMF 5.0 RTM to Windows 8.1 Industry Pro thru WSMan.

                    windows 8.1 has build in PS version 4.0

                    After installation of WMF 5.0 WSMan stop working due to there is only one session registered

                    Get-PSSessionConfiguration returns only

                    Name : microsoft.powershell.workflow
                    PSVersion : 5.0
                    StartupScript :
                    RunAsUser :
                    Permission : BUILTIN\Administrators AccessAllowed, BUILTIN\Remote Management Users AccessAllowed

                    when I run Get-PSSessionConfiguration with PS 4.0 there are more providers

                    Name : microsoft.powershell
                    PSVersion : 3.0
                    StartupScript :
                    RunAsUser :
                    Permission : NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrators AccessAllowed, BUILTIN\Remote Management
                    Users AccessAllowed

                    Name : microsoft.powershell.workflow
                    PSVersion : 3.0
                    StartupScript :
                    RunAsUser : …

                    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

                      3 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                    • Support proxy of PowerShell Gallery

                      Proxy is NOT supported in PowerShell Gallery now.
                      Although the "-Proxy" option exists, it seems that it does not work effectively.
                      Please supported proxy.

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

                        Please add some information on what you need for proxy support, and the error you are receiving.

                        The current version of the cmdlets support the ability to interact with the PS Gallery if you must go through a proxy. You can supply a proxy URI and a credential set (as a pscredential object), which should work in most cases.

                        Something you can try as a troubleshooting step is to try to navigate through the proxy to reach http://powershellgallery.com/api/v2, which is the rest endpoint for the PS Gallery. That may provide you information about the end-to-end connection through the proxy.

                      • Install-Module MaximumVersion not respected

                        The Install-Module cmdlet does not respect the MaximumVersion parameter if a newer version of the module is already installed.

                        Test Case:
                        # Install v2 of Module
                        Install-Module AzureRM.profile -RequiredVersion 2.3.0

                        # Try to install latest v1 of Module
                        Install-Module AzureRM.profile -MinimumVersion 1.0.0 -MaximumVersion 1.999.999 -Verbose

                        Output:
                        VERBOSE: Version '2.3.0' of module 'AzureRM.profile' is already installed

                        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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →

                          Thanks for the note. This fails because you specified installing an older version when a newer version exists, without supplying -force.

                          The full message (at least on my system) is:
                          WARNING: Version ‘[existing version]’ of module ‘[modulename]’ is already installed at ‘[fullpath location]’. To install version ‘[desired version], run Install-Module and add the -Force parameter, this command will install version ’[desired version]’ in side-by-side with version ‘[existing version]’.

                          If you supply -Force and still see this issue, please update this item in UserVoice with the information from the following commands:
                          $psversiontable
                          get-packageprovider -li

                        • PS for Win/10 - Need download available to repair DSIM or sfc fail

                          Add Win/10 to install packages:

                          I was unable to re-install PS from available downloads which only specify Windows 7 or Windows 8.1. Need one for Windows 10. PC was previous 8.1 which updated to Win/10. There is also no option in properties to emulate 7 or 8.

                          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

                            2 comments  ·  Package Management  ·  Flag idea as inappropriate…  ·  Admin →
                          • A cool bug that gets annoying very quickly

                            https://www.dropbox.com/s/5q5krdk4qbu4rqe/powershellbug.PNG?dl=0

                            On a side note you should be able to embed images here...bugs are sometimes better communicated visually.

                            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 →
                            • PowerShell version of DEVCON.EXE or Device Manager cmdlets

                              DEVCON.EXE can be used to install, uninstall, enable, disable, configure or query devices (as seen in Device Manager) from the command line. Here is the description:

                              https://msdn.microsoft.com/en-us/library/windows/hardware/ff544707(v=vs.85).aspx

                              To get DEVCON.EXE, you have to download the entire Windows Drivers Kit (WDK), which is 803MB in size, and, as I understand it, DEVCON cannot be legally redistributed or shared separately.

                              It would be good to have a PowerShell cmdlet to replace DEVCON that is either installed by default or available in the PSGallery.

                              Or just allow DEVCON.EXE to be downloaded separately from the WDK somehow, like through NuGet, PSGallery or anywhere.

                              Or…

                              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

                                2 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                              • Format-Table

                                "Get-WmiObject win32_operatingsystem | Format-Table -AutoSize"
                                In the PowerShell ISE the AutoSize parameter didn't effects SerialNumber Column .

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

                                  Either I’m unable to repro this, or I am missing the issue. I get consistent output between the ISE and standard PS shell.

                                  Can you provide the following, please, so I can understand it better:
                                  > Copy & paste the output of the standard shell & the ISE for this command. Don’t worry that it doesn’t look right in this editor, I’ll convert it to a non-proportional font to understand it.
                                  > In one of the windows, run $psversiontable, and include that in the output.

                                  One last request – can you try replacing Get-WMIObject with Get-CimInstance & see if it does the same thing? The -WMI cmdlets have been replaced with the largely equivalent -Cim cmdlets for a while, and you should really be using the newer cmdlets.

                                • Update-ScriptFileInfo does not except parameters to be $null even tho they are not mandatory.

                                  Update-ScriptFileInfo only has a couple of mandatory fields. However when you leave them blank the cmdlet returns errors from the validation.

                                  The variable cannot be validated because the value is not a valid value for the CompanyName variable.
                                  The variable cannot be validated because the value is not a valid value for the Copyright variable.
                                  The variable cannot be validated because the value $null is not a valid value for the RequiredModules variable.
                                  The variable cannot be validated because the value $null is not a valid value for the ExternalModuleDependencies variable.
                                  The variable cannot be validated because the value $null…

                                  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  ·  Package Management  ·  Flag idea as inappropriate…  ·  Admin →
                                  • PowerShellGet: Install-Script can`t find directory InstalledScriptInfos when run for the first time

                                    Repro setup

                                    The following path exists:
                                    ~\Documents\WindowsPowerShell

                                    Windows 10 Enterprise with the following PSVersionTable:
                                    PS C:\> $PSVersionTable

                                    Name Value
                                    ---- -----
                                    PSVersion 5.0.10586.122
                                    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
                                    BuildVersion 10.0.10586.122
                                    CLRVersion 4.0.30319.42000
                                    WSManStackVersion 3.0
                                    PSRemotingProtocolVersion 2.3
                                    SerializationVersion 1.1.0.1

                                    PS C:\> [Environment]::GetFolderPath("MyDocuments")
                                    C:\Users\JanEgil\Documents

                                    PS C:\> $env:USERPROFILE
                                    C:\Users\JanEgil

                                    Repro steps

                                    Run Install-Script -Name Test-RPC -Scope CurrentUser
                                    ~\Documents\WindowsPowerShell\Scripts\Test-RPC.ps1 is created, but the following error occurs:
                                    PS C:\> Install-Script -Name Test-RPC -Scope CurrentUser
                                    PackageManagement\Install-Package : Could not find a part of the path ~\Documents\WindowsPow
                                    erShell\Scripts\InstalledScriptInfos\Test-RPC_InstalledScriptInfo.xml'.
                                    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:2693 char:21
                                    + ... $null = PackageManagement\Install-Package @PSBoundParameters
                                    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                    + CategoryInfo : OpenError: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Packag
                                    e],…

                                    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

                                      2 comments  ·  Package Management  ·  Flag idea as inappropriate…  ·  Admin →
                                    • Error while save/install Azure.Storage module

                                      Error while save/install Azure.Storage module, tried it couple of times, so i am sure it is not internet problem.

                                      PS> Install-Module Azure.Storage
                                      WARNING: Package 'Azure.Storage' failed to download ....

                                      also tried for specific version, but same error.

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

                                        We are currently unable to reproduce the problem.
                                        If you encounter it again, please run the command with -verbose, and check to see what the error information is. We will also need to see the results of the following commands:
                                        get-packageprovider -listavailable
                                        get-module powershellget -listavailable

                                        Thank you for your help

                                      • add DSC Configuration to Powershell Gallery

                                        Add a category for DSC Configurations in the PowerShell gallery just like scripts can be posted to the gallery

                                        5 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 Gallery  ·  Flag idea as inappropriate…  ·  Admin →

                                          Need to ask some questions:
                                          > Is the ask to be able to search for a DSC configuration, or modules that contain them?
                                          > Is there a reason why including the configuration in a module would not work? The general feedback from gallery users is that they strongly prefer modules (which contain docs & tests, maybe examples) over scripts.

                                        • Don't see your idea?

                                        Feedback and Knowledge Base