Due to the use of unsupported APIs, we must remove the Counter CmdLets in the Diagnostics Module until a better solution is found. (#4303)

This commit is contained in:
Travis Plunk
2017-07-19 17:20:01 -07:00
committed by GitHub
parent 8c7f703f82
commit 72a8de39b5
8 changed files with 29 additions and 10 deletions
@@ -17,7 +17,15 @@
</PropertyGroup>
<ItemGroup>
<Compile Remove="CounterFileInfo.cs" />
<Compile Remove="CounterSample.cs" />
<Compile Remove="CounterSet.cs" />
<Compile Remove="ExportCounterCommand.cs" />
<Compile Remove="GetCounterCommand.cs" />
<Compile Remove="GetEventSnapin.cs" />
<Compile Remove="ImportCounterCommand.cs" />
<Compile Remove="PdhHelper.cs" />
<Compile Remove="PdhSafeHandle.cs" />
<Compile Remove="gen\GetEventResources.cs" />
</ItemGroup>
@@ -2,10 +2,10 @@
GUID="CA046F10-CA64-4740-8FF9-2565DBA61A4F"
Author="Microsoft Corporation"
CompanyName="Microsoft Corporation"
Copyright="© Microsoft Corporation. All rights reserved."
Copyright="© Microsoft Corporation. All rights reserved."
ModuleVersion="3.0.0.0"
PowerShellVersion="3.0"
CmdletsToExport="Get-WinEvent", "New-WinEvent", "Get-Counter", "Import-Counter", "Export-Counter"
CmdletsToExport="Get-WinEvent", "New-WinEvent" # Counter CmdLets Disabled #4272: "Get-Counter", "Import-Counter", "Export-Counter"
NestedModules="Microsoft.PowerShell.Commands.Diagnostics.dll"
TypesToProcess="GetEvent.types.ps1xml"
FormatsToProcess="Event.format.ps1xml", "Diagnostics.format.ps1xml"
@@ -194,7 +194,7 @@ Describe "TabCompletion" -Tags CI {
}
}
It 'Should complete "Export-Counter -FileFormat" with available output formats'-Skip:(!$IsWindows) {
It 'Should complete "Export-Counter -FileFormat" with available output formats' -Pending {
$res = TabExpansion2 -inputScript 'Export-Counter -FileFormat ' -cursorColumn 'Export-Counter -FileFormat '.Length
$res.CompletionMatches.Count | Should Be 3
$completionText = $res.CompletionMatches.CompletionText | Sort-Object
@@ -2,6 +2,11 @@
# File: Export-Counter.Tests.ps1
# Provides Pester tests for the Export-Counter cmdlet.
############################################################################################>
# Counter CmdLets are removed see issue #4272
# Tests are disabled
return
$cmdletName = "Export-Counter"
. "$PSScriptRoot/CounterTestHelperFunctions.ps1"
@@ -2,7 +2,12 @@
# File: Get-Counter.Tests.ps1
# Provides Pester tests for the Get-Counter cmdlet.
############################################################################################>
$cmdletName = "Get-Counter"
# Counter CmdLets are removed see issue #4272
# Tests are disabled
return
$cmdletName = "Get-Counter"
. "$PSScriptRoot/CounterTestHelperFunctions.ps1"
@@ -3,6 +3,10 @@
# Provides Pester tests for the Import-Counter cmdlet.
############################################################################################>
# Counter CmdLets are removed see issue #4272
# Tests are disabled
return
$cmdletName = "Import-Counter"
. "$PSScriptRoot/CounterTestHelperFunctions.ps1"
@@ -225,7 +225,7 @@ Describe "Verify approved aliases list" -Tags "CI" {
"Cmdlet", "Export-Alias", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Export-Clixml", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Export-Console", , $($FullCLR )
"Cmdlet", "Export-Counter", , $($FullCLR -or $CoreWindows )
"Cmdlet", "Export-Counter", , $($FullCLR )
"Cmdlet", "Export-Csv", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Export-FormatData", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Export-ModuleMember", , $($FullCLR -or $CoreWindows -or $CoreUnix)
@@ -248,7 +248,7 @@ Describe "Verify approved aliases list" -Tags "CI" {
"Cmdlet", "Get-ComputerRestorePoint", , $($FullCLR )
"Cmdlet", "Get-Content", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Get-ControlPanelItem", , $($FullCLR )
"Cmdlet", "Get-Counter", , $($FullCLR -or $CoreWindows )
"Cmdlet", "Get-Counter", , $($FullCLR )
"Cmdlet", "Get-Credential", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Get-Culture", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Get-Date", , $($FullCLR -or $CoreWindows -or $CoreUnix)
@@ -300,7 +300,7 @@ Describe "Verify approved aliases list" -Tags "CI" {
"Cmdlet", "Group-Object", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Import-Alias", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Import-Clixml", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Import-Counter", , $($FullCLR -or $CoreWindows )
"Cmdlet", "Import-Counter", , $($FullCLR )
"Cmdlet", "Import-Csv", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Import-LocalizedData", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Import-Module", , $($FullCLR -or $CoreWindows -or $CoreUnix)
@@ -42,7 +42,6 @@ Exit-PsSession,https://go.microsoft.com/fwlink/?LinkID=135212
Export-Alias,https://go.microsoft.com/fwlink/?LinkID=113296
Export-Clixml,https://go.microsoft.com/fwlink/?LinkID=113297
Export-Console,https://go.microsoft.com/fwlink/?LinkID=113298
Export-Counter,https://go.microsoft.com/fwlink/?LinkID=138337
Export-Csv,https://go.microsoft.com/fwlink/?LinkID=113299
Export-FormatData,https://go.microsoft.com/fwlink/?LinkID=144302
Export-ModuleMember,https://go.microsoft.com/fwlink/?LinkID=141551
@@ -59,7 +58,6 @@ Get-ChildItem,https://go.microsoft.com/fwlink/?LinkID=113308
Get-Command,https://go.microsoft.com/fwlink/?LinkID=113309
Get-ComputerRestorePoint,https://go.microsoft.com/fwlink/?LinkID=135215
Get-Content,https://go.microsoft.com/fwlink/?LinkID=113310
Get-Counter,https://go.microsoft.com/fwlink/?LinkID=138335
Get-Credential,https://go.microsoft.com/fwlink/?LinkID=113311
Get-Culture,https://go.microsoft.com/fwlink/?LinkID=113312
Get-Date,https://go.microsoft.com/fwlink/?LinkID=113313
@@ -102,7 +100,6 @@ Get-WSManInstance,https://go.microsoft.com/fwlink/?LinkID=141444
Group-Object,https://go.microsoft.com/fwlink/?LinkID=113338
Import-Alias,https://go.microsoft.com/fwlink/?LinkID=113339
Import-Clixml,https://go.microsoft.com/fwlink/?LinkID=113340
Import-Counter,https://go.microsoft.com/fwlink/?LinkID=138338
Import-Csv,https://go.microsoft.com/fwlink/?LinkID=113341
Import-LocalizedData,https://go.microsoft.com/fwlink/?LinkID=113342
Import-Module,https://go.microsoft.com/fwlink/?LinkID=141553
1 TopicTitle HelpURI
42 Export-Alias https://go.microsoft.com/fwlink/?LinkID=113296
43 Export-Clixml https://go.microsoft.com/fwlink/?LinkID=113297
44 Export-Console https://go.microsoft.com/fwlink/?LinkID=113298
Export-Counter https://go.microsoft.com/fwlink/?LinkID=138337
45 Export-Csv https://go.microsoft.com/fwlink/?LinkID=113299
46 Export-FormatData https://go.microsoft.com/fwlink/?LinkID=144302
47 Export-ModuleMember https://go.microsoft.com/fwlink/?LinkID=141551
58 Get-Command https://go.microsoft.com/fwlink/?LinkID=113309
59 Get-ComputerRestorePoint https://go.microsoft.com/fwlink/?LinkID=135215
60 Get-Content https://go.microsoft.com/fwlink/?LinkID=113310
Get-Counter https://go.microsoft.com/fwlink/?LinkID=138335
61 Get-Credential https://go.microsoft.com/fwlink/?LinkID=113311
62 Get-Culture https://go.microsoft.com/fwlink/?LinkID=113312
63 Get-Date https://go.microsoft.com/fwlink/?LinkID=113313
100 Group-Object https://go.microsoft.com/fwlink/?LinkID=113338
101 Import-Alias https://go.microsoft.com/fwlink/?LinkID=113339
102 Import-Clixml https://go.microsoft.com/fwlink/?LinkID=113340
Import-Counter https://go.microsoft.com/fwlink/?LinkID=138338
103 Import-Csv https://go.microsoft.com/fwlink/?LinkID=113341
104 Import-LocalizedData https://go.microsoft.com/fwlink/?LinkID=113342
105 Import-Module https://go.microsoft.com/fwlink/?LinkID=141553