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. 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 →
  2. 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 →
  3. 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 →
  4. 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 →
  5. 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 →
  6. 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 →
  7. 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 →
  8. 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 →
  9. Get-Date -UFormat %W incorrect

    >get-date

    Dienstag, 2. Juni 2020

    // So Tuesday, 2nd of June 2020 and should be Cal. week 23

    >get-date -uformat %W
    22

    Am I missing something? this doesn't seem right

    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. 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 →
  11. The Set-DNSServerResourceRecord command will not change the "PrimaryServer" field even though it looks like all commands execute just fine.

    The Set-DNSServerResourceRecord command will not change the "PrimaryServer" field even though it looks like all commands execute just fine.

    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. mumudahkan perbaikan pada komputer

    karena langsung runing sendiri dan langsung jadi

    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. saya sangat terbantu dengan adanya halaman ini

    ini sangat praktis dan mudan untuk dimengerti TY

    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. 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 →
  15. Bug: Format-Hex Does not display single zero byte

    Format-Hex does not display output with a source of a single zero byte or byte array with a single zero byte:

    Repro:

    [byte]$byte = 0
    $byte | Format-Hex # no value displayed
    [byte[]]$bytes = 0
    $bytes | Format-Hex # no value displayed

    [byte]$byte = 1
    $byte | Format-Hex # correct 01 value displayed
    [byte[]]$bytes = 1
    $bytes | Format-Hex # correct 01 value displayed

    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. Test-ModuleManifest returns incorrect Tags when run multiple times

    If you run the Test-ModuleManifest cmdlet more than once against the same manifest the "Tags" property returns different results each time.

    For example, I have a module that contains the following tags in the psd1 file:

    Tags = "tag1","tag2"

    You can see below that if run the Test-ModuleManifest more than once it returns more copies of the tags each time it's executed:

    $m = Test-ModuleManifest .\tagtest.psd1
    $m.tags
    tag1
    tag2
    tag1
    tag2

    $m = Test-ModuleManifest .\tagtest.psd1
    $m.tags
    tag1
    tag2
    tag1
    tag2
    tag1
    tag2

    $m = Test-ModuleManifest .\tagtest.psd1
    $m.tags
    tag1
    tag2
    tag1
    tag2
    tag1
    tag2
    tag1
    tag2

    $m = $null
    $m =…

    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. Connect-MicrosoftTeams from Microsoft Teams PowerShell does not work on Azure Automation

    I am attempting to connect to Microsoft Teams using Azure Automation. I am using the following code in Azure Automation PowerShell Runbook.

    ```

    Get the credential from Automation

    $credential = Get-AutomationPSCredential -Name 'O365'

    $userName = $credential.UserName

    $securePassword = $credential.Password

    $psCredential = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList $userName, $securePassword

    Connect to Microsoft Teams

    Connect-MicrosoftTeams -Credential $psCredential
    ```

    I receive the following error:

    ```
    Connect-MicrosoftTeams : One or more errors occurred.: Object reference not set to an instance of an object.
    At line:9 char:1
    + Connect-MicrosoftTeams -Credential $psCredential
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : AuthenticationError: (:) [Connect-MicrosoftTeams], AadAuthenticationFailedException
    
    + FullyQualifiedErrorId : Connect-MicrosoftTeams,Microsoft.Open.Teams.CommonLibrary.ConnectMicrosoftTeams

    Connect-MicrosoftTeams :…

    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. Get-NetFirewallRule does not show ports or IPs

    There is no obvious way to dump the CURRENT rule used by the firewall that includes the port(s) and IP(s) assigned to it.

    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. get-hotfix

    Get-Hotfix doesn't display all installed hotfixes on a computer (verified in Server 2012r2, Server 2016, Server 2019 and Windows 10 v1909).

    It feels like (unverified) that it is pulling this info from WMI, because similar wmi queries also miss the same updates (wmic qfe list).

    I've found that running this code, actually gives the list of all installed updates:

    $Session = New-Object -ComObject "Microsoft.Update.Session"
    $Searcher = $Session.CreateUpdateSearcher()
    $Searcher.QueryHistory(0, $Searcher.GetTotalHistoryCount())

    Request Get-Hotfix be updated to pull in this missing info and output it in a friendly way much like it does already.

    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. Why I have to create a path if not present using Move-Item

    Why we need to create a path prior to moving a file from one location to other, if the destination doesn't have the relative path created using Move-item in powershell scripting.

    For e.g. I have a source path as "E:\abc\0000\xyz.txt" and destination where it should be copied has a folder "D:\vfd". Now with Move Item I need to copy the xyz.txt using relative path as

    Move-Item "E:\abc\0000\xyz.txt" -Destination "D:\vfd\0000\xyz.txt"

    Now the above command will error since Destination doesn't have the 0000 directory.

    In Unix if destination path is not present then it creates the required path and move the item.…

    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