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. Bug: Set-DscLocalConfigurationManager / Partial Configuration limits are undefined

    When testing Partial Configurations in WMF5 Production Preview I am unable to run Set-DscLocalConfigurationManager due to some arbitrary limitation.

    Some guidance, documentation around Partial Configuration limits should be published.

    I've been able to reproduce this...
    Using the following code:
    $Limit = 15
    [DSCLocalConfigurationManager()]
    Configuration DSCLocalConfigurationManager {

    Node $env:COMPUTERNAME {
    
    Settings {
    RefreshMode = 'Disabled'
    }

    For ($i = 1; $i -lt $Limit; $i++) {
    $Name = "Partial$i"
    PartialConfiguration $Name {
    Description = "Partial$i"
    }

    }
    }

    }
    DSCLocalConfigurationManager
    Set-DscLocalConfigurationManager -Path .\DSCLocalConfigurationManager -ComputerName $env:COMPUTERNAME

    If I set the $Limit to 15, setting 14 Partial Configurations the application succeeds.
    If I set…

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

    Hi Andrew,

    This was a known issue that should be fixed on both WMF 5 RTM and the latest version of Windows 10.

    I know that you’re still patiently awaiting the final release of WMF 5 RTM. If you still run into this problem after the RTM release (or if you run into the same problem on a fully patched Windows 10 machine), feel free to post back here.

    Thanks,
    Joey

  2. 6 years old bug with powershell copy-item!

    Votes from Connect: 8

    Original Date Submitted: 4/9/2015 9:24:03 AM

    Description:
    Contact Information
    Handle: 响叮咚
    Site Name: PowerShell
    Feedback ID: 1234983


    Frequency: PowerShell
    Regression:

    Problem Description:
    【version】
    all version.
    from powershell 2.0 to powershell 5.0 in windows 10 preview 10049!

    【reason】
    copy-item parameter "-exclude" don't work !

    many man say this problem 6 years before.has yet to repair.
    look:
    http://poshcode.org/3475
    http://stackoverflow.com/questions/731752/exclude-list-in-powershell-copy-item-does-not-appear-to-be-working

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

    Repro Steps:
    Expected Results:

    Internal BugId: 14373

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  3. New Verb: Deploy

    "Deploy" is a de facto PowerShell verb, as many popular official Azure PowerShell scripts already contain this verb. Considering deployments are a primary scenario for PowerShell, it would be great to add this as an official verb--especially since PSScriptAnalyzer needs to be modified to not flag Azure's official scripts.

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

    We’ll send you updates on this idea

    0 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  4. Gallery help site needs new capability

    The documentation site need a menu or link item to quickly switch versions of a help topic. Like the old MSDN site.

    Example Site topic: https://msdn.microsoft.com/powershell/reference/5.1/Microsoft.PowerShell.Utility/Read-Host

    The version access is important for support issues to be able to quickly switch versions as the "-online" with help always targets the current version or nothing.

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

    We’ll send you updates on this idea

    completed  ·  2 comments  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
  5. Core help files (as of 2016-11-08) have broken text formatting

    Helpfiles for most about topics (with random exceptions), when updated (and file name corrected -- see bottom), change text formatting to a strict all-lines-that-are-not-headers-get-indented-four-spaces. This makes many files look completely ugly and broken. Here is an example from aboutExecution_Policies as viewed in PowerShell help between two different versions of the file:

    9-30-2016:

    USE GROUP POLICY TO MANAGE EXECUTION POLICY

    ------------------------------------------- You can use the "Turn on Script
    
    Execution" Group Policy setting to manage the execution policy of computers
    in your enterprise. The Group Policy setting overrides the execution
    policies set in Windows PowerShell in all scopes.
    The "Turn on
    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    5 comments  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
    completed  ·  Zachary Alexander responded

    This should be fixed. Open PS as administrator and run update-help -force . if that does not resolve the issue, please let me know and i’ll revert the “completed” status.

  6. Assigning a value to `$?` (`$? = $false`) crashes powershell.exe

    PowerShell crashes when I run an invalid command such as $? = $false. Just enter and run $? = $false in powershell.exe or powershell_ise.exe.

    [[[
    Test-Path "C:\test"
    if ( $? = $false ) {
    Out-Host "Hello World"
    }
    ]]]

    I guess that PowerShell should display an error telling that I'm trying to perform an invalid action.

    The problem reproduces on Windows 10 Pro and PowerShell 5.1.14393.206. The problem does not seem to reproduce with PowerShell 5.0 (5.0.10586.122).

    bucket 127386360339, type 5
    Event Name: PowerShell
    Response: Not available
    Cab Id: 0
    Problem signature:
    P1: powershell.exe
    P2: 10.0.14393.206
    P3: stem.Management.Automation.PSInvalidCast
    P4:…

    2 votes
    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 →
  7. New-ScriptFileInfo adds all the fields to the scriptfile not just the one you supplied.

    New-ScriptFileInfo add all the fields to the scriptfile and not just the ones you supply. Seems like a lot of "clutter" for information you don't need to specify.

    Can be reproduced by running the msdn example.

    New-ScriptFileInfo -Path "\temp\Temp-Scriptfile.ps1" -Version 1.0 -Author "pattif@contoso.com" -Description "My test script file description goes here"

    Get-Content -Path "\temp\Temp-Scriptfile.ps1"

    2 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 →

    Thank you for your feedback, but in this case the cmdlet is doing what we expect.

    The goal of New-ScriptFileInfo is to provide developers with the list of metadata items supply that provides value when publishing a script via the PowerShell Gallery, and interacting with it via the PowerShellGet cmdlets. This is consistent with the behavior for New-ModuleManifest.

    You may want to save your own subset of the metadata values, and insert it on your own into files.

  8. Install-PackageProvider -Name NuGet not working

    Upgraded from WMF 4.0 to WMF 5.0 on Windows 7 SP1 x64 with .NET 4.6.1 and can't get NuGet/OneGet etc. to work at all. Already tried uninstall of WMF 5.0 and reinstall to no avail.

    PS T:> Install-PackageProvider -Name NuGet -ForceBootstrap
    Install-PackageProvider : Unable to find repository with SourceLocation ''. Please use Get-PSRepository to see all
    available repositories.
    At line:1 char:1
    + Install-PackageProvider -Name NuGet -ForceBootstrap
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidArgument: (Microsoft.Power...PackageProvider:InstallPackageProvider) [Install-Pac
    

    kageProvider], Exception

    + FullyQualifiedErrorId : RegisterPackageSourceRequired,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPack
    

    ageProvider

    PS T:> Get-PSRepository
    PackageManagement\Get-PackageSource : Unable to find module providers (PowerShellGet).
    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:3544 char:31
    + ... ckageSources =…

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

    We’ll send you updates on this idea

    7 comments  ·  Package Management  ·  Flag idea as inappropriate…  ·  Admin →
  9. Add an option to view the files in RAW mode

    Currently we can view the files in html mode, perhaps functionality could be added to support view in raw mode comparable GitHub.

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

    We’ll send you updates on this idea

    completed  ·  0 comments  ·  PowerShell Gallery  ·  Flag idea as inappropriate…  ·  Admin →
  10. Add a FullName alias to file types to improve pipeline compatibility

    It would be great to run code as:

    mkdir foo | cd
    mkdir foo | pushd

    However this doesn't work due to name mismatch of the path property.

    My workaround:
    Update-TypeData -MemberName Path -TypeName IO.DirectoryInfo -MemberType AliasProperty -Force -Value FullName
    Update-TypeData -MemberName Path -TypeName IO.FileSystemInfo -MemberType AliasProperty -Force -Value FullName

    2 votes
    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 →
  11. Install-PackageProvider chocolatey

    I have installed firts nuget with the command Install-PackageProvider –Name nuget -RequiredVersion 2.8.5.204 -Scope AllUsers. Then, I have restarted Powersehell as described in Powershell API.

    Afte that I install chocolatey provider with Install-PackageProvider –Name chocolatey -RequiredVersion 2.8.5.130 -Scope AllUsers, This makes chocolatey available as provider but it doesn't really install the chocolate provider. To get to install chocolatey provider, after that you have to do get-packageprovider -name chocolatey.
    If it is not a bug, it is very confusing.

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

    We’ll send you updates on this idea

    completed  ·  1 comment  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  12. Warning states wrongly that old module version will be deleted

    Warning states wrongly that old module version will be deleted when you use Install-Module <modulename> -Force

    PS C:&gt; install-module azurerm -Verbose
    ...
    ...
    WARNING: Version '1.1.0' of module 'AzureRM' is already installed at 'C:\Program
    Files\WindowsPowerShell\Modules\AzureRM\1.1.0'. To delete version '1.1.0' and install version '1.2.2', run
    Install-Module, and add the -Force parameter.

    PS C:\WINDOWS\system32> install-module azurerm -Force

    PS C:\WINDOWS\system32> dir 'C:\Program Files\WindowsPowerShell\Modules\AzureRM'

    Directory: C:\Program Files\WindowsPowerShell\Modules\AzureRM
    

    Mode LastWriteTime Length Name


    d----- 1/16/2016 12:29 AM 1.1.0
    d----- 3/4/2016 12:45 PM 1.2.2

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

    We’ll send you updates on this idea

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

    This issue is currently not repro in more recent builds, for us and for Aleksandar.
    We are assuming the issue has been fixed. If anyone else encounters the problem, please let us know.

  13. Add Support for Flags Attribute with Enum Creation

    Having the ability to create an Enum is great, but it would be made better if support for the Flags Attribute attribute like you can do with creating a C# Enum to allow it to treat supplied values as bit fields to potentially display more values in an Enum based on the value provided.

    A C# example would be like this:

    Add-Type -TypeDefinition @"
    [System.Flags]
    public enum Animals
    {

    Dog = 1,
    
    Cat = 2,
    Bird = 3,
    Lizard = 10

    }
    "@

    I could then do the following...

    [Animals]11

    ...and get back Dog, Lizard

    Where with PowerShell creating the…

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

    We’ll send you updates on this idea

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

    As mentioned by Jason in the comments below, this is already supported by adding the [Flags()] attribute to enum definition

  14. Online help for Get-Clipboard and Set-Clipboard on PS5 is not available

    [PS5.0.10586.51 running on Windows 7 SP1]

    'get-help get-clipboard -online' links to https://technet.microsoft.com/library/cc732148.aspx

    The title of that page is "Windows Server Future Resources" (???)

    It contains "The document that you are attempting to access is not available yet. "

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

    We’ll send you updates on this idea

    1 comment  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
  15. !($a[0]=[psobject]($a=,0))

    That command crash PowerShell with StackOverflowException.

    2 votes
    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 →
  16. Zip files created using Compress-Archive cmdlet don't contain folders

    The Compress-Archive cmdlet doesn't seem to play nicely with other operating systems. When I use 7-Zip's "Test Archive" function on a zip created with Compress-Archive, the result shows no folders.

    I have a more detailed explanation of the issue on the StackOverflow question I posted here:

    https://stackoverflow.com/questions/34248903/why-wont-shopify-accept-my-themes-zip-file-when-compressed-using-powershell

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

    We’ll send you updates on this idea

    2 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  17. DSC: MSFT_DscLocalConfigurationManager CIM class's PerformRequiredConfigurationChecks method's flags parameter is undocumented

    Votes from Connect: 7

    Original Date Submitted: 8/21/2014 8:09:48 AM

    Description:
    Contact Information
    Handle: Aaron Jensen
    Site Name: PowerShell
    Feedback ID: 951297


    Frequency: Always Happens
    Regression: No, this is new to the most recent version

    Problem Description:
    MSFT_DscLocalConfigurationManager CIM class's PerformRequiredConfigurationChecks flags parameter is undocumented. Page http://msdn.microsoft.com/en-us/library/dn469248.aspx simply says: "Flags: Specifies the TBD."

    Please document these flags.

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

    Repro Steps:
    Expected Results:

    Internal BugId: 8961

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

    We’ll send you updates on this idea

    0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  18. Dynamic inplace syntax help without ISE

    Hi Microsoft,
    ever used to program a Switch or Router. Not only at Cisco's you can issue a ? anytime to know what you can do next, instead of browsing each command in technet or completely dump your line to enter get-help ... this is too complicated!

    ISE is a help but I don't want ISE all the time. Make your "command line" user-friendly please

    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 →

    Starting in PowerShell 5 (shipped with Windows 10, Windows Server 2016, and WMF 5), we included the PSReadline module by default in powershell.exe for improved usability. Based off of what you’re looking for, I’d highly recommend trying Ctrl+Space to see all available Tab completions wherever you’re at in your expression.

    Also check out the PSReadline GitHub repo for more documentation on using all of its available features: https://github.com/lzybkr/psreadline#usage

  19. Error in topic about_Pipelines under INVESTIGATING PIPELINE ERRORS

    The example command given under "INVESTIGATING PIPELINE ERRORS" in the about_Pipelines help topic is incorrrect. the example situation is moving a registry entry from one key to another, in the example it's trying to move the entry "product" from the hklm:\software\mycompany\design registry key to the hklm:\software\mycompany\sales key. The second ("fixed") command at the end:

    get-item -path hklm:\software\mycompany\design |
    
    move-itemproperty -dest hklm:\software\mycompany\design -name product

    should be:

    get-item -path hklm:\software\mycompany\design |
    
    move-itemproperty -dest hklm:\software\mycompany\sales -name product

    I also think the source and destination seem switched or misplaced throughout that section of the topic, unrelated to the example error given for the purpose…

    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 →
  20. PowerShell Update-Help download fails for Module Appx-6-15-2017

    PowerShell Update-Help download fails for Module Appx-6-15-2017

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  • Don't see your idea?

Feedback and Knowledge Base