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. Inherit Preference Variables

    It looks like most people are having problems getting things like Verbose preference working in their functions. If I create an advanced function I'm assuming that the builtin functionality now added is true for any commands called withing my function.

    For example I have an advanced function that has been called with the -Verbose switch. My intuition is that any invoke-command cmdlets I use in that function are going to respect the -verbose switch or any of the other switches like -whatif -debug etc. However, this is not the case and most people are having problems getting this functionality to…

    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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  2. Absent Or Stopped for Service DSC Resource

    I am in an environment where sometimes things might get pushed on some machines from other sources. I would like to have a base composite resource that ensures a Service is not running on a machine whether the service is present or not. The service is either Absent or if it is Present it is stopped. Currently, if I just configure "State = 'Stopped'" and do not specify Ensure, then Ensure defaults to present and the configuration fails on machines where the service is absent. In this case, I do not want ensure that it is present or absent just…

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

    We’ll send you updates on this idea

    survey  ·  0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  3. ISE 5.1.1 Preview crashes and restarts but doesn't generate $env:APPDATA\PowerShell_ISE_Crash_Log.txt

    I just had a number of crashes in ISEP while editing code. Each time, ISEP restarted, but no $env:APPDATA\PowerShellISECrash_Log.txt was generated

    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  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  4. ISE Preview: USB drive shows up twice in Get-PSDrive

    This should speak for itself:

    PS C:/tmp> get-psdrive -name 'I'

    Name Used (GB) Free (GB) Provider Root CurrentLocation


    i 52.88 5.99 FileSystem i:\ BUILD 2016
    I 52.88 5.99 FileSystem I:\

    Maybe this is related to inserting the USB key while ISEP was running?

    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  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  5. Automatic Format-List formatting

    If you call Get-PSDrive;Get-Alias in one line, Powershell automatically changes the Format of Get-Alias to Format-List-Property * instead of the Default Format-Table

    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 →
  6. KB3000850

    KB3000850 is not part of the Azure SQL 2014 image, and takes over an hour to install (often timing out) before DSC Extension can run. When update fails to install, causes DSC to fail as well. Easy to reproduce - configure VM image based on SQL 2014 and install DSC using templates.

    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  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  7. 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 →
  8. Get-ChildItem and Test-Path on IIS:\SslBindings can fail to show SNI bindings

    On IIS8

    After Importing the WebAdministration module and using Get-ChildItem and Test-Path against IIS:\SslBindings I find it gives it can give inconsistent results.

    If I create a new site with only an SNI SSL binding and try to enumerate the SSL bindings using either

    Test-Path IIS:\SslBindings!443!my.test.site
    (which will return false)
    or
    Get-ChildItem -Path IIS:\SslBindings\
    (which can fail to return the SNI bindings)

    Adding a HTTP binding to the IIS site makes these SNI SslBindings visible (it can be removed afterwards).

    This does not occur using netsh http show sslcert which seems to return the information reliably.

    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 →
  9. BUG : [Class] PSReference is not working on a static property

    I would like to implement a simple Id Counter but I found a bug

    Step to reproduce :
    PS >
    class Class1 {

     static [int] $IdCount = 0
    
    [int] $Id = 0
    Class1() {
    $this.Id = [System.Threading.Interlocked]::Increment([ref][Class1]::IdCount)
    }

    }
    PS > Class1::new() | Out-Null
    PS > Class1::IdCount
    0

    Expected :

    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 →
  10. Please restore legacy CMD.EXE function-key functionality, e.g. F1 and F2

    In the legacy cmd.exe shell, a number of functions keys provided command recall functionality. For example, F1 would restore a character from the previous command one character at a time. Another example and the reason I'm typing this is F2 which allowed you to hit F2 + <some other character> and it would recall the previous command up to the first occurrence of that character, typically a space.

    Please re-instate this functionality or I shall spend the rest of my days designing products that use horrific noun prefixes that you will loathe. :-)

    /Dean Wells

    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 →
  11. Add tar.gz support to Package DSC resource

    It would nice to be able to expand tar.gz packages using DSC

    1 vote
    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 →
  12. 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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  13. Bug: String parameter with null as default: Different behavior if debugged!

    Function Test-StringDefaultParameter {

    Param (
    
    [String] $Str = [System.Management.Automation.Language.NullString]::Value
    )

    if ($Null -eq $Str) {
    Write-Host &quot;Str is null&quot;
    } else {
    Write-Host &quot;Str is &#39;$Str&#39;&quot;
    }

    }

    When debugging above function (that is just placing a breakpoint in it somewhere in Powershell ISE) then calling 'Test-StringDefaultParameter' without any parameter behaves as expected! (printing out 'Str is null'!).
    Not so though, if there is no breakpoint set! Then 'Str is ''' get printed on the console!

    This happens (at least) with Powershell 5 on Windows 7 64 bit.

    PS C:\Users\peh> Get-Host

    Name : Windows PowerShell ISE Host
    Version : 5.0.10586.117 …

    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  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  14. [ordered] does not work inside class definition

    An unresolvable type name token inside a class definition is considered a parse error. [ordered] is not a valid type, so using of it inside class definition cause parse error.

    class C {
        [object] M(){
            return [ordered]@{}
        }
    }

    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 →

    Thank you for reporting this issue. It has been fixed in our internal builds and the fix is available in latest insider fast ring builds.

  15. Write-Error output posted to current active ISE tab

    When a Write-Error output is used with multiple powershell tabs in the ISE it is automatically posted to the currently active tab regardless of which tab it originated from.

    This was tested with the following command:

    1..20 | % {if ($ % 2) { start-sleep -s 2; write-output $} else {start-sleep -s 2; write-Error $_}}

    And across 3 different tabs in the same ISE.

    While it seems useful behaviour to have a script report errors to the currently active tab, it then can cause problems when trying to actually debug those errors when switching back and forth between tabs…

    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  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  16. PRB: out-lineoutput : Unable to perform host dependent operation.

    Under some undetermined circumstances, the ISE (RTM or Preview) aborts the execution of the current script with the following error:

    out-lineoutput : Unable to perform host dependent operation.

    + CategoryInfo          : NotSpecified: (:) [out-lineoutput], InvalidOperationException
    
    + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.Out

    LineOutputCommand

    Restarting the script usually works, but can fail some time later.

    Any clue?

    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  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  17. Powershell Class Request

    It does not appear that I can use Parameter validation inside a class.

    When I try to add parameter validation it throws a syntax error:
    Attribute 'ValidateSet' is not valid on this declaration. It is valid on 'Property, Field' declarations only.

    It also does not seem to like using the [System.Enum]::GetNames() function (which returns the same type expected by the ValidateSet attribute), yet demands that 'Attribute argument must be a constant' when you do something like:

    enum LogProviders {
    Uninitialized = 0
    TextFile = 1
    EventLog = 2
    Database = 3
    }
    MyClassConstructor([ValidateSet($([System.Enum]::GetNames([LogProviders])))][LogProviders]$p, [string]$cs)

    I would also like to be…

    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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  18. Bug: WMF5 install fails on Windows 7

    I get this error in Event Viewer:
    Windows update "Update for Windows (KB3134760)" could not be installed because of error 2148204800 "No signature was present in the subject."

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

    Followed up in email. This may be due to the fact that on March 3 KB3134760 was not fully populated. That work was not completed until March 7. Please review and respond to email when possible.

  19. Bug: PSWA 5.0 ignores Set-Location in profile script

    I had previously setup PSWA 4.0 that executed a profile.ps1 script at logon to resize the console, add snapins, and drop the user into a UNC network location where the scripts are contained. I upgraded to PS 5.0 on Friday and now when users login, all elements of the script work EXCEPT Set-Location. I have tried to cd to a local path instead of UNC, which also did not work. There are no errors or warnings. If I execute the startup script after I am already logged in to the PSWA, it executes properly and changes to the UNC path.…

    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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  20. Set-ClusteredScheduledTask should have an -Enable argument

    Set-ClusteredScheduledTask has a -Disable argument but no -Enable. My method of enabling a clustered scheduled task is fairly elaborate: modify the task via Task Scheduler, export the task to XML, and run Powershell to unregister the task and then register it from the exported XML. Being able to disable and enable these tasks via Powershell would be a significant help.

    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 →
  • Don't see your idea?

Feedback and Knowledge Base