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. "Using module" statement does not reload module after changes are made

    Problem Description
    ------------------
    If you are using the `using module` statement, it will load the module without any issues. However, if you make a change to the module and run the `using module` statement again without restarting your PowerShell session, it will not load the new modified module into memory, and instead will continue to use the old existing module that was loaded. This makes doing development with `using module` statements very tedious as you must continually reload your PowerShell session whenever you make changes to the module.

    Ideally we would just use `Import-Module -Name [module name] -Force` to avoid…

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

    We’ll send you updates on this idea

    3 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  2. 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 →
  3. Scheduledtask commands should support whatif

    The -ScheduledTask commands that modify state should support the WhatIf parameter. They don't appear to currently as of Server 2016.

    Specifying -WhatIf to Disable-ScheduledTask says the parameter is unknown.

    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-MpPreference is failing for "Provider load failure"

    On some of our servers, when using cmdlet "Add-MpPreference", we got error of "Provider load failure", after some investigation, we found following issues for WMI to create files? Did anyone experience similar issues before?

    wmiprvse.exe 7488 CreateFile C:\Windows\System32\wbem\NCObjAPI.DLL NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    wmiprvse.exe 7488 CreateFile C:\Windows\System32\wbem\wbemcomn.dll NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    wmiprvse.exe 7488 CreateFile C:\Windows\System32\wbem\wbemcomn.dll NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse…

    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  ·  WMI  ·  Flag idea as inappropriate…  ·  Admin →
  5. How to get the future pwd from a profile script?

    I was pointed to this forum due to
    https://github.com/PowerShell/PowerShell/issues/10568

    I want to start a PS shell from the explorer context menu on different folders.
    At PS startup a tool should be configured with the actual folder path.
    I have tried a init / profile script for this purpose, but the pwd of the script is not the folder path: I get C:\WINDOWS\System32.
    I have also checked variables but non of the available values is set to the (future) folder path.
    How can I get the folder path in this case?
    After the shell is started the correct folder path is…

    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 →
  6. Powershell Pipe is not respecting the AllParameterSets value

    .

    Repro: using the following script:
    function Test
    {
    [CmdletBinding()]

    Param(
    [string]$name,

    [Parameter(Mandatory = $True, ParameterSetName = "Set1")]
    [Parameter(Mandatory = $True, ParameterSetName = "Set2")]
    [string] $P1,

    [Parameter(Mandatory = $True, ParameterSetName = "Set2")]
    [string] $P2

    )

    Write-Output ($name + " - " + $PsCmdlet.ParameterSetName)
    }

    #The following Fails! e.g. Powershell doesn't resolve to ParameterSet "Set1"
    'aaa' | Test -P1 x

    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 →
  7. 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 →
  8. profile.ps1 doesnt load when Windows Powershell 2.0 engine was disabled.

    We have been using automation script for our deployment. We are using the latest version of System.Management.Automation.

    System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

    We have few modules referred in profile.ps1 which automatically loads when we execute the ps1 files. This works fine if we have enabled Windows Powershell 2.0 engine.

    If we disable Windows Powershell 2.0 Engine this doesnt load the profile.ps1 in $pshome and scripts throws functions not found error.

    This seems to be weird behavior as all our scripts still works with Powershell 5.1

    Would need your attention to help fixing this or provide a solution to fix this.

    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 →
  9. Honour -Confirm and -WhatIf on Remove-PrintJob Cmdlet

    -Confirm & -WhatIf Optional Parameters not honoured on Remove-PrintJob even though they are included in documentation.

    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 →
  10. Pressing spacebar while holding shift should still insert a space

    Pressing spacebar while holding shift should still insert a space.

    When I am typing into the PowerShell prompt, if I happen to be holding down the shift key when I hit the spacebar, nothing happens. I would like for a space to be inserted when I hit the spacebar, regardless of whether I am holding the shift key or not. (The classic Command Prompt does this correctly.)

    For reference, I'm using Win10 1809 and:

    PS C:\> $PSVersionTable

    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

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  11. 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 →
  12. BUG: Dsc Engine Merge configuration doesn't compare Table String type as expected

    When you run Start-DscConfiguration to apply a new configuration, LCM merge all the configuration settings who belong to the same node name. Like the file below. When sacfg (alias) run, then the ValueData of the two resource are compared by the merge processus. Then the merge fail because ValueData is declared as String[] (table) type into the RegistryResource .mof file.
    Below you can find the configuration file to create the issue.
    Another behavior:
    If you specify a string array with several value then PowerShell "PSDesiredStateConfiguration.psm1" throw an error at the execution instead of the LCM. The compared values are always…

    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  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  13. Import-json

    json is becoming the new standard (if not already)
    It would be nice to have an import-json and a export-json as we have in xml/csv instead of the two steps process with get-content and convertfrom-json and convertto-json.

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  14. 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 →
  15. 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 →
  16. "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 →
  17. ConvertFrom-String

    Make ConvertFrom-String available in PowerShell core as it's super useful when parsing txt files.

    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 →
  18. New request -- get-winevent :get all log generated by a specific user

    If I try to find when the user abc.cd logon to my computer.
    I will do a log query as follow.
    Get-WinEvent -FilterHashtable @{logname='security';data='abc.cd';id=4624}

    If I want to know when a software was install on computer.
    I will do a log query as follow.
    Get-WinEvent -FilterHashtable @{logname='application';id=11707}

    but It does not work with a user ID as follow.
    Get-WinEvent -FilterHashtable @{logname='application';id=11707;data='abc.cd'}

    What I do I want is collectting all logs that caused by the user abc.cd by using get-winevent , like he installs a new software , he starts a service ,he starts a scheduled task ..

    expected cmdlet:
    Get-WinEvent…

    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 →
  19. Allow use of curly braces for special cases

    Such as git stash apply stash@{2} instead of need for inside quotes "" "stash@{2}"

    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. Creating a symbolic link requires administrator privilege

    Since some version of Windows 10, creating a symbolic link should not require administrator privilege. In cmd, using mklink to create a symbolic link without administrator privilege works, but New-Item in PowerShell doesn't work.

    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 →
  • Don't see your idea?

Feedback and Knowledge Base