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. WindowsServerBackup not available on Windows 10 ???

    It seems that the WindowsServerBackup powerShell module is not available on Windows 10, although it is written on the Microsoft website, here in particulary: https://docs.microsoft.com/en-us/powershell/module/? view = win10-ps

    Is it a mistake?
    I spent a lot of time trying to install this module, but finaly, I dropped.

    What a pity !!!

    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. servercore : can I use it on Windows 10 Home?

    https://docs.microsoft.com/en-us/powershell/module/servercore/get-displayresolution?view=win10-ps

    I know this says servercore. But I can't believe the ability to set the display resolution via Powershell should be in the realm of Servers only.
    1) Can someone confirm if indeed you can do this on Windows 10? 2) And if so, how do I get the module to import.
    When I have tried
    Import-Module -Name servercore
    I get the following:
    PS Env:> Import-Module -Name servercore
    Import-Module : The specified module 'servercore' was not loaded because no valid module file was
    found in any module directory.

    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. Get-ADUser not caching results when querying a remote forest

    Potential bug in the Get-ADUser commandlet when querying a remote forest:

    $myForest | Get-ADUser -filter *
    $myForest[0] # <-- this doesn't reach back to a DC to return the user

    $remoteForest | Get-ADUser -filter * -server dc1.remoteforest.com
    $remoteForest[0] # <-- this will call back to a DC to fetch the user even though it's been successfully retrieved in the previous line

    See https://stackoverflow.com/questions/54790231/get-aduser-not-caching-results for a better explanation.

    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. 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 →
  5. 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 →
  6. 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 →
  7. 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 →
  8. [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 →
  9. 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 →
  10. List which module contains which CmdLets.

    I am trying to figure out which module contains Get-PcsvDevice. I am running PS 5.1 on Server2012 R2.

    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 →
  11. Case-Sensitive option for Test-Path

    An option to force Test-Path to be case-sensitive would be extremely helpful, especially given a script could be run on either a case-sensitive filesystem or a case-insensitive one and produce different output. At the moment, this requires a fair amount of manual work for a common goal. An option to force case-insensitivity may also be desitable, given PowerShell can encounter case-sensitive filesystems.

    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 →
  12. Error attempting to create a RAP/CAP policy containing parenthesis characters

    In module "RemoteDesktopServices"

    Run powershell as administrator, execute next:

    Import-Module RemoteDesktopServices
    New-Item -Path "RDS:\GatewayServer\RAP" -Name "TestRAP1 (test)" -UserGroups "Remote Users@DomainName" -ComputerGroupType 1 -ComputerGroup "RDS_group@DomainName"

    Get error:
    New-Item : The path contains characters that are not valid.
    At line:1 char:1
    + New-Item -Path "RDS:\GatewayServer\RAP" -Name "TestRAP1 (test 123)" ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidArgument: (RDS:\GatewaySer...AP_1 (test 123):String) [New-Item], ArgumentException
    
    + FullyQualifiedErrorId : IllegalCharacters,Microsoft.PowerShell.Commands.NewItemCommand

    but if execute without parenthesis characters, its will executed with success

    New-Item -Path "RDS:\GatewayServer\RAP" -Name "TestRAP1 test" -UserGroups "Remote Users@DomainName" -ComputerGroupType 1 -ComputerGroup "RDS_group@DomainName"

    Moreover, if you create a policy through…

    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 →
  13. Please use your own Naming Conventions for PmemDisk.ps1xml / PmemPhysicalDevice.ps1xml

    M$$ will probably ignore this issue, too:

    All 110 format ps1xml Files use the Naming Convention:
    <Type>.Format.ps1xml

    Once more, it's a shame that the Naming Convention is not validated before a M$$ Product is deployed, those files would fail:

    PmemDisk.ps1xml
    PmemPhysicalDevice.ps1xml

    Such bugs are annoying - and could very easily be prevented. If you need help with the basics, please ask.

    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 →
  14. M$ Shame #1427: Invalid XML File: MSFT_NetEventWFPCaptureProvider.format.ps1xml

    Yes, this will be the ignored issue #1427:

    This XML File does not pass any XML Validation:
    c:\Windows\System32\WindowsPowerShell\v1.0\Modules\NetEventPacketCapture\MSFT_NetEventWFPCaptureProvider.format.ps1xml

    M$$ is really not able to integrate the most basic function tests before Files are distributed to many millions of paying customers?

    This is really one more issue which must never happen at M$$.
    A scripting kiddy could make this kind of errors - but usually, they smart enough...

    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 →
  15. Bug: wrong encoding in some *.format.ps1xml files

    It's probably useless and a shame that M$$ is usually not fixing this kind of bugs:

    Some PowerShell xml Files have the wrong encoding, for example this one:
    c:\Windows\System32\WindowsPowerShell\v1.0\Event.Format.ps1xml

    It states that it is using:
    <?xml version="1.0" encoding="utf-8" ?>
    but in fact, it's utf-16.

    Test it:
    $xmldoc = New-Object xml.XmlDocument
    $xmldoc.Load('c:\Windows\System32\WindowsPowerShell\v1.0\Event.Format.ps1xml')
    Exception calling "Load" with "1" argument(s): "'.', hexadecimal value 0x00, is an invalid character. Line 2, position 1."

    Change the header to:
    <?xml version="1.0" encoding="utf-16" ?>
    and it will work.

    M$ still does not have the most basic unit tests to assure that config files must have the right…

    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: wrong encoding in some *.format.ps1xml files

    It's probably useless and a shame that M$$ is usually not fixing this kind of bugs:

    Some PowerShell xml Files have the wrong encoding, for example this one:
    c:\Windows\System32\WindowsPowerShell\v1.0\Event.Format.ps1xml

    It states that it is using:
    <?xml version="1.0" encoding="utf-8" ?>
    but in fact, it's utf-16.

    Test it:
    $xmldoc = New-Object xml.XmlDocument
    $xmldoc.Load('c:\Windows\System32\WindowsPowerShell\v1.0\Event.Format.ps1xml')
    Exception calling "Load" with "1" argument(s): "'.', hexadecimal value 0x00, is an invalid character. Line 2, position 1."

    Change the header to:
    <?xml version="1.0" encoding="utf-16" ?>
    and it will work.

    M$ still does not have the most basic unit tests to assure that config files must have the right…

    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 →
  17. BUG: Get-DnsServer* cmdlets with -ErrorAction SilentlyContinue mask pipeline exceptions

    PS > Get-DnsServerZone -ComputerName properdnsserver -ZoneName existingdnszone -ErrorAction SilentlyContinue| % { throw "OOPS!" }

    NO ERROR !

    PS > Get-DnsServerZone -ComputerName properdnsserver -ZoneName existingdnszone | % { throw "OOPS!" }
    Exception calling "EndProcessing" with "0" argument(s): "OOPS!"
    At line:354 char:17
    + $_cmdletizationobjectModelWrapper.EndProcessing()
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException
    
    + FullyQualifiedErrorId : RuntimeException

    PS >Get-Item . -ErrorAction SilentlyContinue | % { throw "OOPS" }
    Get-Item : OOPS
    At line:1 char:1
    + Get-Item . -ErrorAction SilentlyContinue | % { throw "OOPS" }
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : OperationStopped: (OOPS:String)
    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 →
  18. Get-Item / Get-ChildItem returns wrong Target-Property if Item is on a Directory Junction to another drive

    It's annoying that we have to report Bugs in UserVoices
    and its a shame that M$$ is fixing BUGS only if there are enough UserVoices.

    Anyway:

    Hello

    If we create this Directory Junction between local Drives:
    mklink /J C:\Temp D:\Data\Temp\

    So that accessing: C:\Temp\
    in fact works here: D:\Data\Temp

    Now, if we call e.g.
    (Get-Item C:\Temp\MyFile.txt).Target

    We get:

    Wrong: Target : {C:\Data\Temp\MyFile.txt}
    Should be: Target : {D:\Data\Temp\MyFile.txt}
    It's a shame that M$ still does not have Unit Tests to validate the most basic situations.
    (Assuring to return the right Target on different LinkTypes, is the most important reason for 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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  19. Get-Item / Get-ChildItem returns wrong Target-Property if Item is on a Directory Junction to another drive

    It's annoying that we have to report Bugs in UserVoices
    and its a shame that M$$ is fixing BUGS only if there are enough UserVoices.

    Anyway:

    Hello

    If we create this Directory Junction between local Drives:
    mklink /J C:\Temp D:\Data\Temp\

    So that accessing: C:\Temp\
    in fact works here: D:\Data\Temp

    Now, if we call e.g.
    (Get-Item C:\Temp\MyFile.txt).Target

    We get:

    Wrong: Target : {C:\Data\Temp\MyFile.txt}
    Should be: Target : {D:\Data\Temp\MyFile.txt}
    It's a shame that M$ still does not have Unit Tests to validate the most basic situations.
    (Assuring to return the right Target on different LinkTypes, is the most important reason for 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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  20. 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 →
  • Don't see your idea?

Feedback and Knowledge Base