# 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.
• Hot ideas
• Top ideas
• New ideas
• My feedback
1. ## How do I create an Azure Automation schedule with PowerShell using the Az Cmdlet New-AzAutomationSchedule?

When I attempt to run the Cmdlet below with the following parameters, it fails:

$AutomationAccountName = "CZEU1-INF-NP-0faa84be-AAA-01"$ResourceGroupName = "czeu2-app-np-rgp-01"

$vmStartTime = (Get-Date "08:00:00").AddDays(1)$vmStopTime = (Get-Date "18:00:00")

$timeZone = [TimeZoneInfo]::Local.DisplayName$vmStartupScheduleName = "Startup VMs 08:00 Daily Weekdays:

$timeZone"$vmShutdownScheduleName = "Shutdown VMs 18:00 Daily

Weekdays: $timeZone" [System.DayOfWeek[]]$WeekDays = @([System.DayOfWeek]::Monday..[System.DayOfWeek]::Friday)

New-AzAutomationSchedule -AutomationAccountName $AutomationAccountName -Name$vmStartupScheduleName -StartTime $vmStartTime -WeekInterval 1 -DaysOfWeek$WeekDays -ResourceGroupName $ResourceGroupName -Verbose The error is: New-AzAutomationSchedule : Exception of type 'Microsoft.Azure.Management.Automation.Models.ErrorResponseException' was thrown. At line:1 char:1 + New-AutomationSchedule -AutomationAccountName$AutomationAccountNam... + CategoryInfo : CloseError: (:) [New-AzAutomationSchedule], ErrorResponseException + FullyQualifiedErrorId : Microsoft.Azure.Commands.Automation.Cmdlet.NewAzureAutomationShedule

(thinking…)
Signed in as (Sign out)

We’ll send you updates on this idea

{
$inputCredential… 10 votes Sign in (thinking…) Sign in with: Facebook Google Signed in as (Sign out) We’ll send you updates on this idea 4. ## add tcpdump equivalent cmdlet in powershell I hope powershell have a cool module about the network tool ,make them work like tcpdump , netcat in linux. It's very very cool things , will make me fly in our daily task. 16 votes Sign in (thinking…) Sign in with: Facebook Google Signed in as (Sign out) We’ll send you updates on this idea 5. ## "Get-ADGroupMember: An operations error occurred" with cross-forest members Any group that contains a user account that is cross-forest to the group object is hitting the non-descriptive error in the title when running Get-ADGroupMember. I can successfully run the command with on groups where all members are in the same forest as the group object. The current workaround is to use Get-ADGroup and expand the Members property and then make a subsequent Get-ADObject call for each member. This takes about 5x longer to run. 7 votes Sign in (thinking…) Sign in with: Facebook Google Signed in as (Sign out) We’ll send you updates on this idea 6. ## Please enable port forwarding within PowerShell The very cool features on linux is about the port forwarding when we ssh to a remote server. I hope PowserShell come with these cool things. 10 votes Sign in (thinking…) Sign in with: Facebook Google Signed in as (Sign out) We’ll send you updates on this idea 7. ## Smartcard support Add Smartcard support to Get-Credential in Powershell 7. Add a cmdlet for enumerating certificates on a smartcard 2 votes Sign in (thinking…) Sign in with: Facebook Google Signed in as (Sign out) We’ll send you updates on this idea 8. ## ISE should not switch focus automatically to the console pane Starting from Windows 10 1803, when you run a selected block of code using F8, ISE switches focus to the console pane. This means that when you run several of these, you have to manually switch the focus back to the script pane after each execution. This is much more difficult than before, so please fix this. 83 votes Sign in (thinking…) Sign in with: Facebook Google Signed in as (Sign out) We’ll send you updates on this idea 9. ## Jupyter notebook kernel A Microsoft generated and supported kernel for the Jupyter Notebook/Lab users. There is one a fellow did up and it covers the basics but doesn't have auto-completion in the IDE, errors on some things, doesn't get updated much, etc. I use Jupyter to teach and getting a full on Microsoft supported kernel would be great. 2 votes Sign in (thinking…) Sign in with: Facebook Google Signed in as (Sign out) We’ll send you updates on this idea 10. ## Serious MASSIVE BUG: Mount-DiskImage not scriptable Hi Mounting a ISO image is happening via Mount-DiskImage -ImagePath C:\ISO\isofile.iso -PassThru. This is working. BUT: the -ImagePath parameter doesn´t accept any(!) variables. This makes it absolute and total unusable in a script because usually the Path to a iso isn´t always static. If I have an static Path i can use the explorer. Its faster and easier. Dissapointing 3 votes Sign in (thinking…) Sign in with: Facebook Google Signed in as (Sign out) We’ll send you updates on this idea 11. ## Bug: Powershell Get-Help does not work with Exchange Online cmdlets We've been lucky, from what I'm gathering from web searches! Until December last year, Exchange Online Powershell cmdlet help was available using Get-Help in the shell. However, after the Christmas break, the only response we get is: Get-Help : Exception calling "Invoke" with "0" argument(s): "Cannot find path '' because it does not exist." At line:1 char:1 + Get-Help Get-Mailbox + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Get-Help], MethodInvocationException + FullyQualifiedErrorId : CmdletInvocationException It's the same issue irrespective of the cmdlet. Consequently, I'm forced to contend with painful searches of the documentation website for information of the relevant cmdlets. Raised… 13 votes Sign in (thinking…) Sign in with: Facebook Google Signed in as (Sign out) We’ll send you updates on this idea 12. ## 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 13. ## 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 14. ## 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 15. ## "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… 31 votes Sign in (thinking…) Sign in with: Facebook Google Signed in as (Sign out) We’ll send you updates on this idea 16. ## 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
(thinking…)
Signed in as (Sign out)

We’ll send you updates on this idea

17. ## ActiveDirectory PowerShell module isn't thread-safe

Accessing Active Directory Web Services (ADWS) by launching and running a number of PowerShell Runspaces in parallel from within the same process makes ADWS fail with error message "invalid enumeration context".

Apparently, the ActiveDirectory PowerShell module is not thread-safe.

Please fix soon. There is no workaround for this issue.

See this repository for steps to reproduce:

https://github.com/SetTrend/powershell-test

1 vote
(thinking…)
Signed in as (Sign out)

We’ll send you updates on this idea

18. ## 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 19. ## Filesystem PSProvider Doesn't Handle Folder with Trailing Space *-Item -Path "$home\try \it.txt" fails, even if "\$home\try " exists. Note trailing space character after folder name.

This has been observed for New-Item (using -Force), Get-Item, Get-ChildItem.

This is on Windows 10 Enterprise versions

PSH: 5.1.17763.592 + Winver: 1809 build 17763.678

PSH: 5.1.18362.145 + Winver: 1903 build 18362.295

1 vote
(thinking…)
Signed in as (Sign out)

We’ll send you updates on this idea

20. ## 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
(thinking…)