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. Database SetOffline - Add a TeminationClause overload

    When setting a database offline, the T-SQL command executed is a simple ALTER DATABASE <DbName> SET OFFLINE, and will wait if there are running transactions or connected users. To force that, it requires the possibility to add the ROLLBACK IMMEDIATE. The Alter() method allows to do that but not the SetOffline() method

    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 →
  2. BUG: Set-AdfsGlobalAuthenticationPolicy

    Modifying Device Authentication causes multiple AzureMFAAuthentication providers to be added to additional auth providers.

    MS Case 119012219579532.

    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. How to create external trust relationships between two domains?

    How to create external trust relationships between two domains, such as aaa.com and bbb.com. I haven't seen a similar demo for two days.
    Looking forward to your reply.

    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 →
  4. New-SmbShare -Whatif not working

    New-SmbShare with -Whatif switch NOT working, it runs the command instead of showing the whatif massage

    Test with vscode insider

    Name Value


    PSVersion 5.1.17134.228
    PSEdition Desktop
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
    BuildVersion 10.0.17134.228
    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

    2 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  5. A replacement for New-WebServiceProxy for SOAP calls

    Add the ability to make SOAP calls which originally was done using New-WebServiceProxy.

    SOAP services are still common in both small companies and large enterprise where some products only have this method of integration. Many legacy systems both purchased and built in house use SOAP and will continue to for a significant time as the cost of upgrading is either too great, does not make commercial sense or simply impossible.

    I have only just started to look at PowerShell 6 and this is a complete road block for using it at this time. If there are alternative options without having…

    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 →
  6. BUG: Get-Help <word> doesn't search content of about_* files unless -Category HelpFiles parameter is specified

    The help text for the -Name parameter of Get-Help says:
    "...If you enter a word that does not match any help topic titles, Get-Help displays a list of topics that include that word in their contents."

    Example:
    PS> Get-Help exit

    Only returned two cmdlets that have the word 'exit' in their name.

    PS> Get-Help exit -Category HelpFile

    Returns about_* topics where the word 'exit' is found.

    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 →
  7. [Bug]: using module that import a script that import classes have unexpected behavior within a class

    ClassA.psm1

    class ClassA
    {

    [string]Execute()
    
    {
    return &quot;this is from ClassA&quot;
    }

    }

    ClassB.psm1

    class ClassB
    {

    [string]Execute()
    
    {
    return &quot;this is from ClassB&quot;
    }

    }

    ImportClasses.ps1

    using module 'D:\Exemple\Atelier\ClassImportProblem\ClassA.psm1'
    using module 'D:\Exemple\Atelier\ClassImportProblem\ClassB.psm1'

    process_Classes.ps1

    using module 'D:\Exemple\Atelier\ClassImportProblem\ImportClasses.ps1'

    $a = [ClassA]::new()
    $b = [ClassB]::new()

    class HustonweHaveAProblem
    {

    [void]HereWeGo(){
    
    $a = [ClassA]::new()
    $b = [ClassB]::new()
    }

    }

    Observation:

    From that point, instances of ClassA and ClassB are working fine in the process_Classes script. But instances of ClassA and ClassB within the class HustonWeHaveAProblem{} throw errors.

    Actual result:

    At D:\Exemple\Atelier\ClassImportProblem\process_Classes.ps1:9 char:15
    + $a = [ClassA]::new()
    + ~~~~~~
    Unable to find type [ClassA].

    At…

    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 →
  8. Get-DnsServerZone does not cater for secondary zones that allow zone transfers

    If you have a secondary zone which in turn is configured to allow a zone transfer to another DNS server hosting the zone as a secondary, the Get-DnsServerZone cmdlet does not display that information.

    Run: Get-DnsServerZone -Name zone.name | where-object {$_.zonetype -eq "secondary"} | select-object ZoneName, SecondaryServers
    Result: Display zone name and secondary servers.
    Actual Result: Displays just the zone name, no secondary servers are displayed even though they are setup.

    The data is however available via WMI.

    Get-WmiObject -Namespace root/microsoftdns -Class microsoftdnszone | where-object {$.containername -eq "zone.name"} | select-object containername, secondaryservers

    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. Register-ScheduledTask

    Register-ScheduledTask -password parameter should accept secure string or PScredential. Currently it accept plain text and the password shows up in event log when register

    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 →
  10. Set-mpioSetting -NewRetryInterval input validation is too strict

    When I run the following command in powershell
    (Windows Server 2012 R2, PS Version - 5.1.14409.1005)

    "Set-mpioSetting -NewRetryInterval 1 "
    returns the error
    "Set-MPIOSetting : Cannot validate argument on parameter 'NewRetryInterval'. The 1 argument is less than the minimum allowed range of 3. Supply an argument that is greater than or equal to 3 and then try the command again."

    The documentation at https://docs.microsoft.com/en-us/powershell/module/mpio/set-mpiosetting?view=win10-ps says that the default is 1 second, and we can use the GUI to be able to set the retry interval, but I want to be able to use powershell to automate the configuration of my…

    5 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. Powershell Windows defender bug

    I found a bug with windows defender cmdlets!
    Cmdlet:
    set-mppreference -scanscheduletime
    set-mppreference -scanschedulequickscantime

    Providing an argument in format HH:mm works for values from 00:00 to 16:59 works as expected and when running get-mppreference the scanscheduletime and scanschedulequickscantime fields show the time requested.

    Providing a time past 7pm (17:00) and then running get-mppreference shows the time in the format 2982615.22:16:00, which i believe means ~3 million days in the future.

    windows 10 enterprise build 171314
    windows server 2016 datacenter build 14393

    Please let me know if you would like any further details!

    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 →
  12. Which server member in a cluster holds the quorum disk (Active/Passive)

    Every month we have to go thru a list of servers sometimes as many as 800 plus servers and determine which of the 2 member servers of a cluster holds the quorum disk. Could be 2 or 4 nodes in the cluster. Helps when running our patching process and how we schedule our patching process. TIA - Bob

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  13. Powershell and SCCM: Reporting and Querying Request

    It is exciting SCCM supports powershell, but it would be really great with some additional cmdlets focusing more on reporting and querying information.

    Querying user or device information through powershell would be great as we could then manipulate and generate CSV files of that data. Scripting of data involving attributes such as OS, IP, primary user, primary device, A/V alerts, etc. would be tremendously helpful.

    Additionally, cmdlets that allowed resolution of hostname from IP and vice versa would be helpful (sure, we could query other systems, but there are reasons why we wanted this info from SCCM specifically). Scripting resolution…

    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. How do I download modules manually from gallery behind a firewall/proxy?

    For companies like banks which are very restrictive regarding internet downloads, I have no internet connectivity directly from powershell, only from my browsers. As such I cannot use install-module from powershell.

    Our desktops are only windows 7 but locked down running ps version 2 and powershell console doesn't have proxy access. I cannot run install-module on my servers neither as my servers have no internet connection.

    Is there a workaround to download a module manually as a zipped file so that I can I unzip and install them manually in my server?

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

    We’ll send you updates on this idea

    3 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  15. Add a PowerShell module to manage Windows Updates

    Add a PowerShell module to manage Windows Updates like you can now with the GUI. Like checking for updates, installing all updates, or a selection of updates, creating a report of pending updates, etc. The Windows Update options in the Server Configuration Manager (sconfig) are very limited.

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

    We’ll send you updates on this idea

    8 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
    survey  ·  Zachary Alexander responded

    We don’t own the creation of modules for operating system features. I’ll mark this as Survey so we can provide this information to the WU team, but you might also want to consider filing this in the Windows 10 Feedback Hub. Also, see the community-created PSWindowsUpdate link below :)

  16. copy-item

    Add -Directory and -File switch parameters to Copy-Item, just like Get-ChildItem.

    A -File switch would make it possible to avoid copying empty folders. Also, in some situations (see [question posted on StackOverflow](https://stackoverflow.com/questions/48026637/powershell-copy-item-doesnt-copy-when-filter-is-used/48026959?noredirect=1#comment83054046_48026959) getting the desired result requires Convert-Path | Copy-Item, but then "already exists" errors arise due to copying the folder multiple times. A -Files switch would avoid those errors. (Currently, you'd have to add -Force if you want to suppress the errors.)

    A -Directory switch would provide an equivalent to xcopy /T.

    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 →
  17. Make PowerShell PKI module cross-platform with PS Core incl New-SelfSignedCertificate

    PowerShell Core doesn't include the PKI module, which has the New-SelfSignedCertificate cmdlet. It would be great to have it available cross-platform.

    Hence the feature request to make the PKI module cross-platform and compatible with PS Core to be distributed in the PowerShell Gallery: https://www.powershellgallery.com

    Feature request with PS Core team and the reference to this UserVoice here:
    https://github.com/PowerShell/PowerShell/issues/3715

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

    We’ll send you updates on this idea

    3 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  18. 23 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    6 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →

    Would be interested in understanding the scenario where you are using the cmdlet & specifying the reason for rebooting. To explain: our previous assumption was that users would EITHER use the server UI that captured this information, OR use the cmdlet (often so they didn’t need to supply that reason text).
    So, what would help is to understand in what situations the cmdlet is being used and specifying the reboot explanation is desirable.

  19. Bug: Integrated Modules are not loaded if you have a Network Path in $env:PSModulePath which is not reachable

    Integrated Modules are not loaded if you have a Network Path in $env:PSModulePath which is not reachable.

    #

    I have customized the PSModulePath:

    PS C:\Users\username> ($env:PSModulePath).split(';')
    C:\Users\username\Documents\WindowsPowerShell\Modules
    C:\Program Files\WindowsPowerShell\Modules
    C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
    c:\Program Files\Microsoft Security Client\MpProvider\
    C:\Program Files\Microsoft Monitoring Agent\Agent\PowerShell\
    \my.domain\share\Modules\

    #

    If i try to execute e.g. Invoke-RestMethod

    PS C:\Users\username> Invoke-RestMethod
    Invoke-RestMethod : The 'Invoke-RestMethod' command was found in the module 'Microsoft.PowerShell.Utility', but the
    module could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.Utility'.
    At line:1 char:1
    + Invoke-RestMethod
    + ~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (Invoke-RestMethod:String) [], CommandNotFoundException
    
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

    PS C:\Users\username> Get-Command Invoke-RestMethod
    Get-Command : The term…

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  20. Disable-ScheduledTask -TaskName will fail with tasks including spaces in name.

    Steps to reproduce

    Disable-ScheduledTask -TaskName "Data Integrity Scan for Crash Recovery"
    Disable-ScheduledTask : The system cannot find the file specified.
    At line:1 char:1
    + Disable-ScheduledTask "Data Integrity Scan for Crash Recovery"
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (PS_ScheduledTask:Root/Microsoft/...S_ScheduledTask) [ 
    

    Disable-ScheduledTask], CimException

    + FullyQualifiedErrorId : HRESULT 0x80070002,Disable-ScheduledTask
    

    Expected behavior

    This should disable the scheduled task and not crash.

    You can workaround this by searching for the task object and disabling that way:

    $Name = "Data Integrity Scan for Crash Recovery"
    Get-ScheduledTask | where-object {($_.TaskName -eq $Name)} | Disable-ScheduledTask

    Actual behavior

    Crashes with the following exception:
    Disable-ScheduledTask : The system cannot find…

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

Feedback and Knowledge Base