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. When I attempt to communicate with serial devices using PowerShell in Ubuntu 18, I get an “access denied” message when I try to open the por

    When I attempt to communicate with serial devices using PowerShell in Ubuntu 18, I get an “access denied” message when I try to open the port. I can create the port object with no problem:

    $port = new-object system.io.ports.serialport ttyACM0

    And I can verify the created port:

    Echo $port

    …yields all the specifics. But when I try to open the port so that I can begin reading or writing:

    $port.open()

    …access is denied. Is this a procedural error on my part, or a short-coming in the cross platform PowerShell itself? I’ve tried this with onboard serial ports as well as…

    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 →
  2. Write-Progress as Advanced Function

    Write-Progress has been discussed recently as adding overhead. What if we added capability to differentiate code:

    1) Not an advanced function: behaves like now
    2) Advanced function: adds a -Progress switch that will only do Write-Progress if it is passed.

    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 →
  3. Get-Date -UFormat %W incorrect

    >get-date

    Dienstag, 2. Juni 2020

    // So Tuesday, 2nd of June 2020 and should be Cal. week 23

    >get-date -uformat %W
    22

    Am I missing something? this doesn't seem right

    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 →
  4. Format-Volume does not work with -FileSystem NTFS

    Format-Volume seems to work with FAT, FAT32 and exFAT, but doesn't work with ntfs. For example:

    Format-Volume -DriveLetter D -FileSystem NTFS

    It always gives back an invalid parameter error. I have tried multiple USB drives, multiple computers, and running it with administrator privileges.

    I came across this when using MI, where the same function call does not work, so it's not really a problem with PowerShell but WMI/Microsoft Storage Management APIs.

    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  ·  WMI  ·  Flag idea as inappropriate…  ·  Admin →
  5. I ran command which was executable in cmd but not recognized in Powershell ISE.

    Command which is recognized in cmd but not in Powershell ISE.

    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 →
  6. Bug: Returning NoteProperty from Functions

    ```
    function TestObject(){
    $MyObject = (Get-Process | select Name) -as [pscustomobject]
    Add-Member -InputObject $MyObject -MemberType NoteProperty -Name "NP0" -Value "Ich bin ein NoteProperty"

    Add-Member -InputObject $MyObject -MemberType MemberSet -Name "SubSet"
    Add-Member -InputObject $MyObject.SubSet -MemberType NoteProperty -Name "NP1" -Value "Ich bin ein NoteProperty"
    Add-Member -InputObject $MyObject.SubSet -MemberType NoteProperty -Name "NP2" -Value "Ich bin ein NoteProperty"

    #This does not work
    #$MyObject

    #This does not work either
    #return $MyObject

    # This works
    Get-Variable -Name MyObject -ValueOnly
    }
    ```

    So basicly you create an object inside a function using a random cmdlet. After that you add NoteProperty members using Add-Member.
    Return that object…

    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. Add-Member unexpected behaviour when adding method to value types

    Trying to alter value with a method:
    $x = 2
    Add-Member -InputObject $x -MemberType ScriptMethod -Name "AlterValue" -Value {param ([int]$NewValue) $NewValue; $this = $NewValue}
    $x.AlterValue(3)
    $x
    No error (even with Set-StrictMode -Version Latest), no update either.

    $y = 'b'
    Add-Member -InputObject $y -MemberType ScriptMethod -Name "AlterValue" -Value {param ([string]$NewValue) $NewValue; $this = $NewValue}
    $y.AlterValue('a')
    Error: Method invocation failed because [System.String] does not contain a method named 'AlterValue'.
    Then trying like this:
    $y | Add-Member -MemberType ScriptMethod -Name "AlterValue" -Value {param ([string]$NewValue) $NewValue; $this = $NewValue}
    Runs without error, but $y.AlterValue('a') results in the same error as above. Same if I…

    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 →
  8. Get-Service -ComputerName not supported anymore?

    Get-Service used to support a ComputerName parameter so that I can connect to a remote server and get the services from there. Is it no longer supported in PS7? I saw a suggestion to run the script remotely on each server where you want to get the services from, which is highly impractical and slow too.

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  9. Powershell reacts to Lithuanian 9 and 0 in a wrong way starting Windows 1809

    It's not an idea, it's a bug.

    Lithuanian keyboard is known to use the right Alt as AltGr.

    As a top keyboard row in the Lithuanian keyboard layout is Lithuanian characters, holding AltGr allows all the top row to become an English US keyboard again.

    This way, holding AltGr enables to type numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 0. But not in Powershell, that ships with Windows 1809. Be it Windows Server 2019 1809, or Windows 10 1809.

    Starting with this Powershell, typing AltGr+9 and AltGr+0 does nothing and this is wrong.

    Typing numbers in Powershell…

    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 →
  10. Sandboxing powershell.exe.config for different versions of PowerShell

    Windows PowerShell.exe supports a -Version command-line switch, which aligns the current PowerShell session to a particular version of PowerShell, e.g. powershell.exe -Version 2.0 will get you a PS shell which uses .NET 2.0 and PowerShell v2. This is still useful, because I still have to write scripts that work in older environments, even though I am running WinPS 5.1 myself.

    However, semi-recent Windows Updates have added configuration to powershell.exe.config (I think to support newer TLS ciphers), which are incompatible with powershell.exe -Version 2.0.

    The following simple code is a minimal test point:

    $wc = New-Object Net.WebClient
    
    $wc.DownloadString(&#39;<a rel="nofollow noreferrer"
    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 →
  11. Can't configure NetNatStaticMapping ExternalIPAddress other than 0.0.0.0

    Trying to configure Static mapping using an ExternalIPAddress other than 0.0.0.0
    Get us this message:
    "Add-NetNatStaticMapping : The process cannot access the file because it is being used by another process."
    Even though the IP address and port is mapped in "NetNatExternalAddress".

    4 votes
    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 →
  12. Please update help for Format-List

    Please update help version of Format-List to PowerShell 5.1

    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 →
  13. gridview tabulation

    Group multiple gridview in one windows.A tabulation system to navigate between grids.

    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 →
  14. MinimumCompatibleVersion still causes "Cannot find module PSDesiredStateConfiguration_1.0 from the server"

    Although a very similar issue has been resolved in WMF5.1 we are encountering an issue when working with partial configurations.

    It seems that the MinimumCompatibleVersion for the complete configurations is taken from the "first" (alphabetical order) partial configuration. If this happens to be a 2.0.0 configuration then other partials which were 1.0.0 cannot load the PSDesiredStateConfiguration module.

    Please take a look at the reproduction in the attachment.
    We reproduced this on windows server 2012r2, 2016 and 2019 and it is causing a very blocking issue for us.

    Edit; since the attachments dont seem to work:

    if (-not $inputCredential)
    {

    $inputCredential
    12 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 →
  15. ISE updates prematurely

    If you run changes (to see how they work), your changes will be updated if you leave ISE. There should be an 'do you want to update changes?' before quiting

    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  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  16. New-SmbShare fails without triggering Try

    I have a Powershell script to duplicate the shares from one machine onto another that is in the process of being mirrored. I am testing my script, including it's error handling by attempting to recreate all shares when half the drives have not been populated on the new machine. This should generate loads of "cannot create share, path not found" errors.

    Thus, this code within the loop:
    Try {
    New-SmbShare -Name "$($line.{Share Name})" -Path "$($line.{Folder Path})"
    echo "Created share $($line.{Share Name})" >>$logFile
    } Catch {
    Write-Error -Message "Exception Creating Windows share $($line.{Share Name}). Error is $_" -TargetObject $line
    echo "FAILED…

    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 →
  17. The Set-DNSServerResourceRecord command will not change the "PrimaryServer" field even though it looks like all commands execute just fine.

    The Set-DNSServerResourceRecord command will not change the "PrimaryServer" field even though it looks like all commands execute just fine.

    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 →
  18. font color is too dark... anyway to change it?

    I love to use Powershell. But some of its default color is too dark so that I cannot read them. I submitted comparison screenshot with CMD.

    The posted screenshot is, as you see, 'ls' command from a remote server logined by CMD and Powershell each. You may see that right one's 'ls' output is too dark. I changed background but it was same cause it's the problem of font color itself not the background color or font size.

    Some of internet post guided to change bash setting to change output color of 'ls', but that is just temporary fix only…

    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 →
  19. mumudahkan perbaikan pada komputer

    karena langsung runing sendiri dan langsung jadi

    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 →
  20. saya sangat terbantu dengan adanya halaman ini

    ini sangat praktis dan mudan untuk dimengerti TY

    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