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. Test-Path returns false for quoted path

    Test-Path returns false for valid paths contained within quotes. See example below. Due to the frequent need to quote paths containing spaces, this leads to needless bugs.

    Repro follows.

    PS C:\WINDOWS\system32> Test-Path 'C:\Windows\System32\ntdll.dll'
    True

    PS C:\WINDOWS\system32> Test-Path '"C:\Windows\System32\ntdll.dll"'
    False

    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. Extend get-childitem with support for file systems exposed via WEBDAV, SFTP, FTP, HTTP

    Extend get-childitem with pluggable support for file systems exposed via HTTP, SCP, SFTP, FTP, WEBDAV.

    Meanwhile, still using curl and custom scripting.

    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. active directory get-adcomputer FQDN

    get-adcomputer accepts FQDNs for the "server" (domain controller) parameter, but doesn't accept them for the "identity" (the adcomputer i'm trying to get-) parameter.

    so

    get-adcomputer -identity domaincontroller
    get-adcomputer -identity domaincontroller -server domaincontroller
    get-adcomputer -identity domaincontroller -server domaincontroller.domain.com

    all work.

    get-adcomputer -identity domaincontroller.domain.com

    does not work.

    what's the logic there?

    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. Import-Clixml - Serialized XML is nested too deeply.

    Import-Clixml 'data.xml'

    Import-Clixml : Serialized XML is nested too deeply.
    At line:1 char:1
    + Import-Clixml 'data.xml ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Import-Clixml], XmlException
    
    + FullyQualifiedErrorId : System.Xml.XmlException,Microsoft.PowerShell.Commands.ImportClixmlCommand

    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. [Issue] Get-MessageTrace pipe to Get-MessageTraceDetail

    I got some weird data when running below cmdlet

    Get-MessageTrace -StartDate "09/11/2017 00:00:00" -EndDate "09/15/2017 00:00:00" -PageSize 10 -Page 1 | Get-MessageTraceDetail | Select-Object Date, MessageTraceID, Event, Data, Detail | Out-GridView

    It seems the last event of the first MessageTraceID keeps repating itself and was added next to last event of the next MessageTraceID. And its data keep growing. Please see below image for the clear representation of the issue.
    https://1drv.ms/i/s!AtOz2sztWjOapgIwkbjyq-sy4_jm

    Below image is the correct MessageDetail of MessageTraceId 2b87f940-0eee-4c39-71a9-08d4f9757430
    https://1drv.ms/i/s!AtOz2sztWjOapgPFCL102diF6jRz

    And below image is the correct MessageDetail of MessageTraceId f602c9c7-2a5b-4a5a-1256-08d4f8e9ba58
    https://1drv.ms/i/s!AtOz2sztWjOapgSFXfJiKurb23w0

    Can you please check why it is happening?

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  6. OutVariable gets the output from the next command (select) in the pipeline

    When running something like:
    gsv -ov all | sort -ov sorted | select name -first 10 -ov first10

    I'd expect $all.Count to be equal to $sorted.Count, but $sorted.Count is 10 and contains the same objects as $first10.
    This is different than in older versions (tried with -ver 2, and the variables have the expected objects. e.g. $all.Count == $sorted.Count)

    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. Hardware Manufacturing Guides: Adding DISM cmdlets in PowerShell to complement guides & GitHub contribution

    Following the Manufacturing guides - the PowerShell DISM Module is still lacking several cmdlets for the remaining DISM command lines available in the command prompt.
    Is there a reason for not having them all there?
    I wanted to make some scripts for the module, but could only find the DSC xDISMFeature
    Is there a DISM Module GitHub repository?

    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]: Get-ADUser -Filter {[attribute] -ne "ms"} filters out objects that return as null

    If you do a get-aduser -filter {company -ne "ms"}, the results filter out accounts that have no value for the company attribute defined. In my opinion this should not be the expected behavior; it should return all accounts, including the ones with a null company attribute, however it should not include results that have the company equal to "ms". The same behavior is also present with other attributes, such as "manager".

    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. [BUG]New-PSDrive FileSystem does not work for Backup-SqlDatabase

    The -BackupFile parameter for the Backup-SqlDatabase cmdlet does not work properly with a drive created with the New-PSDrive cmdlet. It will first pull the default backup drive for the SQL Server then append the string for the file system. For example:

    New-PSDrive -Name "fs" -PSProvider FileSystem -Root "\MyFileServer\Backups"
    Backup-SqlDatabase -Database "MyDatabase" -ServerInstance "MySQLServer" -BackupFile "fs:\MyDatabase.bak"

    Would error with "Cannot find the path 'C:\BackupPath\fs:\MyDatabase.bak'"

    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. When is Powershell v6 due to be released?

    When is Powershell v6 due to be released Will it work with Windows 10?

    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. Expand-Archive does not return a System.IO.FileInfo nor System.IO.DirectoryInfo

    The docs clearly say that Expand-Archive should return a System.IO.FileInfo or System.IO.DirectoryInfo but it has no output

    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. [Bug] Test-Path -PathType Containers Allows Users to Bypass Security Restrictions on Existence Testing

    Under PowerShell 5.1, the Test-Path command will return a [UnauthorizedAccessException] when you try to test a path the current user does not have access to. Normally this error is uncatchable, but it becomes so if you set the PathType to Container. Despite the name, Test-Path will verify the existence of both Containers and Leafs in this mode. Because the [UnauthorizedAccessException] error is ONLY returned for extant files and folders, a user can use it to confirm the existence of files and folders they should not be able to see or access.

    This one-liner allows you to bypass security restrictions:
    try{…

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  13. Does sqlps need to be imported for PS vers 4.0

    In PS 3.0, it was known to have to do an Import-Module sqlps -DisableNameChecking command in order to get the SQL SMO CMDLETS for working with SQL Server. Is this still needed for PS 4.0? There doesn't seem to be any Documentation on this difference.

    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. BUG: Import-Module does not autocomplete parameter switch "-Name"

    Typing "Import-Module -Na<tab>" does not autocomplete to "-Name", as if parameter switch "-Name" is no recognized.

    Other switches "-g<tab" and so forth work ok

    $PSVersionTable.PSVersion
    Major Minor Build Revision


    5 1 14393 953

    @arisaastamoinen

    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. Property UserName and UserGroupName of Add-PswaAuthorizationRule command don't work

    OS : Windows Server 2016

    The command prompt an error when I add authorization rule in PowerShell Web Acces. It's syntax error : "domain/user".

    But, this is my commande :
    Add-PswaAuthorizationRule -ComputerName SRVDC01 -UserName 'FRPSUG\Test' -ConfigurationName Microsoft.PowerShell

    It's same issue with group, no quote, simple quote, double quote, local user...

    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. Register-ArgumentCompleter Should Support Module-Qualified Command Names

    Register-ArgumentCompleter does not appear to support module-qualified command names, such as:

    Register-ArgumentCompleter -CommandName Microsoft.PowerShell.Management\Get-Process

    Running this command does not return an error, but does not function either. Module-qualified command names are often considered a best practice so it would be helpful if this was supported. Thanks!

    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. Add -ListLoaded parameter to the Get-Module Cmdlet

    For the Get-Module cmdlet, there is a -ListAvailable parameter to show the modules that are available, but not loaded. Although Get-Module without any parameters does show which modules ARE loaded, it would be nice (i.e. intuitive - for those just learning PowerShell as well as enhance readability) if there was a corresponding -ListLoaded parameter as well.

    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. New-EventLog needs to allow specifying CategoryCount

    New-EventLog allows specifying a CategoryResourceFile but not a 'CategoryCount'. This field then gets created in the registry as 0 and so I effectively have no categories.

    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. Add the ability for Join-Path to accept a single -Path and an array for -ChildPath

    If Join-Path handled a single base path and an array of child paths then you could easily process a list of relative paths.

    I would pass in:

    -Path "C:\MyTargetDirectory"
    -ChildPath ".\Sub1",".\Sub2",".\Sub2\Sub2.1",".\Sub2\Sub2.1\Sub2.1.1"

    and it would return the following:

    C:\MyTargetDirectory\Sub1
    C:\MyTargetDirectory\Sub2
    C:\MyTargetDirectory\Sub2\Sub2.1
    C:\MyTargetDirectory\Sub2\Sub2.1\Sub2.1.1

    If it isn't possible to create parameter sets that can cope with both methods then you could always create Join-ChildPath to simplify things.

    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. Bug in PowerShell Invoke-sqlcmd - Inserting duplicate rows if the second row of SQL insert statement table name is wrong.

    Bug in PowerShell Invoke-sqlcmd - Inserting duplicate rows if the second row of SQL insert statement table name is wrong.
    Example:
    create table TestDB..TestTable
    (Id Int,
    InsertedDate Datetime default (getdate()))

    Run below script in PowerShell, which has table name wrong in second row.

    $Query = "Use TestDB
    Insert into TestTable (id) values ('1')
    Insert into TestTable2 (id) values ('2')"
    Invoke-sqlcmd -Query "$Query" -ServerInstance "SQLInstanceName"

    SQLResult:
    Id InsertedDate
    1 2016-09-15 03:35:12.587
    1 2016-09-15 03:35:12.590

    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