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. [BUG] Start-Process might not return Handle/ExitCode

    Issue:
    In order to obtain the Exit Code from a Process we are executing the Start-Process cmdlet with the following parameters:
    -PassThru -Wait -WindowStyle Hidden
    or
    -PassThru -Wait -NoNewWindow

    In rare cases, this leads to the following exception:
    System.Management.Automation.CmdletInvocationException: Cannot process request because the process (<ProcessIdHere>) has exited. ---> System.InvalidOperationException: Cannot process request because the process (<ProcessIdHere>) has exited.
    at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
    at System.Diagnostics.Process.OpenProcessHandle(Int32 access)
    at System.Diagnostics.Process.get_Handle()

    After the Exception occurred, the returned Object does not contain a Handle nor Exit Code but the executable itself executed without issue.

    We also tried to remove the “-Wait” Parameter and…

    5 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 →
  2. 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…)
    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 →
  3. 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…)
    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. 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 →
  5. "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…)
    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 →
  6. 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…)
    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 →
  7. "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…)
    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. 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…)
    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. 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…)
    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 →
  10. 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…)
    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 →
  11. 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…)
    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 →
  12. 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. 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 →
  14. NetAdapter Module and "Network Configuration Operators"

    This seems too obvious to have escaped Microsoft's attention, but I haven't seen anyone else mention it, so here goes:

    Users in the "Network Configuration Operators" local group who (once elevated) may change network configuration via the gui or netsh, may not be able to perform the equivalent actions using PowerShell cmdlets.

    Specifically, I have not been able to enable/disable network adapters using the Enable-NetAdapter and Disable-NetAdapter cmdlets in such contexts, and have had to use the context menu in "Network Connections" or "netsh interface set interface" instead.

    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 →
  15. Get-ADUser not caching results when querying a remote forest

    Potential bug in the Get-ADUser commandlet when querying a remote forest:

    $myForest | Get-ADUser -filter *
    $myForest[0] # <-- this doesn't reach back to a DC to return the user

    $remoteForest | Get-ADUser -filter * -server dc1.remoteforest.com
    $remoteForest[0] # <-- this will call back to a DC to fetch the user even though it's been successfully retrieved in the previous line

    See https://stackoverflow.com/questions/54790231/get-aduser-not-caching-results for a better explanation.

    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 →
  16. Get-Help NOTES section identation issue

    When we run get-help on cmdlet which has .NOTES the output is unusually indented, even though there is no tab in function documentation.

    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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
  17. Make Add-Type support .EXE assemblies (works on rename to .DLL)

    Running Add-Type with a .EXE assembly gives, 'Cannot add type. The ".EXE" extension is not supported'. But it works if I rename the assembly to .DLL. I think this limitation is artificial and should be removed.

    3 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 →
  18. Get-RDRemoteApp truncates the Alias name with ...

    list entire alias or provide option for column widths>

    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 →
  19. Bug in Import-StartLayout cmdlet

    The documentation states to import a .xml to a mounted Windows image, you can use the powershell command:
    PS C:\ Import-StartLayout -LayoutPath "Layout.xml" -MountPath "E:\MountedImage"

    This will generate an error. You cannot end -MountPath with a '' character, if you do, PowerShell throws the error:
    Import-StartLayout : The path B:\WIMs\Test\ did not resolve to a file.

    If you format the command:
    PS C:\ Import-StartLayout -LayoutPath "Layout.xml" -MountPath "E:\MountedImage"
    You will receive the following error:
    Import-StartLayout : Could not find a part of the path
    'E:\MountedImageUsers\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml'.
    Note the missing '\' character between "MountedImage" and "Users"
    This appears to be an error…

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  20. Move-AzureRmDataLakeStoreItem not working in newer versions of module

    I created a runbook on several automation accounts that move around files and folders on Datalake Storage Accounts (gen 1). The runbook works without hitches on 2 automation accounts, but did not work on the other 2.

    There were quite a few differences in the versions of the added modules: the runbook worked on the older versions of the modules, but not the newer. Specifically the cmdlet Move-AzureRmDataLakeStoreItem threw an error on the newer versions:
    "Account name ***.azuredatalakestore.net/ is invalid. Specify the full account including the domain name."

    After trying quite a few iterations of writing the account name (just…

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  • Don't see your idea?

Feedback and Knowledge Base