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. verify yeah all that stuff

    2 years I cramed tech school im locksmith security is security

    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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
  2. 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…

    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 →
  3. Explorer 'Pinned Items' on the taskbar opening in PowerShell 7 rather than explorer

    I have pinned folders to my task bar under Explorer.exe. Since installing PowerShell 7 these links open in PowerShell rather than explorer.

    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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  4. 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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
  5. 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

    20 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 →
  6. 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 →
  7. i need powershell to support the sed command

    i need powershell to support the sed command

    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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  8. why make installing PowerShell modules dependent on something ridiculous like Nuget which is impossible to install?

    Why make installing PowerShell modules dependent on something ridiculous like Nuget which is impossible to install? After 2 hours, I am still unable to install the reportingservices module, due to these dependencies. NOT ALL SYSTEMS ARE CONNECTED TO THE INTERNET!!!

    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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
  9. Powershell 5.1.17763.1007 on Windows 2019 stops with NativeCommandError on Azure Pipelines

    How to reproduce:

    With this Azure pipelines yaml snippets:

    The special character are all encoded. And when I attach a file I get 500 error. Please see https://gist.github.com/chenbojian/6fcb3a8c3bbe42cc2851a1eefe9f4324

    - job: win2019
    
    pool:
    vmImage: windows-2019
    steps:
    - powershell: |
    $PSVersionTable
    cmd /c 'echo this will crash powershell 1>&2'
    cmd /c 'echo this will crash powershell 1>&2'
    cmd /c 'echo this will crash powershell 1>&2'
    - job: win2016
    pool:
    vmImage: vs2017-win2016
    steps:
    - powershell: |
    $PSVersionTable
    cmd /c 'echo this will crash powershell 1>&2'
    cmd /c 'echo this will crash powershell 1>&2'
    cmd /c 'echo this will crash powershell 1>&2'

    The win2019…

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  10. get-aduser title

    I cant pull users Job title with AD-User command.

    -Properties * lists the title as an attribute but its returned empty even though all users have a job title assigned.

    Suspect this is a bug?

    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 →
  11. Typing with Shift is not working in non-English keyboard layout

    In PowerShell console in Windows 10 there is a serious problem that prevents entering capitalized letters (i.e. pressing Shift+Letter does nothing). This happens with most but not all letters and depends on the keyboard layout that was active when PowerShell console was started. If PowerShell console is started with English (US) keyboard layout, than typing in English works without problems (only Shift+Space not work, but I see another issue about it). After switching to Russian keyboard layout, most letters with Shift not work. Only ЦУШЩХЪФЫСТ can be typed. But when PowerShell console is started with Russian keyboard layout, it is…

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  12. Bug with EXO V2 reconnect

    There is a bug with the way Exchange Online V2 (ExchangeOnlineManagement 1.0.1) reconnects. If I have an On-Prem connection, it disconnects my On-Prem connection and makes a 2nd EXO, leaving the Broken EXO behind.

    The On-Prem uses prefix "OP" for its cmdlets. When EXO times out ("state: broken"), and if I try to run an on-prem command (Get-OPMailbox), EXO somehow gets involved and disconnects my (perfectly fine) on-prem connection, then makes a 2nd EXO instead of refreshing the one it had (see screenshot).

    We do use MFA. I'm going back to PSSession and basic auth for O365 for now.

    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 Gallery  ·  Flag idea as inappropriate…  ·  Admin →
  13. OpenSsl fails on the second command in PowerShell

    When trying to execute two openssl commands one by one, the second one fails. I've created a repro on Azure Pipelines demonstrating 4 different cases, by name they are

    1) win2019 fails running:
    openssh help
    openssh help

    on Azure Pipelines hosted pool. This has the specs listed here - https://github.com/actions/virtual-environments/blob/7c96951971ca872b4f02469a3f945af20f517d2b/images/win/Windows2019-Readme.md

    2) default succeeded running:
    openssh help
    openssh help

    on my local box

    3) fromCmd fails running the following from the command prompt:
    powershell -command "openssl help | openssl help"

    4) fromPowerShellToCmd succeeds running the following from PowerShell:
    cmd /c "openssl help && openssl help"

    So basically the only failures happen…

    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 →
  14. Make the verb 'Deploy' symmetrical by adding a new verb 'Undeploy'

    The verb Deploy was added, but strangely no verb Undeploy was added at the same time.

    In many operations the verb Undeploy is relevant, meaning to revert or undo the Deployment action.

    Other Verbs that are paired with a 'Un' version:
    - Block / Unblock
    - Install / Uninstall
    - Lock / Unlock
    - Protect / Unprotect
    - Publish / Unpublish
    - Register / Unregister

    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 →
  15. 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 →
  16. BUG: Get-ScheduledTask returns NULL for Value of MultipleInstances

    If in the settings tab of the scheduled task it is set to "Stop the existing instance", Get-ScheduledTask returns NULL for the value of MultipleInstances. The other three possible values return a string.

    To test:
    Edit the properties of an existing scheduled task, or create a new one. On the Settings tab, change "If the task is already running, then the following rule applies" to the value "Stop the existing instance".

    Execute in PowerShell:
    $task = Get-ScheduledTask -TaskPath '\' -TaskName 'your task name'
    $task.settings.MultipleInstances.GetType()

    Expected behavior:
    $task.settings.MultipleInstances should be a [string]

    Actual behavior:
    $task.settings.MultipleInstances is null

    Note that the value…

    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 →
  17. Powershell console regularly stucks when run from other console

    Issue:
    when I start new powershell process under different account from running powershell console (using start-process) consoles often freeze for several seconds/minutes. This doesn't happen if I start second console from START menu (using run as different user).

    I also noticed, that they somehow "synchronize" as can be seen on this video https://www.dropbox.com/s/9iq6bs9snxqlpba/PSstuckproblem.mp4?dl=0
    So when I start typing in first console, the second one (which is stucked at that moment) start typing chars, that are in queue or whatever...on its own

    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  ·  PowerShell Engine  ·  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. How to modify "Date" column in Windows Explorer

    In Windows Explorer there are two columns available: "Date modified" and "Date". I've tried both setting the .LastWriteTime and .CreationTime for files and it changes the date in the "Date Modified" column, but does not change the "Date" column.

    Is there a way to modify the "Date" column in Windows Explorer using Powershell scripting? I basically want to create a "touch" command that will affect BOTH "Date modified" and "Date" columns in Windows Explorer.

    Thanks!

    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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
← Previous 1 3 4 5 87 88
  • Don't see your idea?

Feedback and Knowledge Base