PowerShell

The PowerShell forum accepts bug reports as well as feedback and suggestions. For more information, check out the PowerShell Homepage

The following is a list of the states we use to track items.

status meaning
survey We saw this and we are considering it. Please upvote if it’s important to you.
needs more information We don’t understand the issue and need additional details.
investigating We are looking at this internally to understand things like: scenario, reproduction of issue, costing, or other technical details.
in queue The issue is understood and in our unprioritized backlog. Your votes will be used to drive prioritization of this work.
  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. 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.

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

    We’ll send you updates on this idea

    7 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

  2. 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)…

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

    We’ll send you updates on this idea

    5 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.

  3. 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
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    3 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.

  4. 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…

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

    We’ll send you updates on this idea

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

    The PnpDevice module contains some of the features available in Devcon.exe. If there are tasks that you cannot perform using it, please let us know what is missing, along with a basic comment of why you would use them.

  5. Add a way to contact us on the contact us page

    You've clearly deleted all the contacts on the Contact Us page to stop people contacting you to inform you how broken your applications and website are, fix it or just stop being cowards and delete the page or change it to "we have no interest in you contacting us"

    https://www.powershellgallery.com/policies/Contact

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →

    If you have an issue with the Gallery, please identify what the issue is. You may use this forum, which you have clearly located, or the contact us page. We welcome any constructive feedback you may have.

    The Contact Us page provides the ability to send email to an alias that is closely monitored by all PowerShell Gallery administrators.

  6. 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 Directory;…

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    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)?

  7. 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
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  8. 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 to Get-ChildItem,…

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  9. 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
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
  10. 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
    (thinking…)
    Sign in with: Facebook Google
    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 :-(

  11. 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
    (thinking…)
    Sign in with: Facebook Google
    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

  12. 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
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Package Management  ·  Flag idea as inappropriate…  ·  Admin →
  13. 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
    (thinking…)
    Sign in with: Facebook Google
    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.

  14. 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
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  15. 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
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Package Management  ·  Flag idea as inappropriate…  ·  Admin →
  16. 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], Exception

    +
    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Package Management  ·  Flag idea as inappropriate…  ·  Admin →
  17. 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
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    3 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  18. 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 Steps: …

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

    We’ll send you updates on this idea

    1 comment  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  • Don't see your idea?

Feedback and Knowledge Base