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. How do I create an Azure Automation schedule with PowerShell using the Az Cmdlet New-AzAutomationSchedule?

    When I attempt to run the Cmdlet below with the following parameters, it fails:

    $AutomationAccountName = "CZEU1-INF-NP-0faa84be-AAA-01"

    $ResourceGroupName = "czeu2-app-np-rgp-01"

    $vmStartTime = (Get-Date "08:00:00").AddDays(1)

    $vmStopTime = (Get-Date "18:00:00")

    $timeZone = [TimeZoneInfo]::Local.DisplayName

    $vmStartupScheduleName = "Startup VMs 08:00 Daily Weekdays:

    $timeZone"

    $vmShutdownScheduleName = "Shutdown VMs 18:00 Daily

    Weekdays: $timeZone"

    [System.DayOfWeek[]]$WeekDays = @([System.DayOfWeek]::Monday..[System.DayOfWeek]::Friday)

    New-AzAutomationSchedule -AutomationAccountName $AutomationAccountName -Name $vmStartupScheduleName -StartTime $vmStartTime -WeekInterval 1 -DaysOfWeek $WeekDays -ResourceGroupName $ResourceGroupName -Verbose

    The error is: New-AzAutomationSchedule : Exception of type 'Microsoft.Azure.Management.Automation.Models.ErrorResponseException' was thrown. At line:1 char:1 + New-AutomationSchedule -AutomationAccountName $AutomationAccountNam... + CategoryInfo : CloseError: (:) [New-AzAutomationSchedule], ErrorResponseException + FullyQualifiedErrorId : Microsoft.Azure.Commands.Automation.Cmdlet.NewAzureAutomationShedule

    15 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 →
  2. 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.

    10 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 →
  3. MinimumCompatibleVersion still causes "Cannot find module PSDesiredStateConfiguration_1.0 from the server"

    Although a very similar issue has been resolved in WMF5.1 we are encountering an issue when working with partial configurations.

    It seems that the MinimumCompatibleVersion for the complete configurations is taken from the "first" (alphabetical order) partial configuration. If this happens to be a 2.0.0 configuration then other partials which were 1.0.0 cannot load the PSDesiredStateConfiguration module.

    Please take a look at the reproduction in the attachment.
    We reproduced this on windows server 2012r2, 2016 and 2019 and it is causing a very blocking issue for us.

    Edit; since the attachments dont seem to work:

    if (-not $inputCredential)
    {
    $inputCredential…

    10 votes
    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 →
  4. "Get-ADGroupMember: An operations error occurred" with cross-forest members

    Any group that contains a user account that is cross-forest to the group object is hitting the non-descriptive error in the title when running Get-ADGroupMember. I can successfully run the command with on groups where all members are in the same forest as the group object.

    The current workaround is to use Get-ADGroup and expand the Members property and then make a subsequent Get-ADObject call for each member. This takes about 5x longer to run.

    7 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 →
  5. add tcpdump equivalent cmdlet in powershell

    I hope powershell have a cool module about the network tool ,make them work like tcpdump , netcat in linux.

    It's very very cool things , will make me fly in our daily task.

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

    We’ll send you updates on this idea

    5 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  6. Memory leaks while using powershell runspace in .NET

    I found a huge memory leak in project which appears after execution PS command. Here I create example that represent my problem in "TestCase" comment.

    After memory usage investigation I found that most of memory occupied by inner structures from System.Management.Automation. So I start to search the way to release resources and found that the same behavior can be reproduced in PS:
    Get-Module -ListAvailable | ForEach { Import-Module $_.Name }
    Get-Command -ListImported -CommandType Cmdlet,Alias

    I already have tried to initiated garbage collecting and to remove all new variables that appears after script execution. I even have tried to start new…

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  7. Smartcard support

    Add Smartcard support to Get-Credential in Powershell 7. Add a cmdlet for enumerating certificates on a smartcard

    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. [BUG] Get-LocalGroupMember and unresolved SID throws error

    If there is an unresolved SID in a local group the cmdlet Get-LocalGroupMember (and maybe others) throws and error.

    Module: Microsoft.PowerShell.LocalAccounts

    Get-LocalGroupMember : Failed to compare two elements in the array.
    At line:1 char:1
    + Get-LocalGroupMember -Group 'RDS Endpoint Servers'
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Get-LocalGroupMember], InvalidOperationException
    + FullyQualifiedErrorId : An unspecified error occurred.,Microsoft.PowerShell.Commands.GetLocalGroupMemberCommand

    If the SID is removed, the cmdlet once again works as expected.

    3 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 →
  9. Jbzuzgsjaahvsjshhbbbsjkkkw

    موهتءحشنسةءهءتشكشءاءخنشخششخاءاءنءنءتءءخ

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  10. New-SMBShare -Temporary seems to do nothing

    New-SMBShare -Temporary should remove the share after a reboot but that's nothing happening

    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. Console applications with a file association start a new cmd window. This is unhelpful.

    I have a simple win32 console application (example.exe) which just printf's all its arguments. In the windows registry I've set up a file association so that the file extension ".myfile" invokes "example.exe %1".

    In a CMD window running .\example.exe file.myfile displays the output in the cmd window. (this is good)
    In a CMD window running .\file.myfile invokes example.exe and displays the output in the cmd window. (this is good)

    In a Powershell window running .\example.exe file.myfile displays the output in the powershell window. (this is good)
    In a powershell window running .\file.myfile opens a new cmd window, in which example.exe…

    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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  12. Start-Job on Windows Server 2016 hangs Powershell

    Start-Job seems to sometimes cause the calling thread to hang. If you create a loop in ISE and spin off a bunch of jobs, inevitably it will hang. This has only been tested using a ScriptBlock.

    As a workaround, you can use threads to do the heavy lifting and so if they fail to start the job, just recreate the thread.

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  13. get-localgroup does not have SID parameter

    Get-Localgroup does not have SID parameter when running x86 version.

    Version: 5.1.17763.771 (x86)
    Running "(Get-LocalGroup -SID 'S-1-5-32-544').Name" will return error about non matched param.

    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 →
  14. Get-VMProcessor doesn't show state of ExposeVirtualizationExtensions

    Set-VMProcessor -ExposeVirtualizationExtensions $true -VMName <VMNAME>

    Get-VMProcessor -VMName <VMNAME>

    This should show a column for ExposeVirtualizationExtensions but it doesn't

    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. DHCP Server Class - ASCII data is missing

    The output of the Get-DhcpServerv4Class cmdlet give me the information that I need, except for one AsciiData value. I don't know if that is something computed from the corresponding Data value.

    PS C:\temp> Get-DhcpServerv4Class -ComputerName $ComputerName -Type "Vendor" | Where-Object {$_.Description -notlike "Microsoft*"}

    Name Type Data AsciiData Description
    ---- ---- ---- --------- -----------
    Cisco Aironet 1200 Vendor 0x436973636f2041502063... Cisco AP c1200 Vendor Class Indentifi...
    airespace Vendor 0x4169726573706163652e... Airespace.AP1200 1010
    Airespace 2700 Vendor 0x436973636f2041502063... Cisco AP c2700 Cisco Aironet 2700 Series
    Mitel IP Phone Options Vendor 0x697070686f6e652e6d69... Mitel-specific options...
    PXEClient (BIOS) Vendor 0x505845436c69656e743a... PXEClient:Arch:00000 PXEClient (BIOS)
    PXEClient (UEFI x64) Vendor 0x505845436c69656e743a...…

    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 →
  16. ISE should not switch focus automatically to the console pane

    Starting from Windows 10 1803, when you run a selected block of code using F8, ISE switches focus to the console pane. This means that when you run several of these, you have to manually switch the focus back to the script pane after each execution.

    This is much more difficult than before, so please fix this.

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

    We’ll send you updates on this idea

    14 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  17. BUG: [System.Windows.Forms.SystemInformation]::PrimaryMonitorSize returns display size inconsistently between PS and PS ISE

    Reproducibility: always.

    1) Set display scaling not at 100%
    2) Start new PS and PS ISE sessions
    3) Run:
    Add-Type -AssemblyName System.Windows.Forms
    [System.Windows.Forms.SystemInformation]::PrimaryMonitorSize
    4) Notice difference when running in PS ISE to PS standard

    PS ISE takes no notice of display scaling and reports screen resolution. PS does take notice of display scaling and reports virtual screen resolution, e.g. 1920x1080 for a 3840x2160 screen with 200% scaling.

    [System.Windows.Forms.Screen]::PrimaryScreen behaves consistently.

    $PSVersionTable:
    PSVersion 5.1.18362.145
    PSEdition Desktop
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
    BuildVersion 10.0.18362.145
    CLRVersion 4.0.30319.42000
    WSManStackVersion 3.0
    PSRemotingProtocolVersion 2.3
    SerializationVersion 1.1.0.1

    Windows 10 Pro v1903 OS Build 18362.418

    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 →
  18. ANSI escape code problem with Read-Host

    When using an ANSI escape code as part of the Read-Host prompt within a script, it changes the default state.

    Note: to test, paste the script block into the console (not ISE)

    Compare:
    $esc = [char]27
    $bold = "$($esc)[1m" #sets text to bold
    $norm = "$($esc)[0m" #reset
    Read-host "Test Entry$($bold)test"
    write-host "test"
    write-host "$($norm)test"
    write-host "test"

    To:
    $esc = [char]27
    $bold = "$($esc)[1m"
    $norm = "$($esc)[0m"
    write-host "Test Entry$($bold)test"
    write-host "test"
    write-host "$($norm)test"
    write-host "test"

    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 →
  19. XXXUDPORACLEANORDIQUEBEASTARAPTORONTOCLOCKIRKLANDROSOPHITLEROMARSATUROVIRG0ALUDPOPEYELLEFTWINGAYARDLINEART©P/IP143&144MASMENDREDICCMELEDFER

    J'OFFRAMANOVOIDATAPIGUTAGRAISSEALIMENTORONTOCOLLORACLEFLAG0ADACHAUTEARTIGAYOURSELFERLANDOMARSAMPLEADERSSQLITORISHTARROWHADOWASPDEAUQIONCHINM

    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 →
  20. Bug: Powershell Get-Help does not work with Exchange Online cmdlets

    We've been lucky, from what I'm gathering from web searches! Until December last year, Exchange Online Powershell cmdlet help was available using Get-Help in the shell. However, after the Christmas break, the only response we get is:

    Get-Help : Exception calling "Invoke" with "0" argument(s): "Cannot find path '' because it does
    not exist."
    At line:1 char:1
    + Get-Help Get-Mailbox
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Get-Help], MethodInvocationException
    + FullyQualifiedErrorId : CmdletInvocationException

    It's the same issue irrespective of the cmdlet.

    Consequently, I'm forced to contend with painful searches of the documentation website for information of the relevant cmdlets.

    Raised…

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

    We’ll send you updates on this idea

    1 comment  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
← Previous 1 3 4 5 82 83
  • Don't see your idea?

Feedback and Knowledge Base