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

    17 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. 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

    2 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  3. Start-Sleep seconds cpu usage

    The following causes sleep to not sleep at all

    Start-Sleep -Seconds 0.5

    Seems anything < 1.0 is considered to be zero

    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 →
  4. 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 →
  5. 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 →
  6. Invoke-History with Get-Content -wait does not produce any output

    Use Get-Content -wait to follow a file as it is being written (such as a log file)

    Terminate the execution with ctrl-c.

    Execute Invoke-History to execute the previous command again.

    No output is displayed, neither existing file content nor new content.

    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 →
  7. Jupyter notebook kernel

    A Microsoft generated and supported kernel for the Jupyter Notebook/Lab users. There is one a fellow did up and it covers the basics but doesn't have auto-completion in the IDE, errors on some things, doesn't get updated much, etc.

    I use Jupyter to teach and getting a full on Microsoft supported kernel would be great.

    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. AzureAD cmdlets vs MSOL cmdlets

    I am finding that the AzureAD cmdlets do not show me the same list of attributes for a user as the MSOL cmdlets you are deprecating. For example; our sharepoint people need to see the PreferredDataLocation value for content controls, this was available in MSOL and not easily in AzureAD. (I have included 2 user exports to show you what I mean) How do I make the AzureAD cmdlets do what MSOL does?

    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 →
  9. Clear-Disk is failing without error.

    Clear-Disk is not un-initialising a disk, I go to run the initialize-disk command immediately after and get the error that the disk is already initialized. How do I solve this?

    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 →
  10. How do you upgrade powershell 5.0 to 5.1 on Windows 10 LTSB 10240. I cannot see how to do this?

    How do you upgrade powershell 5.0 to 5.1 on Windows 10 LTSB 10240. I cannot see a 5.1 version because all the articles say that Windows 10 already comes with 5.1 but not in LTSB version 10240?
    Thank you

    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. Outlook Itemadd

    calendar = ns.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderCalendar);

    appointments = calendar.Items;

            appointments.ItemAdd += new Microsoft.Office.Interop.Outlook.ItemsEvents_ItemAddEventHandler(appointments_ItemAdd);
    

    I can use the C# source code to add ItemAdd event, how to do the same thing in powershell?

    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 →
  12. Start-Transcript causes skipped records when passing SqlDataReader object to another function

    Encountering an issue with Start-Transcript, SQLDataReader and Passing it to a function for processing. This occurs in Powershell 6, started in 5.1, was not present in Windows Powershell 3 (Windows Powershell 4 has issues passing the SqlDataReader object to a function anyway).

    When you call a function within a Start-Transcript block, and that function then fills a SqlDataReader object, and then passes it onto another function, it increments the record a number of times, as if calling the read() method 7 or 8 times. This causes a number of issues, firstly, a lot of data is skipped for processing, secondly,…

    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 →
  13. "Open PowerShell window here" broken if file path contains a single quote

    If the current directory, or any of its parent directories, contains a single quote in its name, doing "Open PowerShell window here" in it results in the following:

    The string is missing the terminator: '.

    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    
    + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString

    PS C:\WINDOWS\system32>

    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 →
  14. We need: Get-VpnConnectionRoute

    How do we list routes added with Add-VpnConnectionRoute?
    We need a Get-VpnConnectionRoute!

    6 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 →
  15. BUG: Powershell .net class loads slow since MS-Security Update April 2019

    Since May 2019 Security Rollup for Windows Server 2016, access to .net object via powershell is very slow, when a powershell variable breakpoint is set in the powershell.

    For example loading speed of [System.Environment] takes over ten times with breakpoint set against no breakpoint set.

    Since the behavior only occurs with latest security updates installed (May 2019 (KB4494440) or June 2019 (KB4503267)) i think it is related to the update.

    Did some troubleshooting with procmon until now. For me it looks like when PSBreakpoint is set, there are multiple reads from HKLM\System\CurrentControlSet\Control\Session Manager\Environment__PSLockdownPolicy can't repoduce this when there is no…

    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 →
  16. Brackets Treated As Special Characters In Single Quotes

    Steps to reproduce

    In File Explorer on an NTFS volume, create the file: [abc].txt

    Following this run:

    PS> ls '[abc].txt'

    Expected behavior

    Directory: C:\Users\Dave
    

    Mode LastWriteTime Length Name


    -a---- 2019-05-06 12:07 AM 0 [abc].txt

    Actual behavior

    No output displayed.

    Environment data

    Name Value


    PSVersion 5.1.17763.316
    PSEdition Desktop
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
    BuildVersion 10.0.17763.316
    CLRVersion 4.0.30319.42000
    WSManStackVersion 3.0
    PSRemotingProtocolVersion 2.3
    SerializationVersion 1.1.0.1

    Additional Cases and Information

    The file name can be displayed using tab completion, but the brackets are preceded by back ticks, which indicates that Windows can see the file and assumes that the brackets are special characters. When…

    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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  17. Windows Insider Build 18945 - Windows PowerShell is looking in One Drive for the PowerShell Profile

    I don't know why Windows PowerShell is looking for the PowerShell Profile.ps1 file in the Users OneDrive folder.

    This is not normal behavior!

    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 →
  18. PowerShell tabs

    Having the ability to open new PowerShell windows in tabs would be very useful.

    3 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 →
  19. Set-ADAccountPassword -WhatIf parameter does not work.

    WhatIf is apparently ignored on the Set-ADAccountPassword cmdlet. This bit me really good ********** yesterday and today. It's a big problem when we can't depend on WhatIf working.

    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 →
  20. Hi - I'm having trouble with the Wait-Job cmdlet on PowerShell Core for Linux. I have a Job created with Start-Job, which I wait for with:

    I'm having trouble with the Wait-Job cmdlet on PowerShell Core for Linux. I have a Job created with Start-Job, which I wait for with:

    Wait-Job $job -Timeout 30

    Which should timeout after 30-seconds. However, the command consistently hangs for 2-minutes before it completes. Am I doing something wrong, and if not, could this bug be fixed? I'm running PowerShell 6.2.0 on Ubuntu 16.04.6 LTS.

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

Feedback and Knowledge Base