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 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 →
  2. 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 →
  3. 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: …

    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. 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 →
  5. 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 →
  6. 注册表添加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 →
  7. 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 →
  8. 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 →
  9. 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 →
  10. 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 →
  11. 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 →
  12. 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 →
  13. 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 →
  14. 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 →
  15. New-ScheduledTaskTrigger missing option to NOT 'Synchronize across time zones'

    New-ScheduledTaskTrigger missing option to NOT 'Synchronize across time zones'

    The default is to always set it. This should not be an implied default as it creates problem with Daylight Saving etc.

    To remove must do as follows which should not be needed:

    $str = Get-ScheduledTask -TaskName TESTTASK

    $NewTriggers = @()
    foreach($trigger in $str.Triggers)
    {

    if($trigger.StartBoundary -match '\+01:00$')
    
    {
    $Trigger.StartBoundary = $Trigger.StartBoundary.Substring(0,$Trigger.StartBoundary.Length-6)
    }
    $NewTriggers += $trigger

    }

    $str.Triggers = $NewTriggers
    Set-ScheduledTask -InputObject $str

    Please add switch to disable either through New-ScheduledTaskTrigger or via Set-ScheduledTask

    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 →
  16. Get-ADGroupMember -Recurse should use LDAP_MATCHING_RULE_IN_CHAIN for speed

    Get-ADGroupMember -Recurse should use LDAPMATCHINGRULEINCHAIN for speed. Currently it's much slower than an equivalent LDAP query.

    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. ConvertFrom-Json does not respect -ErrorAction parameter

    The following code should not result in the following error message:

    $value = ($exception.Message | ConvertFrom-Json -ErrorAction Ignore)

    Line |
    25 | … = ($exception.Message | ConvertFrom-Json -ErrorAction Ignore) …
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    | Conversion from JSON failed with error: Additional text
    | encountered after finished reading JSON content: C. Path '',
    | line 2, position 0.

    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. New-AzAutomationConnection Cmdlet incorrectly states that -ResourceGroupName parameter value exeeds length of 90.

    There appears to be a bug when using this Cmdlet, where the -ResourceGroupName parameter incorrectly states that the parameter value for the resource group exceeds a length of 90 when a variable is used, i.e. $rgName (string length is actually 19 <CZEU2-APP-NP-RGP-01>. When the hard coded value of: "CZEU2-APP-NP-RGP-01" is used however, the Cmdlet works as designed.

    13 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 →
  19. JOIN-PATH should handle several child elements

    (JOIN-PATH A B C) fails: PositionalParameterNotFound
    It should return A\B\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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  20. Add -ComputerName parameter to Start-Service cmdlet

    Currently to start a service on a remote computer, one needs to call Get-Service with its hostname as the -Computername argument and pipe it to Start-Service.

    If manipulating services on remote machines is possible, why can't it be done with a single 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 →
← Previous 1 3 4 5 14 15
  • Don't see your idea?

Feedback and Knowledge Base