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. 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 →
  2. 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 →
  3. 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 →
  4. 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 →
  5. 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 →
  6. 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 →
  7. 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 →
  8. 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 →
  9. 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 →
  10. 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 →
  11. 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 →
  12. 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 →
  13. 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 →
  14. Get-Service -ComputerName not supported anymore?

    Get-Service used to support a ComputerName parameter so that I can connect to a remote server and get the services from there. Is it no longer supported in PS7? I saw a suggestion to run the script remotely on each server where you want to get the services from, which is highly impractical and slow too.

    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 →
  15. Can't configure NetNatStaticMapping ExternalIPAddress other than 0.0.0.0

    Trying to configure Static mapping using an ExternalIPAddress other than 0.0.0.0
    Get us this message:
    "Add-NetNatStaticMapping : The process cannot access the file because it is being used by another process."
    Even though the IP address and port is mapped in "NetNatExternalAddress".

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  16. 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 →
  17. 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 →
  18. 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 →
  19. DISM creates corrupt archive

    If two (or more) files are present with the exact same content, where file extension is irrelevant also content of file, as long as its the exactly the same; Dism will create a corrupted archive

    e.g.

    a.txt & b.txt

    Content of both files: 0x6c

    Shouldn't this be a case for the dedublication? Both files are separeted inside the wim (Both have only 1 link)

    https://sourceforge.net/p/sevenzip/discussion/45798/thread/db110477b8/

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

Feedback and Knowledge Base