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. 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 →
  2. 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 →
  3. 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 →
  4. 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.

  5. 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 →
  6. 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 →
  7. Test-DscConfiguration fails once running against remote machine

    Having the following script:

    configuration SimpleConfig2
    {

    Import-DscResource –ModuleName 'PSDesiredStateConfiguration'
    
    

    node $remoteCommputer
    {
    Environment TestVersion
    {
    Ensure = "Present" # You can also set Ensure to "Absent"
    Name = "TestEnvironmentVariable"
    Value = "TestValue2"
    }
    }

    }

    SimpleConfig2

    Start-DSCConfiguration -Path "SimpleConfig2" -Force -Wait -ComputerName $remoteCommputer -Credential $g_AutomationDefaultVMAccounCred -verbose

    $result = Test-DscConfiguration -Path "SimpleConfig2" -ComputerName $remoteCommputer -Credential $g_AutomationDefaultVMAccounCred

    The config is applied correctly, yet Test-DscConfiguration fails with the following message:

    The configurationData parameter is reserved for future use. The current configuration is used by default.

    + CategoryInfo          : InvalidArgument: (root/Microsoft/...gurationManager:String) [], CimException
    
    + FullyQualifiedErrorId : MI RESULT 4
    + PSComputerName : target-machine
    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  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
    investigating  ·  Mark Gray responded

    Anton,

    I am not able to reproduce your issue. What PS / WMF version are you running into this on? Also what OSes are running on the local and remote machines?

    MarkG

  8. Issue with DSCFileDownloadManager Credentials

    So, it seems as though in WMF 5.0 there is a regression in functionality. In WMF 4.0, you could set up a DSCFileDownloadManager and Credential to have a Target Node contact a Pull Server SMB Share and download new mof files and resources. Everything worked perfectly including Certificate based encryption of the credentials. However, in WMF 5, it seems as though the LCM of the Target Node attempts to contact the SMB Share Anonymously, even in credentials are provided. Now, in a Non domain joined environment, you can just provide EVERYONE full control and then change Local Security Policy such…

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

    This bug has been identified and the issue has been resolved. The fix will be available in future releases, including the Windows Insider Fast Ring preview

  9. The parser for variable names isn't implemented according to spec

    According to the PowerShell language specification, the following variable names are illegal but the current PowerShell implementation accepts them:

    $:: = 3
    $::a = 3
    $variable:foo: = 5
    $:a:3 = 3

    which means that things like "$:a:3" currently act as "${:a:3}" rather than the expected "${:a}:3".

    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. If module version is not specified, composite configurations fail to load

    BUG
    Version occurs in: WMF5 Production Preview
    Previous versions? No.

    In a composite configuration scenario, if one of the composite resources contains an import-dscresource statement, and multiple versions of the module are available, the resource fails to load unless a moduleversion is specified.

    The resource works fine if there is only one version available on the machine in question, or a minimum version is specified.

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

    Justin,

    This behavior is common to all DSC resources, if I understand your issue correctly. If there are multiple versions of a module installed on your authoring system, you must specify the version that you intend to use in your configuration.

    What behavior are you expecting?

    MarkG

  11. Bug: Get-Date works different to new-object DateTime

    Repro:

    635898816000000000

    635898816000000001

    There is extra 1 at the end with using Get-Date commandlet. It can be workaround by specifying -mil 0, but this is not what user expects..

    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 →
  12. Bug: Running `powershell "echo foobar" > nul` from the command prompt doesn't suppress output.

    Basically what the title says. If you run that from the command prompt, you will get output even if you shouldn't. For some reason, this specifically seems to affect NUL and not any other file.

    Related StackOverflow question: http://stackoverflow.com/a/35543250/4077294

    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 →
  13. Make modules and cmdlets available for current script

    The ability to package a script with the cmdlets and modules used to make that script.

    E.g.

    The ability to put a cmdlet at the start of the script such as:
    Monitor-ScriptModule -All

    Then as a module is imported or a cmdlet is used, the script will include the modules and cmdlets in some file that allows an admin to deploy the script to other workstations and the script is able to include the modules and cmdlets on older versions that may not have the cmdlets or modules included.

    This would help avoid older versions from not working because the…

    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  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  14. -New-NetTransportFilter LocalPortEnd<UInt16> has default port 1065

    Either provide explanation why start at 1065 & end at 65535 as defaults or correct the TechNet ?

    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 →
  15. Scope for Environment variables

    To enhance modularity PowerShell needs to allow for scoped environment variables. CMD.exe did this years ago, with the SETLOCAL command, but a more sophisticated approach incorporating concepts like module-scope would be a real boon...

    Global variables are generally regarded as a bad idea, but that's how PowerShell has always treated environment variables. For backward compatibility, that obviously needs to be retained. But it should be possible to do things like

    $local:env:PATH += ";C:\Foo\bin"

    in one function (or module) without impacting other code.

    Obviously when Powershell spawns child processes for native commands, it would need to construct and pass the appropriate…

    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 →
  16. psreadline module bug: cursor position error

    TITLE
    psreadline module bug: cursor position error

    【version】
    tested on powershell 5.0 in win10 1511 10586.104

    【reason】
    Cursor position error when chinese characters folder,or filename in console.
    see under test code.

    【reporter】
    By the chinese powershell research group. QQ group No. is 183173532

    【test code】
    PS F:\MP3\振奋> pwd <----- In any chinese characters folder,some block on 'pwd' left.

    Path

    F:\MP3\振奋

    PS F:\MP3\振奋> Remove-Module psreadline
    PS F:\MP3\振奋> pwd <----- Normal

    Path

    F:\MP3\振奋

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  17. PowerShell ISE Preview: Remoting isn't working (connection takes forever)

    PowerShell ISE Preview: Remoting isn't working (connection takes forever)

    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 →
  18. Bug: Syntax highlighting for DSC node block

    Scenario: In a PowerShell DSC configuration block, you create a node block, by specifying a static node name. The node name has a dash in it.

    In this case, the node name is colored blue, like a command, instead of purple, like a parameter value.

    If the node name does not have a dash in it, then it is properly colored purple.

    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 →
  19. BUG: Powershell -NoExit does not dot source when run from VB2010

    Just upgraded from Windows 7 to Windows 10 and encountered a bug in Powershell 5.
    When using Process.Start from VB2010 to run Powershell command (even one as simple as "dir") works as expected. If however you use the -NoExit switch Powershell fails to dot source my global file, but instead tries to load it as a module - and throws an error. The same commands typed on the Powershell consol or a command prompt work with or without -NoExit.

    Powershell -Command "& { dir }"
    Powershell -NoExit -Command "& { dir }"

    The first command works from VB2010 (via Process.Start)…

    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 →
  20. [BUG] PowerShell ISE hangs when opening multiple files if Files.CollectionChanged event has a subscriber

    Powershell ISE (both 5.0 and ISEpreview) hangs when you open multiple files at the same time (open dialoge) when you subscribe to the event $psISE.CurrentPowerShellTab.Files.CollectionChanged .

    Works fine when a single document is opened/closed.

    $action = {

    Write-Host &quot;Test&quot;
    

    }

    Register-ObjectEvent -InputObject $psISE.CurrentPowerShellTab.Files -EventName CollectionChanged -Action $action -SourceIdentifier "ToggeRegionExpansionOnOpen"

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

Feedback and Knowledge Base