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. UpdateServices Module - Request for UpdateReleaseDate

    UpdateServices Module, cmdlet Get-WsusUpdate. This cmdlet does not allow filtering by updates' "ReleaseDate". It also does not return value of updates' "ReleaseDate". GUI tool (WSUS mmc) does show "Release Date" column when showing updates, and allows updates sorting by "Release Date". I would ask that UpdateServices Module includes "UpdateReleaseDate" both as input (filtering) value and output value. Thanx.

    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: sort in pipeline don't work correctly

    Hi

    When you use the sort function in a pipeline it will work in ISE but not when you run the script direktly (see attached logs). By run it dierktly it sorts the objects wrong.

    Greetings from Germany

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  3. PowerShell Basic Statistics Module

    It will be fantastic if powershell have a simple or basic module for statistics and data analytics ..... calculating average and min , max is not enough .... please more data analytics functions would make powershell able to meet the new technology expectations

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

    موهتءحشنسةءهءتشكشءاءخنشخششخاءاءنءنءتءءخ

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  5. Add-ADPrincipalGroupMembership [-WhatIf] [-Confirm] [-AuthType <ADAuthType>] [-Credential <PSCredential>] [-Identity] <ADPrin

    Add-ADPrincipalGroupMembership
    [-WhatIf]
    [-Confirm]
    [-AuthType <ADAuthType>]
    [-Credential <PSCredential>]
    [-Identity] <ADPrincipal>
    [-MemberOf] <ADGroup[]>
    [-Partition <String>]
    [-PassThru]
    [-Server <String>]
    [<CommonParameters>]

    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  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  6. convertto-json fails on result from Get-AzDiagnosticSetting

    The user reported an issue of Convertto-json cmdlet.
    Here is the details. Please take a loot at it.

    https://github.com/Azure/azure-powershell/issues/10216

    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. Add-VPNConnection AlwaysOn

    Trying to create a script to Add Always On VPN connections for remote users. The available scripts are so convoluted. I could easily do what I need if I could simply add the -AlwaysOn switch to Add-VPNConnection.

    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  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  8. BUG: WMI and CIM not able to find the CDPUserSvc service

    Get-WmiObject and Get-CimInstance are unable to find the CDPUserSvc service.

    Get-WmiObject -Namespace root\cimv2 -Query 'SELECT * FROM Win32_Service WHERE Name="CDPUserSvc"'

    Get-CimInstance -Namespace root\cimv2 -QueryDialect WQL -Query 'SELECT * FROM Win32_Service WHERE Name="CDPUserSvc"'

    The presence of this service can be confirmed with the Get-Service cmdlet:

    Get-Service -Name CDPUserSvc

    However, it works fine with other services.

    This behavior appears on a Windows 2019 server with native Framework and native PowerShell.

    Windows version: 17763.1.amd64fre.rs5_release.180914-1434
    PS version: 5.1.17763.316
    .Net Framework version: 4.7.03190

    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  ·  WMI  ·  Flag idea as inappropriate…  ·  Admin →
  9. SEHException

    I can't use power shell. If I open it, print these error
    ハンドルされていない例外: System.Runtime.InteropServices.SEHException: 外部コンポーネントが例外をスローしました。
    場所 System.Reflection.RuntimeAssembly.GetResource(RuntimeAssembly assembly, String resourceName, UInt64& length, StackCrawlMarkHandle stackMark, Boolean skipSecurityCheck)
    場所 System.Reflection.RuntimeAssembly.GetManifestResourceStream(String name, StackCrawlMark& stackMark, Boolean skipSecurityCheck)
    場所 System.Resources.ManifestBasedResourceGroveler.GetManifestResourceStream(RuntimeAssembly satellite, String fileName, StackCrawlMark& stackMark)
    場所 System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
    場所 System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
    場所 System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
    場所 System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
    場所 System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
    場所 System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
    場所 System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()
    場所 System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()
    場所 System.Management.Automation.Runspaces.PipelineThread.WorkerProc()
    場所 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    場所 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state,…

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  10. DHCP Server Class - ASCII data is missing

    The output of the Get-DhcpServerv4Class cmdlet give me the information that I need, except for one AsciiData value. I don't know if that is something computed from the corresponding Data value.

    PS C:\temp> Get-DhcpServerv4Class -ComputerName $ComputerName -Type "Vendor" | Where-Object {$_.Description -notlike "Microsoft*"}

    Name Type Data AsciiData Description
    ---- ---- ---- --------- -----------
    Cisco Aironet 1200 Vendor 0x436973636f2041502063... Cisco AP c1200 Vendor Class Indentifi...
    airespace Vendor 0x4169726573706163652e... Airespace.AP1200 1010
    Airespace 2700 Vendor 0x436973636f2041502063... Cisco AP c2700 Cisco Aironet 2700 Series
    Mitel IP Phone Options Vendor 0x697070686f6e652e6d69... Mitel-specific options...
    PXEClient (BIOS) Vendor 0x505845436c69656e743a... PXEClient:Arch:00000 PXEClient (BIOS)
    PXEClient (UEFI x64) Vendor 0x505845436c69656e743a...…

    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 →
  11. Start-Job on Windows Server 2016 hangs Powershell

    Start-Job seems to sometimes cause the calling thread to hang. If you create a loop in ISE and spin off a bunch of jobs, inevitably it will hang. This has only been tested using a ScriptBlock.

    As a workaround, you can use threads to do the heavy lifting and so if they fail to start the job, just recreate the thread.

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  12. Wrong path delimiters in archive (non-UNC)

    The "compress-archive" module stores path delimiters in non UNC format (backslashes instead of slashes) which differs from the builtin zipper in Win10 (Send to Zip-Archive).
    This leads to unrecognized files on decompression by i.e. Microsoft Dynamics NAV 2016 (decrompression of an imported zipfile "ControlAddIn.Zip")
    If you build the same archive with the Win10-Zipper, the files are recognized correctly.
    Used PS-Version : 5.1 build 18362 rev 145
    Win10-Pro 64bit version: 10.0.18362.267
    Command executed from Visual Studio:
    powershell Compress-Archive -Path ".\ControlAddIn\AddIn\*" -CompressionLevel Fastest -DestinationPath "$(SolutionDir)ControlAddIn.zip"
    I cannot append the two Zip-Archives to let you compare these files by yourself therefore I post…

    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. AzureAD cmdlets vs MSOL cmdlets

    I am finding that the AzureAD cmdlets do not show me the same list of attributes for a user as the MSOL cmdlets you are deprecating. For example; our sharepoint people need to see the PreferredDataLocation value for content controls, this was available in MSOL and not easily in AzureAD. (I have included 2 user exports to show you what I mean) How do I make the AzureAD cmdlets do what MSOL does?

    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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  14. Scheduledtask commands should support whatif

    The -ScheduledTask commands that modify state should support the WhatIf parameter. They don't appear to currently as of Server 2016.

    Specifying -WhatIf to Disable-ScheduledTask says the parameter is unknown.

    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] Get-LocalGroupMember and unresolved SID throws error

    If there is an unresolved SID in a local group the cmdlet Get-LocalGroupMember (and maybe others) throws and error.

    Module: Microsoft.PowerShell.LocalAccounts

    Get-LocalGroupMember : Failed to compare two elements in the array.
    At line:1 char:1
    + Get-LocalGroupMember -Group 'RDS Endpoint Servers'
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Get-LocalGroupMember], InvalidOperationException
    + FullyQualifiedErrorId : An unspecified error occurred.,Microsoft.PowerShell.Commands.GetLocalGroupMemberCommand

    If the SID is removed, the cmdlet once again works as expected.

    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 →
  16. 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

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

    We’ll send you updates on this idea

    0 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  17. 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

    0 comments  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
  18. 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

    0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  19. 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
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  20. New-AzAutomationConnection Cmdlet incorrectly states that -ResourceGroupName parameter value exeeds length of 90.

    There appears to be a bug when using this Cmdlet, where the -ResourceGroupName parameter incorrectly states that the parameter value for the resource group exceeds a length of 90 when a variable is used, i.e. $rgName (string length is actually 19 <CZEU2-APP-NP-RGP-01>. When the hard coded value of: "CZEU2-APP-NP-RGP-01" is used however, the Cmdlet works as designed.

    10 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 →
← Previous 1 3 4 5 81 82
  • Don't see your idea?

Feedback and Knowledge Base