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. Allow splatting without an intermediate variable.

    instead of
    $splat = @{name = "value"}
    verb-noun @splat

    Allow verb-noun @{name = "value"}

    This would make for a much cleaner and more natural look to parameters. Letting them be in the usual place of after and below the function.

    There is a stackoverflow question relating to this, that should explain it more - http://stackoverflow.com/questions/35188172/why-do-i-need-to-splat-to-a-variable-first

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

    We’ll send you updates on this idea

    16 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
    survey  ·  Zachary Alexander responded

    Thank you for your input. Based on its current ranking compared to other feedback items and product schedule, work on this item is pending (and will be driven by) further customer input. If you did not open this issue and are also impacted by it, please vote this item up.

  2. -IgnoreCertificateCheck or -SkipSslVerification parameter for [Invoke-WebRequest & Invoke-RestMethod]

    Invoke-WebRequest & Invoke-RestMethod need a parameter to easily skip/ignore checking for a valid certificate of https uri's. This could be required for a number of reasons such as development site only using self signed certificate while testing.

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

    We’ll send you updates on this idea

    survey  ·  1 comment  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  3. PowerShell fails to start if path contains brackets

    In a variety of cases, attempting to launch PowerShell from a path containing square brackets either fails entirely, or fails to resolve the relative working directory. For example:

    With this command, PowerShell won't launch:

    PS C:\T[e]st> Start PowerShell

    Start : Cannot perform operation because the wildcard path C:\T[e]st did not resolve to a file.
    
    At line:1 char:1
    + Start PowerShell
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : OpenError: (C:\T[e]st:String) [Start-Process], FileNotFoundException
    + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.StartProcessCommand

    From CMD or Powershell, this command starts Powershell, but with the wrong working directory:

    C:\T[e]st> PowerShell

    Windows PowerShell
    
    Copyright (C) 2015 Microsoft Corporation. All rights reserved.

    PS…

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

    We’ll send you updates on this idea

    survey  ·  1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  4. Invoke-DSCResource on WindowsFeatureSet fails

    As subject says. Example is below

    PS C:\Windows\system32> Invoke-DscResource -Name WindowsFeatureSet -Property @{Name = "Storage-Services"; Ensure = "Present" } -Method test -ModuleName PSDesiredStateConfiguration
    Invoke-DscResource : Failed to serialize properties into CimInstance.
    At line:1 char:1
    + Invoke-DscResource -Name WindowsFeatureSet -Property @{Name = "Storag ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Invoke-DscResource], SerializationException
    
    + FullyQualifiedErrorId : System.Runtime.Serialization.SerializationException,Microsoft.PowerShell.DesiredStateConfiguration.C

    ommands.InvokeDscResourceMethodCommand

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

    We’ll send you updates on this idea

    4 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
    survey  ·  Mark Gray responded

    Thanks for the feedback! Based on its current ranking compared to other feedback items and product schedule, work on this item is pending (and will be driven by) further customer input. If you did not open this issue and are also impacted by it, please vote this item up.

    MarkG

  5. Enable service restart and similar scenarios in DSC configurations

    Renamed from "Provide additional resource control methods in DSC" for clarity
    Votes from Connect: 13

    Original Date Submitted: 5/28/2015 12:15:20 AM

    Description:
    Contact Information
    Handle: Ben Gelens
    Site Name: PowerShell
    Feedback ID: 1373894


    Problem Description:
    Scenario:
    A MOF file is compiled for a node serving a website. The service resource is used to declare the W3SVC service to be started and the file resource is used to copy in the web content.
    Next an update is deployed to the website by compiling a new MOF file and for the new content to become active, the W3SVC service needs to be…

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

    We’ll send you updates on this idea

    3 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  6. BUG: ScheduledTaskTrigger -RandomDelay does not work

    New-ScheduledTaskTrigger -AtLogOn -RandomDelay 0:15:00; or
    New-ScheduledTaskTrigger -AtLogOn -RandomDelay (new-Timespan -Minutes 15)
    does not set the delay option. The checkbox in ScheduledTask Panel never gets set.
    Windows 10.0.14393 x64 de-DE (German Installation)

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

    We’ll send you updates on this idea

    survey  ·  2 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  7. Register-PSRepository needs a -Force parameter and/or GroupPolicy Administrative Template

    I have created an internal NuGet Gallery to act as a module repository for internal modules and am trying to automate the registration of it as a trusted internal repository for all users in my organisation that use Windows Powershell and/or perhaps are starting to use DSC.

    As all of the users in my organisation who use Powershell are in an AD group, I went looking for a Group Policy setting to register the internal repsitory. There isn't one, so I created a GPO and set it to run the following script, in the user context at login.

    Requires -version

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

    We’ll send you updates on this idea

    survey  ·  4 comments  ·  PowerShell Gallery  ·  Flag idea as inappropriate…  ·  Admin →
  8. Job cmdlets fail with UTF-8 codepage

    Powershell jobs (eg, Start-Job, Wait-Job, Receive-Job) fail when Powershell's codepage is set to UTF8.

    Simple reproduction on Server 2012R2 w/ PS5:
    from cmd.exe, set the parent process codepage and start powershell with:

    chcp 65001
    powershell

    from the powershell that just started:
    $job = Start-Job -ScriptBlock { Write-Output yo }
    Receive-Job $job -Wait

    The Receive-Job call will fail with: "
    [localhost] The background process reported an error with the following message: Cannot process an element with node type "Text". Only Element and EndElement node types are supported. at
    System.Management.Automation.Remoting.OutOfProcessUtils.ProcesData(String data, DataProcessingDelegates callbacks).

    + CategoryInfo          : OpenError: (localhost:String) [], PSRemotingTransportException
    
    + FullyQualifiedErrorId
    5 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    survey  ·  4 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  9. The -ToSession parameter for copy-item should accept multiple sessions

    The Copy-Item cmdlet now supports copying to a remote session. I typically work against a farm of servers and do something like
    $s = new-pssession server1, server2, server3.
    I want to be able to do copy c:\file.txt -tosession $s -destination c:\file.txt.

    Right now, I get an error saying cannot convert an array of objects to a System.Management.Automation.Runspaces.PSSession object. I had to copy the file 3 different times to each session.

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

    We’ll send you updates on this idea

    1 comment  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →

    Thank you for your input. Based on its current ranking compared to other feedback items and product schedule, work on this item is pending (and will be driven by) further customer input. If you did not open this issue and are also impacted by it, please vote this item up.

  10. Allow variable input to be passed to import-dscresource

    To keep configurations and composite resources as modular as possible, we should be able to pass an array of module specifications as a parameter.

    Consider the following:

    [Parameter()]

        [System.Collections.Hashtable[]]
    
    $DscResourcesToImport = @(
    @{ModuleName='xPSDesiredStateConfiguration'; ModuleVersion='3.9.0.0'},
    @{ModuleName='xComputerManagement'; ModuleVersion='1.4.0.0'}
    )
    )

    foreach ($Resource in $DscResourcesToImport)
    {
    $ModuleSpec = @{ModuleName="$Resource.ModuleName"; ModuleVersion="$Resource.ModuleVersion"}
    Import-DscResource -ModuleName $ModuleSpec
    }

    This fails with the error: "Arguments must be constant"

    Thanks for considering this.

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

    We’ll send you updates on this idea

    survey  ·  1 comment  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  11. Improve the speed of Get-EventLog

    As you describe here:
    https://blogs.technet.microsoft.com/heyscriptingguy/2011/03/08/how-to-improve-the-performance-of-a-powershell-event-log-query/
    The Get-EventLog command is slow. Using Get-WinEvent is much faster.The Get-EventLog is still easier to use though.
    Maybe Get-EventLog could be refactored to use Get-WinEvent

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

    We’ll send you updates on this idea

    survey  ·  1 comment  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  12. Get-PSSessionCapability returns capabilities even when the speficied user doesn't have permissions to connect to the session

    The documentation on Get-PSSessionCapability states it returns information (capabilities) on the session configuration the specified username has on it, but it also returns it for a SessionConfiguration (created with a pssc file) when it wasn't created with a RoleDefinition, no matter if the specified user can or cannot access it.
    I would expect it not to return any information for that SessionConfiguration, or have a property that indicates the specified doesn't have the required permissions (invoke / fullcontrol).

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

    We’ll send you updates on this idea

    survey  ·  1 comment  ·  WinRM  ·  Flag idea as inappropriate…  ·  Admin →
  13. allow DSC nodes to download meta configuration

    when wmf4 initially launched, you could place meta.mof files into the pull server along side the default mof and both would be downloaded by the node and applied. This was rather ideal, as it meant I could create standard LCM configurations, and easily update/enforce them.

    For some reason, this seems to no longer work in WMF5.0. This should be returned. Anyone who's had to edit the settings of hundreds (thousands?) of agents should understand it's way easier to tweak one property.

    Real world example: ask anyone who's ever had to reconfigure the the SCCM agent cache. It's a needlessly complex…

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

    Justin,

    Thanks for you feedback! I What types of things do you find yourself needing to manage in the meta-config after initial deployment? This is not to take away from the need for this, I want to better understand how you and other customers are / want to use it.

    Regards,

    MarkG

  14. new-modulemanifest doesn't support ExternalModuleDependencies

    In order to register external module dependencies (dependencies living in another repository), the name has to be registered in a string array property within the PSData Hashtable property in the PrivateData section in the psd1 manifest like so for registering module 'psFtp':

    PrivateData = @{
    PSData = @{

    ExternalModuleDependencies

    ExternalModuleDependencies = @('psFtp')
    }
    } # End of PrivateData hashtable

    However, the new-modulemanifest doesn't have an -ExternalModuleDepencies parameter, nor is it possible to register externalmoduledependencies like so:

    -PrivateData @{ PSData = @{ ExternalModuleDependencies = @('psFtp') } }

    Which from a client perspective of the the existing new-modulemanifest api, would be an…

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

    Thanks for the comment. We will be monitoring this to see how many users are impacted by / recommending it.

  15. PS 5.0 Bug: Transcript stops after restarting a remote computer using ‘Restart-Computer’ with '-Wait' parameter.

    PS 5.0 Bug: Transcript stops after restarting a remote computer using ‘Restart-Computer’ with '-Wait' parameter.

    Example script:
    Start-Transcript c:\test.log
    $computername = "Fred"
    $credential = (get-credential "domain\user")

    Restart the remote computer.

    Restart-Computer -ComputerName $computername -Credential $credential -protocol WsMan -WsmanAuthentication Default -force -wait -for powershell -erroraction stop
    Stop-Transcript

    My tests were performed in the following environment - the source computer is Windows 7 SP1 with PowerShell 5.0, the target is Windows 7 SP1 with PowerShell 4.0.

    Upon completion of the reboot, the transcription is stopped. This is recorded in the transcript log file as “Windows PowerShell transcript end”. This results in 'Stop-Transcript'…

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

    We’ll send you updates on this idea

    survey  ·  2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  16. new parameter -markdown for Format-Table

    Example:

    $Get-Process | select -First 5 | ft -au

    Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName


    716     47 32832 43396   587          1764 AdminManagerClient
    
    257 34 3432 9352 84 1128 AgentService
    495 78 15700 28528 154 3744 AppVClient
    244 35 60952 41796 692 0.56 5416 AppVStreamingUX
    591 18 17280 22992 108 1,751.98 4672 audiodg

    $Get-Process | select -First 5 | ft -markdown

    |Handles|NPM(K)|PM(K)|WS(K)|VM(M)| CPU(s)| Id|ProcessName |
    |-------|------|-----|-----|-----|--------|----|------------------|
    | 716| 47|32832|43396| 587| |1764|AdminManagerClient|
    | 257| 34| 3432| 9352| 84| |1128|AgentService |
    | 495| 78|15700|28528| 154| |3744|AppVClient |
    | 244| 35|60952|41796| 692| 0.56|5416|AppVStreamingUX |
    | 591| 18|17280|22992| 108|1,751.98|4672|audiodg |

    This could be…

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

    We’ll send you updates on this idea

    survey  ·  1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  17. Bug: Move-Item

    Noticed a bug with the "Move-Item" cmdlet.

    Example:
    The source folder and destination folder have different permissions sets.

    $src = "C:\Path\To\Source"
    $dest = "D:\Path\To\Dest"

    ForEach($file in $src)
    {

      Move-Item $($file.fullname) -destination $dest
    

    }

    Using this block of code to move files from one folder to another will result in the files not inheriting permissions from the destination folder.

    The files that were moved retain the permissions from the source folder.

    This doesn't happen with Copy-Item or when you drag / drop files.

    Workaround I found is to add "icacls $dest /T RESET" to the end of the script.

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

    We’ll send you updates on this idea

    survey  ·  1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  18. Generate DSC from existing servers

    For those of us with heavily-configured snowflake servers, it would great if it were possible to generate DSC files from existing builds. This may not be possible in all areas, but perhaps a subset of areas could be supported, with IIS 7.0+ at the top of the list.

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

    We’ll send you updates on this idea

    survey  ·  3 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  19. Properly handle multi-line commands when read from stdin (and stdin is not a tty)

    If Powershell is reading scripts from stdin, when executed using "Powershell -Command - ", then it exits as soon as it sees a multi-line statement. This can be solved by adding an extra newline, but this should not be necessary if stdin is not a tty, and definitely not if "-NonInteractive" is specified.
    Further details and investigation here: http://stackoverflow.com/questions/37417613

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

    We’ll send you updates on this idea

    survey  ·  0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  20. [Bug] Creating Local Users Fails Test-DSCConfiguration if the Users are Disabled

    I can successfully create a disabled local user account on a non-domain joined server which has a password policy enforced.

    If I try to create the disabled account with out a password, or one in violation of the policy, the configuration fails. This is expected.

    If I create a disabled local user account with a password that meets the requirements, the configuration applies. When I run Test-DSCConfiguration the test fails with:
    PowerShell DSC resource MSFT_UserResource failed to execute Test-TargetResource functionality with error message:
    There could be a possible connection error while trying to use the System.DirectoryServices API's.Exception calling
    "ValidateCredentials" with…

    4 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 →
    survey  ·  Mark Gray responded

    Phil,

    Sounds like a valid bug. Thanks for bringing it to our attention. I have opened a bug in our internal system to track this to resolution.

    MarkG

  • Don't see your idea?

Feedback and Knowledge Base