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.

Please feel free to provide feedback or file bugs here.

(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. you suck !!!!

    Register-ScheduledTask : The task XML is malformed.
    (1,2)::ERROR: incorrect document syntax

    1 vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
  2. powershell get-childitem works unexpected differently

    Hi there

    Im working with WindowsPE and have to identify my USB-Drive.

    So I´m looking for the drive and assign a variable:

    $usb_drive = (Get-WmiObject -class Win32_LogicalDisk -filter DriveType=2 | Foreach {Get-ChildItem -Filter *.wim -r -d 1 $_.DeviceID} 2>$null | Where {$_.name -eq "boot.wim"}).PsDrive.Root

    With Powershell 5.1.14393.2791 its working as expected. With 5.1.18361.1 not.

    The reason is this part:

    Get-WmiObject -class Win32_LogicalDisk -filter DriveType=2 | Foreach {Get-ChildItem -Filter *.wim -r -d 1 $_.DeviceID}

    The Reason is handling of $_.Deviceid. On both versions the Result is c:

    On both versions Get-Childitem C: gets the entries of the local directory (which makes…

    1 vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  3. 'Using module' does not work when having multiple levels of inheritance

    When having more than one level of inheritance, 'Using module' does not work as expected.

    Example:

    Class A is defined in module A.
    Class B is defined in module B.
    Class C is defined in module C.

    A.psm1
    class A {}

    B.psm1
    Using module 'A'

    class B : A {}

    C.psm1
    Using module 'B'

    class C : B {}

    With the above example class C only inherits the properties and methods from B class and not from A class.

    The reason for separating the classes in different modules is to allow their reuse in other modules.

    1 vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  4. Bug: Ps1 script file with extra extension gets deleted when called from CMD

    When calling PowerShell from CMD and specifying a script file that contains an extra "extension" (extra dot) in the base name, the script is not run but the file is mysteriously deleted:

    Example (run in CMD):

    powershell -file c:\temp\script.txt.ps1

    The same issue when called like this:

    powershell -command "& c:\temp\script.txt.ps1"

    This has been reproduced by me and others on different machines with different paths.

    The same issue exists when called from inside PowerShell like this:

    . "powershell.exe" -file c:\temp\script.txt.ps1
    Start-Process "powershell" -Arg "-file, "c:\temp\script.txt.ps1"

    Note that these will work just fine:

    powershell -command "& 'c:\temp\script.txt.ps1'"
    powershell -command ";& c:\temp\script.txt.ps1"
    powershell…

    1 vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  5. Write-Information does not show in a file transcribed by Start-Transcript

    Write-Information does not show in a file transcribed by Start-Transcript unless you set $InformationPreference to 'SilentlyContinue'... which then means it does not display in the console.

    I believe this is a bug in Windows PowerShell (as of v5.1.17134.590) that has been fixed in PowerShell Core? If we cannot go to Core I have to do some workarounds (like using Write-Host or creating a function that combines 2 Write-Information calls with different preferences).

    There looks like a better formatted thread here on this issue:
    https://stackoverflow.com/questions/55191548/write-information-does-not-show-in-a-file-transcribed-by-start-transcript

    Here's $PSVersionTable:
    ---------------------------------------------------------------------------
    PSVersion 5.1.17763.316
    PSEdition Desktop
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
    BuildVersion 10.0.17763.316
    CLRVersion 4.0.30319.42000 …

    1 vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  6. SeServiceLogonRight is not getting cleaned up after exiting JEA session

    I have an issue with Just Enough Administration and Windows 2012 R2, where when I have the 'Run As Virtual account' set to true, it does not clean up after itself. The temporary virtual account is left in 'Logon as a service'. this can be viewed from the local security policy.

    https://github.com/PowerShell/PowerShell/issues/5296

    1 vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  WinRM  ·  Flag idea as inappropriate…  ·  Admin →
  7. The lock-bitlocker command help is wrong

    The cmdlet documentation for "Lock-Bitlocker" is wrong. First, the example contains the command Lock-Volume, that doesn't exists, and when issuing such command it doesn't recognize the mount point argument, stating it doesn't exists. This seem just an alias for manage-bde -lock "mountpoint" -forcedismount - that one works and should be cited in the documentation.

    https://docs.microsoft.com/en-us/powershell/module/bitlocker/lock-bitlocker?view=win10-ps

    1 vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
  8. Powershell Ghost Error Messages

    How can I get to discuss my issue with a human being regarding Powershell creating Ghost Error messages similar to what I started out but still is bug of some kind. During my testing, my script coding was modified to work properly. How may I rid myself from these Ghost Error messages? How can i connect up with a Microsoft Powershell Individual with the correct expertise?

    1 vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  9. DISM Repair-WindowsImage should allow HTTPS URIs for image sources.

    Allow the DISM Repair-WindowsImage command to use HTTPS URIs for image sources. We use a common image to repair the insanely frequent container store corruption issues on our systems. It occurred to me that if somebody with malicious intent was able to alter the WIM files we use to facilitate this process it would lead to easy mass pwnage. Therefore, it makes sense to use an extremely simple, easy-to-lock-down protocol like HTTPS to provide access to these rather huge files rather than a complex protocol like SMB that forces us to expose many other RPC services as well. Yes, this…

    1 vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  10. "Test-NetConnection" add timeout

    please add timeout to "Test-NetConnection" see https://superuser.com/q/805621/216033

    3 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  11. Extraneous results returned with Resolve-DnsName (dnsclient)

    Quoted feedback from documentation feedback provided by MSFT team below. (via @jordanmills)

    > When resolving SRV records (example: Resolve-DnsName -Name "_kerberos._tcp.dc._msdcs.$env:userdnsdomain" -Type SRV), the cmdlets also attempts to resolve any returned A or AAAA records and sends them to the pipeline as a separate object collection. This breaks pretty much any attempt to sort, group, filter, or otherwise process the data. How can we make it not return A and AAAA records for SRV queries?

    https://github.com/MicrosoftDocs/windows-powershell-docs/issues/302

    1 vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  12. Saving file in the remote session has failed with error: Exception has been thrown by the target of an invocation..

    Since a few weeks, when I edit a file in a PSSession in ISE I get this error message when I save the modifications:

    Saving file: C:\path\file.ps1 in the remote session has failed with error: Exception has been thrown by the target of an invocation..

    Not sure there is a link, but this problem appeared around the moment when this post has been published.

    https://devblogs.microsoft.com/powershell/windows-security-change-affecting-powershell/

    1 vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  13. 1 vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
  14. "using module" does not take variable as parameter

    The "using module" statement does not take a variable as a parameter for the module name, which is inconvenient if you're writing scripts based on taking modules from variable DFS paths based on the environment (usign different Active Directory forests as the root for the paths for instance).

    1 vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  15. high CPU

    Found out when my CPU is high (99%-100) (i do set executionpolicy to remotesign/unrestricted also)
    When i run the PS script, it will ask for executionpolicy.
    but when i low CPU, it will just run the script.

    suspect value (executionpolicy remotesign) unable to pass thru to script.ps1 on time. so it prompt out everytime when CPU is high.
    do we have some setting to tune this. delay it, so that executionpolicy have more time to pass the value to script.ps1.

    ---------------------------------
    Script:
    $sourcefolder="D:\A743"
    $datenow = get-date
    $processdate = (get-date).Adddays(-3)

    get-childitem $sourcefolder -file | where-object { $_.lastwritetime -le $processdate } |…

    1 vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  16. "Open Powershell window here" broken if file path contains an exclamation point

    If I Shift+RightClick and select "Open PowerShell window here" in a folder that starts with an exclamation point, PowerShell will open, but it won't open at the desired path.

    Example: C:\Users\admin\Documents\!testfolder\

    1 vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  17. WindowsServerBackup not available on Windows 10 ???

    It seems that the WindowsServerBackup powerShell module is not available on Windows 10, although it is written on the Microsoft website, here in particulary: https://docs.microsoft.com/en-us/powershell/module/? view = win10-ps

    Is it a mistake?
    I spent a lot of time trying to install this module, but finaly, I dropped.

    What a pity !!!

    1 vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  18. servercore : can I use it on Windows 10 Home?

    https://docs.microsoft.com/en-us/powershell/module/servercore/get-displayresolution?view=win10-ps

    I know this says servercore. But I can't believe the ability to set the display resolution via Powershell should be in the realm of Servers only.
    1) Can someone confirm if indeed you can do this on Windows 10? 2) And if so, how do I get the module to import.
    When I have tried
    Import-Module -Name servercore
    I get the following:
    PS Env:\> Import-Module -Name servercore
    Import-Module : The specified module 'servercore' was not loaded because no valid module file was
    found in any module directory.

    1 vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  19. How to create external trust relationships between two domains?

    How to create external trust relationships between two domains, such as aaa.com and bbb.com. I haven't seen a similar demo for two days.
    Looking forward to your reply.

    2 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  20. Bug: New-Item Junction creates bad reparse points when pointing at SMB shares

    Creating directory junctions with "cmd /c mklink" fails when pointing at network shares, claiming it only works with local volumes. PowerShell happily creates the junction, but the result is unusable as child items cannot be enumerated.

    PS E:\> new-item -Name testlink -Value \\localhost\c$ -ItemType Junction

    Directory: E:\

    Mode LastWriteTime Length Name
    ---- ------------- ------ ----
    d----l 2/28/2019 1:05 PM testlink

    PS E:\> dir .\testlink\
    dir : The filename, directory name, or volume label syntax is incorrect.
    At line:1 char:1
    + dir
    + ~~~
    + CategoryInfo : ReadError: (E:\testlink:String) [Get-ChildItem], IOException
    + FullyQualifiedErrorId : DirIOError,Microsoft.PowerShell.Commands.GetChildItemCommand

    1 vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  • Don't see your idea?

Feedback and Knowledge Base