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

## Please feel free to provide feedback or file bugs here.

(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

• Hot ideas
• Top ideas
• New ideas
• My feedback
1. ## DISM cmdlets crash if you supply -Online:$false The cmdlet throws an exception that cannot be caught by scripts. It seems that the team that wrote the cmdlets was using the presence of -Online parameter to determine the parameter set, and pretended that -Online is always$true if is it supplied. It might not be -- it is perfectly valid to supply $false to the switch. This should be considered a bug, as it crashes PowerShell. Presumably an ill-supplied set of parameters should result an ErrorRecord being written. 1 vote Sign in Check! (thinking…) Reset or sign in with Signed in as (Sign out) We’ll send you updates on this idea • ## Dynamic param is silently ignored Dynamic param is silently ignored, and no errors are thrown when CmdletBinding is not defined. [CmdletBinding()] Param() The following code should either run successfully, or throw an error: Function Add-Control() { DynamicParam {$ParamAttribute = New-Object Parameter
$ParamAttribute.Mandatory =$true
$ParamAttribute.ParameterSetName = '__AllParameterSets'$AttributeCollection = New-Object System.Collections.ObjectModel.Collection[System.Attribute]

$AttributeCollection.Add($ParamAttribute)

$controlTypes = @("TextBox", "Label", "DataGrid")$AttributeCollection.Add((New-Object ValidateSet($controlTypes)))$RuntimeParam = New-Object System.Management.Automation.RuntimeDefinedParameter('Type', [string], $AttributeCollection)$RuntimeParamDictionary = New-Object System.Management.Automation.RuntimeDefinedParameterDictionary

$RuntimeParamDictionary.Add('Type',$RuntimeParam)

return $RuntimeParamDictionary } Process { Write-Host ($PSBoundParameters['Type'])
}
}

# $null 4 votes Sign in Check! (thinking…) Reset or sign in with Signed in as (Sign out) We’ll send you updates on this idea • ## New-Volume does not work with SMR drives I can create a storage pool with or without storage tiers and then use new-virtualdisk to create disks on the storage pool. I can then format-volume and add access paths with add-PartitionAccessPath. All the separate parts work fine. but...if I make a storage pool and try something like: New-Volume -StoragePoolFriendlyName Test_Pool -FriendlyName Test0 -Size 10TB -ResiliencySettingName Simple -FileSystem ReFS -AccessPath M:\access_path0 ...it will work one time. Any other volumes attempted on the same storage pool (with different names and access_paths) will fail on both ReFS and NTFS file systems. The same command run on PMR HDDs will work repeatedly just… 1 vote Sign in Check! (thinking…) Reset or sign in with Signed in as (Sign out) We’ll send you updates on this idea • ## BUG: binary module loading fails silently on Fall Creators update on some machines occurs in PS 5.1 on Windows 10, Fall Creators update First observed with SqlServer module 21.0.17199 Also occurs with PsWindowsUpdate v2.0.0.0 , SqlServer 21.0.17224 Pretty much what it says - with either autoload or Import-Module, the module loads with no complaints but the cmdlets aren't there. The assemblies _do_ get loaded into the appdomain. I found no obvious clues poking around with ProcMon and Trace-Command (obvious to me, anyway). Happens on some machines, not others. Reported by 3 users (that I know of), in each case after updating to the Fall Creators update. If you have any debugging hints, they'd… 3 votes Sign in Check! (thinking…) Reset or sign in with Signed in as (Sign out) We’ll send you updates on this idea • ## PowerShell sessions don't support mixed-culture values such as 'en-DE' Note: This may ultimately require resolution in the .NET framework. Recent versions of Windows 10 support mixed culture values such as en-DE (sic) (since version 1703 - see https://msdn.microsoft.com/en-us/library/cc233982.aspx) After using, e.g., Set-Culture en-DE to set the culture for future PowerShell sessions (which in itself succeeds, as you can verify at registry location [HKEY_CURRENT_USER\Control Panel\International]), subsequent PowerShell sessions quietly fall back onto culture 'en-US', as reflected in$PSCulture and [cultureinfo]::CurrentCulture.

Note that such a mixed culture *is* honored in PowerShell *Core*.

1 vote
Check!
(thinking…)
Reset
Signed in as (Sign out)

We’ll send you updates on this idea

• ## anaconda

Anaconda (Python Environments) Syntax Support

1 vote
Check!
(thinking…)
Reset
Signed in as (Sign out)

We’ll send you updates on this idea

• ## Unable to use PowerShell Transcription with Active Directory Administrative Console (ADAC)

Setup group policy to enable PowerShell Transcripting. From a machine that has that policy applied, launch ADAC. The error "Cannot connect to any domain. Refresh or try again when connection is available." pops up and ADAC can't be used.

https://github.com/PowerShell/PowerShell/issues/3021

Check!
(thinking…)
Reset
Signed in as (Sign out)

We’ll send you updates on this idea

• ## having the Remove-NetFirewallRule remove all rules implicitly without setting --all is one of the most BS in ps scenarious I expenrienced

1 vote
Check!
(thinking…)
Reset
Signed in as (Sign out)

We’ll send you updates on this idea

• ## Get-Certificate -SubjectAlternativeName

Provide a means to specify an alternative Subject Alternative Name in the Certificate request. I have a need for requesting certificates with a specific CN for the subject name and they need to be supplied with a UPN in the subject Alternative Name Field. Currently the only option appears to be a -DNSName flag

1 vote
Check!
(thinking…)
Reset
Signed in as (Sign out)

We’ll send you updates on this idea

• ## [Bug] Paste doesn't work in ReadConsole() windows api prompt

This bug may present a low-risk security concern for unaware end users, as reported in openssl here: https://github.com/openssl/openssl/issues/5864
This bug should provide enough detail about the "password paste" problem we were seeing in powershell. In my opinion clipboard text should be able to be pasted (though not visible, as is the case with regular keyboard typing).

1 vote
Check!
(thinking…)
Reset
Signed in as (Sign out)

We’ll send you updates on this idea

• ## Set-SqlAvailabilityReplica -ReadOnlyRoutingList not working

When executing the Set-SqlAvailabilityReplica with the -ReadOnlyRoutingList parameter it doesn't update the read only routing list.

If I supply the -script parameter the script is correct.

1 vote
Check!
(thinking…)
Reset
Signed in as (Sign out)

We’ll send you updates on this idea

Good day
We have only about 150 computers running Windows 10, and PowerShell regularly stops working. The current case:

Install-Module : The term 'Install-Module' is not recognized as the name of a cmdlet, ...

Because Install-Module is part of the Windows 10 PowerShell basic installation, we don't want to patch until it is running again. We simply remove PowerShell, restart the computer and reinstall PowerShell.

(Of course) since Windows 7 M is still not able to solve this bug. We get since years:

Install-Module : The term 'Install-Module' is not recognized as the name of a cmdlet, ...

So: Microsoft…

1 vote
Check!
(thinking…)
Reset
Signed in as (Sign out)

We’ll send you updates on this idea

• ## utf-8 without bom

Bug: Scripts encoded with utf-8 without bom are producing errors when the character "Ä" is used between double quotation marks.

Frequency: always

How to reproduce: Create a powershell file with the following contents:

$test = "Ä" Save it with the encoding "utf-8 without bom" (often just called utf-8. The counterpart, utf-8 with bom, can also be called "utf-8 signature"). Run the file, and you will get the following error: At C:\location\to\file\test.ps1:1 char:9 +$test = "Ã„"
+ ~~~~
The string is missing the terminator: ".
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString

Check!
(thinking…)
Reset
Signed in as (Sign out)

We’ll send you updates on this idea

• ## Include System.Data.SQLite in PowerShell

Include System.Data.SQLite in PowerShell, so that we have an SQL database engine (SQLite) +ADO.NET provider built in in PowerShell.

Check!
(thinking…)
Reset
Signed in as (Sign out)

We’ll send you updates on this idea

• ## Possible bug in Exchange PowerShell Get-Group filter?

Hi,

I just noticed a strange thing. Get-User filter parameter doesn't seem to work when using a variable:

$email = user@domain.com$dn = (Get-User $email).DistinguishedName Get-Group -Filter { ManagedBy -eq$dn }

This returns a bunch of groups that has nothing to do with the user. It works correctly when I specify the DistinguishedName manually, e.g. ManagedBy -eq "CN=User,OU=lalala, ..."

Is this a bug in the cmdlet? Because I know that Get-ADGroup works when I use a variable in the filter.

1 vote
Check!
(thinking…)
Reset
Signed in as (Sign out)

We’ll send you updates on this idea

• ## Invalid Path error in SQL Agent power job step

While running PowerShell script through SQL Agent Job I am getting below error . I am running script through account which has full permission on the path.

The error information returned by PowerShell is: 'Invalid Path: 'D:\'. '. Process Exit Code -1. The step failed.

The below is script :

$backuppath = "D:\MSSQL\BACKUP" #$destpath = "D:\"

$file =get-childitem -path$backuppath -Filter "Test*.bak" |

where-object { -not $_.PSIsContainer } | sort-object -Property$_.CreationTime |

select-object -last 1 |Copy-Item -Destination "D:\" -PassThru |
Rename-Item -NewName "Test_new.bak"

Thanks
Manoj

1 vote
Check!
(thinking…)
Reset
Signed in as (Sign out)

We’ll send you updates on this idea

• ## BUG: PowerShell SendMail requires To address

Current specs say -To address is required. This should be changed to "at least one address is required". I consistently, using other SMTP mailers, add all my addresses as BCC, with 'To' and "cc" empty. Everyone then sees only their address in their email. This thwarts a 'Reply All' going somewhere it shouldn't.

1 vote
Check!
(thinking…)
Reset
Signed in as (Sign out)

We’ll send you updates on this idea

• ## SendMail needs ReplyTo parameter

This is a standard SMTP option and glaring oversite in PowerShell.

1 vote
Check!
(thinking…)
Reset
Signed in as (Sign out)

We’ll send you updates on this idea

• ## Env:OS Variable Set for both Windows and Linux versions of powershell

We have been stumped trying to find a way to be able to to call a Variable that would exist on both Windows and Linux versions so that we can make scripts OS independent between the 2 versions. I have checked a few places but $Env:OS resides on windows and$psverstiontable.OS is where you find it on linux. if you were able to find it in the same location regardless of where you are running powershell, it would be easier to deal with doing the OS check for pathing reasons.

Issue also submitted on GitHub as I am not sure…

1 vote
Check!
(thinking…)
Reset
Signed in as (Sign out)

We’ll send you updates on this idea

• ## Bug? Test-Connection forces enumeration of reparse points

I've noticed some behavior in PowerShell that I can't explain, but I'm hoping that someone else can.

If I want to build a list of file objects from drive C:\, and I want to ignore shortcut folders (reparse points) such as C:\Documents and Settings\. The following command works well:

$FileList = @(Get-ChildItem -Path C:\ -Recurse -Force -Attributes !ReparsePoint);$FileList | Where-Object {\$_.DirectoryName -like "*Documents and Settings*"};

The Where-Object command returns no files as expected, since C:\Documents and Settings\ is a reparse point.

However, if I run the Test-Connection command first, then the Get-ChildItem command appears to ignore the -Attributes !ReparsePoint…

1 vote
Check!
(thinking…)
Reset