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. New-ScheduledTaskAction adds wrong characters to Arguments

    Forgive me if this has been posted previously but I cannot locate a ticket for it. When using New-ScheduledTaskAction in PowerShell, 5.1.19041.1, to create an action to call a PowerShell script there are incorrect characters being added to the arguments.

    For example, please consider the following script

    $action = New-ScheduledTaskAction -Execute "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" –Argument "-ExecutionPolicy Bypass -File `"C:\PathToScript\Script.ps1`""

    When added to a scheduled task this action will not execute, further inspection revealed that under ANSI encoding the final "is actually being sent over as the special aE symbol. And if you try to wrap everything in single quotes and concatenate…

    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 →
  2. Failed to populate environments in settings

    EDIT: Our Win 2016 server was recently patched with KB4569746 (.NET Framework 4.8 cumulative). Could that be the cause?

    Hi, we're getting the following error when trying to connect to Power BI Service using PBI modules MicrosoftPowerBIMgmt:

    PS C:\Users\CONAMZ> Login-PowerBI
    Login-PowerBI : Failed to populate environments in settings
    At line:1 char:1
    + Login-PowerBI
    + ~~~~~~~~~~~~~

    + CategoryInfo          : WriteError: (Microsoft.Power...IServiceAccount:ConnectPowerBIServiceAccount) [Connect-PowerBIServiceAccount], Exception
    
    + FullyQualifiedErrorId : Failed to populate environments in settings,Microsoft.PowerBI.Commands.Profile.ConnectPowerBIServiceAccount

    We also tried connecting via Get-Credential and using registered App credentials. The Powershell script has been working for months.

    Here are the things we've tried but to no avail: …

    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 →
  3. New Parameter on Format-List to exclude null/empty properties

    Format-List (and perhaps Format-Table) should have a parameter to exclude null/empty properties. This would allow finding relevant data more quickly.

    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 →
  4. Get-ADUser should be able to use UserPrincipalName for the Identity field

    Currently the Get-ADUser cmdlet does not support the usage of User Principal Names to identify user accounts. This is less than optimal when you need to correlate UPNs sourced from one data source, like an Intune-generated CSV, to the respective user accounts. It would be really nice to get that rather basic functionality added.

    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 →
  5. Bug: HTTP Content-Type of 'application/json' is not handled as UTF-8 by default

    Microsoft.PowerShell.Utility has Invoke-WebRequest cmdlet (and Invoke-RestMethod among potentially others) which allow JSON to be requested from a remote server.

    If the remote server provides a Content-Type header of 'application/json;charset=utf-8' then the WebResponseObject Content is properly parsed. However, if the Content-Type header only sets 'application/json' then ISO-8859-1 is assumed as the encoding by PowerShell 5.

    One can manually transform the response content such as:
    However such manual work is not helpful for Invoke-RestMethod cmdlet as the data has already been parsed into key-value mappings, and cannot be easily bulk-converted.

    RFC 8259 at https://tools.ietf.org/html/rfc8259#section-8.1 clearly says "JSON text exchanged between systems that…

    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 →
  6. Get- cmdlets - sort properties descending for an object

    Output of the properties for Get- cmdlets (example Get-Mailbox user1 | fl * ) should be automatically sorted (descending). It would be much easier to search the output for a specific properties if they would be sorted - especially if object does have many properties like Get-User ... :)
    Counts for all powershell modules (Exchange, SharePoint, AD, *) of course

    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 →
  7. Get-Disk is broken under batch logon

    Cmdlet Get-Disk fails under batch logon.


    1. Create a scheduled task to run powershell -Command "Get-Disk | Write-Output > 'c:\users\<username>\yo.txt'". Check the box to enable running when the user is not logged in. (You’ll need the Local Security Policy priv allowing batch logon for your user.)


    2. Run the scheduled task directly from Scheduled Tasks. Open output file, observe success.


    3. Delete output file, run the scheduled task on a trigger. Open output file, observe failure.


    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. AzureAD - Cannot properly read System.Byte[] value even when loading the module using "-UseWindowsPowerShell".

    AzureAD - Cannot properly read System.Byte[] value even when loading the module using "-UseWindowsPowerShell".

    Whenever I troubleshoot Conditional Access issues, I use to retrieve the certificate hash of AzureADDevice. Long story short, I retrieve "AlternativeSecurityIds.Key" property of AzureADDevice.

    Get-AzureADDevice -SearchString XXXX| fl displayname,deviceid,objectid,@{n='DevCerHash';e={ [System.Text.Encoding]::Unicode.GetString($_.AlternativeSecurityIds.key).substring(21,40) }}

    I know that PS7 isn't compatible with AzureAD module, and for this reason I use "-UseWindowsPowerShell" flag to load the module. Unfortunately, in PS5 the byte array is properly read, while in PS7 (-UseWindowsPowerShell) an object of wrong type is returned.

    Get-AzureADDevice -SearchString XXXX| select AlternativeSecurityIds |gm

    The above command returns "TypeName: Selected.Microsoft.Open.AzureAD.Model.Device" in PS5…

    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 →
  9. Add support for LiteralPath to Get-DfsrFileHash cmdlet

    The Get-DfsrFileHash cmdlet would be a lot more versatile if it included support for the LiteralPath argument as other cmdlets like Get-FileHash and Get-ChildItem do. Without support for the argument the cmdlet currently generates an error when file paths containing special characters (such as []) are passed via the pipeline into the cmdlet. This makes obtaining DFS-R file hashes for files in bulk very difficult.

    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. Need Teams PS cmdlet to create bulk or multiple teams

    Current New-team does not work as expected in for each loop ps script. need new bulk create cmdlet

    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 →
  11. Dismount-VHD regression for vhds in shared folders

    Bug - Regression in Dismount-VHD
    (This is behavior that worked at some point in the last several months.)

    To reproduce:
    1) Mount a .vhdx file stored on a network share that requires domain credentials.

    mount-vhd "\\server\path\to\my.vhdx" -NoDriveLetter

    2) Open a Powershell session as a user that does not have domain credentials (such as System, or a local admin account).

    3) In the non-domain Powershell session, Dismount the VHD by disk number:

    Dismount-VHD -DiskNumber 2

    Observe that the command reports error:
    "Dismount-VHD: Windows cannot find a mounted virtual hard disk with the specified disk number."

    Note: This command does still succeed…

    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 →
  12. 注册表添加codepage无法更改快捷方式指向的Microsoft powershell的活动代码页

    注册表的HKEYcurrentUser\console\systemroot_windowspowershell里面添加codepage:DWORD32=0x0000fde9

    无法更改活动代码页为UTF8

    powershell7也不行

    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 →
  13. test-netconnection using a txt file

    Please add supoort to test-necconection use content file in -computername, linke invoke-command

    Test-NetConnection -CommonTCPPort SMB -ComputerName (Get-Content C:\tem\Pings.txt)

    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 →
  14. Get-ScheduledTask adds a '\' before the task name

    Get-ScheduledTask adds a '' before the task name when running in a script.

    (Get-ScheduledTask -TaskName 'ResumeAtLogon').TaskName

    Returns '\ResumeAtLogon' instead of 'ResumeAtLogon'

    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 →
  15. Add ManagePermissions to PrintManagement

    Please add a ManagePermission feature to the print management ps module. I think it would come in handy and we would no longer have to rely on custom scrips from Technet script library (seeing as this is a pretty basic functionality)

    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. SetSpn misspelling

    Under the help section of setspn; Specified is incorrectly spelled.

    "-T = perform query on the speicified domain or forest (when
    Usage: setspn -T domain (switches and other parameters)"

    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. Move PowerShell directory out of the Documents folder on Windows

    Being on the Documents folder, PowerShell directory is automatically synced. This uses space from my OneDrive folder, on personal machines, and causes sync to fail, on business machine, because OneDrive Business is scanned and company policy denies executables in there. PowerShell files are not documents and shouldnt be there to start with.

    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. Add support for -Contains and -iContains in Where-Object

    When using Where-Object, it would be convenient if we could simply use the -Contains or -iContains to see if a property contains a value.
    For example:

    Get-Process | Where-Object ProcessName -iContains "phone"

    where the 'i' prefix indicates case insensitivity.

    The current method to do the same thing is more verbose:

    Get-Process | Where-Object {$_.ProcessName -ilike "phone"}

    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 →
  19. PowerShell command to run command inside an RDP session of a user an a terminal server

    PowerShell command to run commands inside an RDP session of a user logged on a a RDS server

    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. Get-DnsServerResourceRecord returns duplicate records when a subzone name matches the parent zone name.

    BUG: Get-DnsServerResourceRecord returns incorrect objects with the FQDN name in the hostname field if the parent zone contains a subzone with the same name.

    Reproduction:

    Setup:
    Create a DNS zone:

     testzone.fake.domain.zzz
    

    Create a sub zone:

     testzone.fake.domain.zzz 
    
    (subzone fqdn: testzone.fake.domain.zzz.testzone.fake.domain.zzz)

    Create an A record:

     Zone Name: 
    
    testzone.fake.domain.zzz (the parent zone)
    Record Name:
    testrecord
    Data:
    10.1.2.3

    Create an A record:

     Zone Name: 
    
    testzone.fake.domain.zzz.testzone.fake.domain.zzz (the subzone)
    Record Name:
    testrecord
    Data:
    10.3.2.1

    Test:
    Get-DnsServerResourceRecord will return these records:
    Item# HostName______________________________________________________ RecordData RecordType

    1 testrecord                                                     10.1.2.3   A
    
    2 <various> <various> <various>
    3 testzone.fake.domain.zzz 10.1.2.3 A
    4 testrecord.testzone.fake.domain.zzz.testzone.fake.domain.zzz 10.3.2.1 A
    5 <various>.testzone.fake.domain.zzz <various> <various>

    Item 1…

    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 →
← Previous 1 3 4 5 14 15
  • Don't see your idea?

Feedback and Knowledge Base