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. BUG: Get-RDSessionCollection always generates exception on Windows Server 2019

    Get-RDSessionCollection of the RemoteDesktop module always throws an exception:
    --

    PS C:\windows\system32> Get-RDSessionCollection
    New-Object : Exception calling ".ctor" with "1" argument(s): "Invalid parameter "
    At C:\windows\system32\WindowsPowerShell\v1.0\Modules\RemoteDesktop\SessionDesktopCollection.psm1:520 char:14
    + ... $scope = New-Object System.Management.ManagementScope("\\" + $Conn ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

    CollectionName Size ResourceType CollectionType CollectionDescription
    -------------- ---- ------------ -------------- ---------------------
    mycollection 0 RemoteApp programs PooledUnmanaged My first collection

    PS C:\windows\system32>

    --

    Changing C:\Windows\System32\WindowsPowerShell\v1.0\Modules\RemoteDesktop\SessionDesktopCollection.psm1 line 520

    $scope = New-Object System.Management.ManagementScope("\\" + $ConnectionBroker + "\" + $wmiNamespace, $connectionOptions)

    into

    $msuri = "\\" + $ConnectionBroker + "\" + $wmiNamespace
    $scope = New-Object System.Management.ManagementScope($msuri, $connectionOptions)

    6 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 →
  2. Get-PartitionSupportedSize and MSFT_Partition class report wrong partition max size

    The cmdlet Get-PartitionSupportedSize as well as the CIM class MSFT_Partition (https://docs.microsoft.com/en-us/previous-versions/windows/desktop/stormgmt/msft-partition#members) either report wrong values for the maximum supported partition size or the documentation is not clear enough.

    Creating a new partition that uses the maximum size produces partitions that fall 0.98MB short of the maximum supported size. It looks like the CIM class calculates some default offset into the reported SizeMax, since changing the offset did not change the issue.

    Steps to reproduce:

    foreach ($off in 1,10,15,20,50)
    {
    $null = Clear-Disk -Number 1 -RemoveData -Confirm:$false
    $null = Initialize-Disk -Number 1 -PartitionStyle GPT
    $reservedpartition = get-partition -number 1…

    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  ·  WMI  ·  Flag idea as inappropriate…  ·  Admin →
  3. new-azvm BUG

    Hey every body,

    "New-AzVM" has a strange behaviour (maybe a bug), if you pass vn and subnet as parameters and
    the vn exists but the subnet doesn't, it will try try to delete the vn (cascading) and recreate it. This
    will fail if you have other VMs in the vnet but will succeed if you have empty subnets deleting all of them (OUCH!).

    Steps to reproduce:

    1. login to portal and create 1 vnet (say vnProd2 ) and 2 subnets (say snProd, snDev)
    2. login to Azure from powershell (module AZ)
    3. run the following command:
    New-Azvm -Location "northeurope" -ResourceGroupName…

    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. Bug - Blocking psscriptpolicytest Causes PowerShell to Crash

    Major 5 Minor 1 Build 18362 Revision 145

    For years blocking the psscriptpolicytest script via SRP had no effect whatsoever on PowerShell.

    Since the latest W10 1903 update, blocking psscriptpolicytest script is SRP causes PowerShell to crash.

    Windows 10 Pro
    1903
    18362.175

    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 →
  5. Bug?: The Powershell call operator breaks my ISE

    Hello Community

    I hope that i have finally hit the correct place to post my question, since i have been unable to find it so far. Here is my situation:

    I have been developing a Powershell script using Powershell ISE, and for the most part i am very happy about it, however i have encountered what i believe to be a bug in the call operator (&).

    When i use the call operator followed by a "pure" string everything works as it should, the command works and ISE runs as usual, but when i use the call operator followed by…

    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. Typo on Page Export-WindowsDriver

    Typo on page: https://docs.microsoft.com/en-us/powershell/module/dism/export-windowsdriver

    Where: Examples
    Example 1: Export drivers from the running operationg system

    "operationg" rather than "operating"

    4 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
  7. Get-AuthenticodeSignature does not return TimeStamperCertificate

    Hello, we've been using command Get-AuthenticodeSignature to validate a signed/time stamped file, and this works as expected in Server 2008 R2 and Server 2016 machines. But targeting the same file from Server 2012 R2 Powershell ISE, returns empty TimeStamperCertificate property. I've confirmed PS1, .NET framework and Authenticode module versions to be latest, and server patches are up to date. It seems that the root issue is within Microsoft.Powershell.Security library.

    Thanks

    Vlad

    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 →
  8. copy

    Copying from the terminal with Ctrl+C and Ctrl+Shift+C and pasting it in notepad had different effects. To replicate, copy once with Ctrl+C and paste the output of say 'ls' in notepad and again try with Ctrl+Shift+C

    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 →
  9. It does not work with all MSIs

    This resurce does not handle correctly all MSIs. For example Firefox MSI will not be installed due to the ProdID

    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 →
  10. after you install server role on server 2016, configure the internal servernetwork interface and the external server network interface to us

    module doesnot seem to agree with the command.

    set-dnsclientserveraddress -interfacealias internal -serveraddress 127.0.0.1
    set-dnsclienserveraddress -interfacealias externalnat -serveraddress 127.0.0.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  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  11. Bug? Invoke-RestMethod returns mis-cased json values for Boolean

    Perhaps a bug in Powershell using Invoke-RestMethod. When querying a particular API endpoint, the json data is expected to return a true/false value.

    When querying with Powershell Invoke-RestMethod, the value comes back as "True" or "False" (Capital first letter).

    When querying the same endpoint with curl, the value comes back as "true" or "false" (all lowercase).

    Not a huge issue, but the is confusing when trying to use a GET to determine the proper formatting for a future POST related to the value. The API endpoint is case-sensitive and doesn't like "True" when expecting "true".

    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. Bug: powershell ISE theme, Set the color for control panel/Text Background is useless

    Set the color for control panel/Text Background is useless, whatever you set, it stil the default color(Red:1,Green:36, Blue:86).

    there are 3 items regarding the ConsolePane and 2 items regarding the ScriptPane for editing theme. I am not sure "ConsolePaneTextBackgroundColor" is needed as "ConsolePaneBackgroundColor" is existed.

    My understanding is when we edit color for ConsolePane, we need to make sure "ConsolePaneBackgroundColor" and "ConsolePaneTextBackgroundColor" the same, in order to aligned, but it is work for other color. only the default color(Red:1,Green:36, Blue:86) works.

    <string>ConsolePaneBackgroundColor</string>
    <string>ConsolePaneForegroundColor</string>
    <string>ConsolePaneTextBackgroundColor</string>

    <string>ScriptPaneBackgroundColor</string>
    <string>ScriptPaneForegroundColor</string>

    please find my version information below.

    PS C:\WINDOWS\system32> $PSVersionTable

    Name Value
    ---- -----
    PSVersion…

    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 →
  13. We need: Get-VpnConnectionRoute

    How do we list routes added with Add-VpnConnectionRoute?
    We need a Get-VpnConnectionRoute!

    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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  14. FeatureRequest: Have New-PSdrive store credentials in Credential Manager when Persist and Credential options used

    Currently there is no built in or easy way to have credentials stored to map persistent Drives via a script.

    If you are mapping a drive for the same domain that the system is on then it will pass-through the current user's credentials, and it will save alternate credentials for the mapping in the current user session. However if you are trying to map a persistent drive for a share from a different non-federated domain, a workgroup computer, or for something on the same domain using different credentials, the password is not saved through logouts or reboots. Not only is…

    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 →
  15. Bug:New-PSDrive altering stored username in registry persistence entry when using credential object from different domain in UPN format

    # Steps to reproduce

    # Must use the format username@domain for username and be mapping share from different non-federated domain to reproduce
    $Cred = Get-Credential
    $Path = 'Path to the share'
    New-PSDrive -Name 'P' -PSProvider FileSystem -Root $Path -Persist -Credential $Cred -Scope Global

    # Expected behavior

    The $Cred.username value gets stored in the registry under HKEY_CURRENT_USER\Network\P
    in the UserName string value without alteration.

    # Actual behavior

    The domain of the system running the commands gets appended in the front of the username from the cred object when stored in the reg key.

    For example if $Cred.Username is 'username@Domain1.com'…

    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. PowerShell DISM cmdlet GitHub Repository

    Does DISM cmdlets have a GitHub repository so I can add and extend WinPE-DismCmdlets-Package?

    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 →
  17. "The script failed due to call depth overflow" in non-recursive function

    I have a filter in a script module that a does a little error formatting and flags the fact that it's seen an error. Most of the time, it seems to do its little job just fine. About once a week a sharing violation triggers some kind of infinite recursion and PowerShell emits the depth overflow error. The odd thing is that the function is not recursive. I've run procmon and I can see that the sharing violation happens just once - most of what happens after than is PowerShell writing to a pstrace log (I've wrapped the offending section…

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  18. 'Get-Help about_Functions_Advanced_Parameters' documentation is incorrect

    The information that's shown on 'Get-Help about_Functions_Advanced_Parameters' under 'ValidatePattern' is incorrect. It tells us that the "[0-9][0-9][0-9][0-9]" pattern means the parameter value must be a four-digit number, but it should say the parameter value must INCLUDE a four-digit number, as the pattern isn't starting with '^' and ending with '$'.

    So, for example, '12345 -match "[0-9][0-9][0-9][0-9]"' is true, but '12345' obviously isn't a four-digit but a five-digit number.

    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 →
  19. 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

    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 →
  20. Windows PowerShell 5.1 code base (Win32/x64) suppository with changes, improvements, bug-fixes, NEW-Cmdlets, etc... merged back into itself?

    A Git(hub) place for Windows PowerShell 5.1 code base (Win32/x64) suppository with changes, improvements, bug-fixes, NEW-Cmdlets, etc... merged back into itself.

    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