Update copyright and license headers (#6134)
Based on standard practices, we need to have a copyright and license notice at the top of each source file. Removed existing copyrights and updated/added copyright notices for .h, .cpp, .cs, .ps1, and .psm1 files. Updated module manifests for consistency to have Author = "PowerShell" and Company = "Microsoft Corporation". Removed multiple line breaks. Separate PR coming to update contribution document for new source files: #6140 Manually reviewed each change. Fix #6073
This commit is contained in:
parent
0ad9fc9d70
commit
c1c5344a88
10
build.psm1
10
build.psm1
|
@ -1,3 +1,6 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
# On Unix paths is separated by colon
|
||||
# On Windows paths is separated by semicolon
|
||||
$script:TestModulePathSeparator = [System.IO.Path]::PathSeparator
|
||||
|
@ -873,7 +876,6 @@ function Get-PSOutput {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
function Get-PesterTag {
|
||||
param ( [Parameter(Position=0)][string]$testbase = "$PSScriptRoot/test/powershell" )
|
||||
$alltags = @{}
|
||||
|
@ -1362,7 +1364,6 @@ function Test-PSPesterResults
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
function Start-PSxUnit {
|
||||
[CmdletBinding()]param(
|
||||
[string] $SequentialTestResultsFile = "SequentialXUnitResults.xml",
|
||||
|
@ -1430,7 +1431,6 @@ function Start-PSxUnit {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
function Install-Dotnet {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
|
@ -1914,7 +1914,6 @@ function Start-ResGen
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
function Find-Dotnet() {
|
||||
$originalPath = $env:PATH
|
||||
$dotnetPath = if ($Environment.IsWindows) { "$env:LocalAppData\Microsoft\dotnet" } else { "$env:HOME/.dotnet" }
|
||||
|
@ -1972,7 +1971,6 @@ function Convert-TxtResourceToXml
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
function script:Use-MSBuild {
|
||||
# TODO: we probably should require a particular version of msbuild, if we are taking this dependency
|
||||
# msbuild v14 and msbuild v4 behaviors are different for XAML generation
|
||||
|
@ -1991,7 +1989,6 @@ function script:Use-MSBuild {
|
|||
Set-Alias msbuild $frameworkMsBuildLocation -Scope Script
|
||||
}
|
||||
|
||||
|
||||
function script:log([string]$message) {
|
||||
Write-Host -Foreground Green $message
|
||||
#reset colors for older package to at return to default after error message on a compilation error
|
||||
|
@ -2534,7 +2531,6 @@ function Restore-PSModule
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
$script:RESX_TEMPLATE = @'
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
#Region utility functions
|
||||
|
||||
$global:sudocmd = "sudo"
|
||||
|
@ -216,7 +219,6 @@ Function Restart-ApacheHTTPServer{
|
|||
|
||||
}
|
||||
|
||||
|
||||
Function Get-ApacheModule{
|
||||
$cmd = GetApacheCmd
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
Import-Module $PSScriptRoot/Apache/Apache.psm1
|
||||
|
||||
#list Apache Modules
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
### The techniques used in this demo are documented at
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
### The techniques used in this demo are documented at
|
||||
### https://azure.microsoft.com/en-us/documentation/articles/powershell-azure-resource-manager/
|
||||
|
||||
### Import AzureRM.Profile.NetCore.Preview and AzureRM.Resources.NetCore.Preview modules.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
#Get Distro type and set distro-specific variables
|
||||
$OSname = Get-Content "/etc/os-release" |Select-String -Pattern "^Name="
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
# This is a short example of the Docker-PowerShell module. The same cmdlets may be used to manage both local & remote machines, including both Windows & Linux hosts
|
||||
# The only difference between them is the example container image is pulled & run.
|
||||
|
||||
|
@ -26,4 +29,4 @@ Get-Container | Where-Object State -eq "exited" | Remove-Container
|
|||
Remove-ContainerImage hello-world
|
||||
|
||||
# And list the container images left on the container host
|
||||
Get-ContainerImage
|
||||
Get-ContainerImage
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
Function Get-SystemDJournal {
|
||||
[CmdletBinding()]
|
||||
param (
|
||||
|
@ -15,4 +18,4 @@ Function Get-SystemDJournal {
|
|||
{
|
||||
$Result
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
Import-Module $PSScriptRoot/SystemD/SystemD.psm1
|
||||
|
||||
#list recent journal events
|
||||
|
|
|
@ -13,10 +13,10 @@ CompatiblePSEditions = @('Core')
|
|||
GUID = '508bb97f-de2e-482e-aae2-01caec0be8c7'
|
||||
|
||||
# Author of this module
|
||||
Author = 'Microsoft'
|
||||
Author = 'PowerShell'
|
||||
|
||||
# Company or vendor of this module
|
||||
CompanyName = 'Unknown'
|
||||
CompanyName = 'Microsoft Corporation'
|
||||
|
||||
# Copyright statement for this module
|
||||
Copyright = 'Copyright (c) Microsoft Corporation. All rights reserved.'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
using namespace System.Collections.Generic
|
||||
using namespace System.Management.Automation
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
Import-Module $PSScriptRoot/CronTab/CronTab.psd1
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
# DSC MOF Compilation
|
||||
# DSC Configuration() script that:
|
||||
# Defines base configuration users, groups, settings
|
||||
|
@ -8,4 +11,4 @@
|
|||
# Show the .ps1
|
||||
# Run the .ps1 to generate a MOF
|
||||
# Apply the MOF locally with Start-DSCConfiguration
|
||||
# Show the newly configured state
|
||||
# Show the newly configured state
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#region find, install, update, uninstall the PowerShell scripts from an online repository.
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
#region find, install, update, uninstall the PowerShell scripts from an online repository.
|
||||
# Value: equivalent of pypi
|
||||
|
||||
# List of PowerShellGet commands
|
||||
|
@ -74,4 +77,4 @@ Set-PSRepository -Name "myPrivateGallery" -InstallationPolicy "Untrusted"
|
|||
# Remove a private feed
|
||||
Unregister-PSRepository -Name "myPrivateGallery"
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
#
|
||||
# Wrap Python script in such a way to make it easy to
|
||||
# consume from PowerShell
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
#
|
||||
# Demo simple interoperation between PowerShell and Python
|
||||
|
||||
|
@ -55,7 +58,6 @@ cat inline_python.ps1
|
|||
# and run it
|
||||
./inline_python
|
||||
|
||||
|
||||
####################################
|
||||
# cleanup
|
||||
rm hi
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
#
|
||||
# An example showing inline Python code in a PowerShell script
|
||||
#
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
#-----------------
|
||||
|
||||
function Get-Issue
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
Import-module -Name "$PSScriptRoot\containerTestCommon.psm1" -Force
|
||||
$script:linuxContainerTests = Get-LinuxContainer
|
||||
$script:windowsContainerTests = Get-WindowsContainer
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
$script:forcePull = $true
|
||||
# Get docker Engine OS
|
||||
function Get-DockerEngineOs
|
||||
|
@ -87,7 +90,6 @@ function Get-WindowsContainer
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
$script:repoName = 'microsoft/powershell'
|
||||
function Get-RepoName
|
||||
{
|
||||
|
@ -251,7 +253,6 @@ function Test-PSPackage
|
|||
$packageLocationStubName = 'PACKAGELOCATIONSTUB'
|
||||
$packageLocationStubValue = $PSPackageLocation
|
||||
|
||||
|
||||
$results = @{}
|
||||
$returnValue = $true
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Management.Automation;
|
||||
using System.Management.Automation.Runspaces;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System.Management.Automation;
|
||||
using System.Reflection;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Management.Automation;
|
||||
using System.Management.Automation.Runspaces;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System.Management.Automation;
|
||||
using System.Reflection;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Management.Automation;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
using System;
|
||||
|
@ -804,7 +802,6 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets
|
|||
/// </summary>
|
||||
internal const string ClassNameSessionSet = "ClassNameSessionSet";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// resource Uri session set name
|
||||
/// </summary>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
using Microsoft.Management.Infrastructure.Options;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
@ -11,7 +9,6 @@ using System.Collections.Generic;
|
|||
using System.Globalization;
|
||||
using System.Management.Automation;
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Microsoft.Management.Infrastructure.CimCmdlets
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
@ -416,7 +414,6 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="CimResultConte"/>
|
||||
/// </summary>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
using System.Management.Automation;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
@ -12,7 +10,6 @@ using System.Collections.Generic;
|
|||
|
||||
#endregion
|
||||
|
||||
|
||||
namespace Microsoft.Management.Infrastructure.CimCmdlets
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
@ -13,7 +11,6 @@ using System.Diagnostics.CodeAnalysis;
|
|||
|
||||
#endregion
|
||||
|
||||
|
||||
namespace Microsoft.Management.Infrastructure.CimCmdlets
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
using System;
|
||||
|
@ -10,7 +8,6 @@ using System.Diagnostics.CodeAnalysis;
|
|||
using System.Management.Automation;
|
||||
#endregion
|
||||
|
||||
|
||||
namespace Microsoft.Management.Infrastructure.CimCmdlets
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
using System;
|
||||
|
@ -11,7 +9,6 @@ using System.Diagnostics.CodeAnalysis;
|
|||
using System.Management.Automation;
|
||||
#endregion
|
||||
|
||||
|
||||
namespace Microsoft.Management.Infrastructure.CimCmdlets
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
using System;
|
||||
|
@ -11,7 +9,6 @@ using System.Diagnostics.CodeAnalysis;
|
|||
using System.Management.Automation;
|
||||
#endregion
|
||||
|
||||
|
||||
namespace Microsoft.Management.Infrastructure.CimCmdlets
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
using System;
|
||||
|
@ -11,7 +9,6 @@ using Microsoft.Management.Infrastructure.Options;
|
|||
|
||||
#endregion
|
||||
|
||||
|
||||
namespace Microsoft.Management.Infrastructure.CimCmdlets
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
using System;
|
||||
|
@ -12,7 +10,6 @@ using System.Management.Automation;
|
|||
using Microsoft.Management.Infrastructure.Options;
|
||||
#endregion
|
||||
|
||||
|
||||
namespace Microsoft.Management.Infrastructure.CimCmdlets
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
using System;
|
||||
|
@ -11,7 +9,6 @@ using System.Management.Automation;
|
|||
using Microsoft.PowerShell.Commands;
|
||||
#endregion
|
||||
|
||||
|
||||
namespace Microsoft.Management.Infrastructure.CimCmdlets
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
|
@ -12,7 +10,6 @@ using System.Management.Automation;
|
|||
|
||||
#endregion
|
||||
|
||||
|
||||
namespace Microsoft.Management.Infrastructure.CimCmdlets
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -64,7 +61,6 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets
|
|||
}
|
||||
private CimSession[] cimSession;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// The following is the definition of the input parameter "ResourceUri".
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
|
||||
using System;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#region Using directives
|
||||
using System;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/*============================================================================
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
*============================================================================
|
||||
*/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
// #define LOGENABLE // uncomment this line to enable the log,
|
||||
// create c:\temp\cim.log before invoking cimcmdlets
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Diagnostics;
|
||||
|
@ -87,11 +90,9 @@ namespace Microsoft.PowerShell.Commands.Diagnostics.Common
|
|||
[DllImport(LibraryLoadDllName)]
|
||||
private static extern bool FreeLibrary(IntPtr hModule);
|
||||
|
||||
|
||||
[DllImport(LocalizationDllName, EntryPoint = "GetUserDefaultLangID", CallingConvention = CallingConvention.Winapi, SetLastError = true)]
|
||||
private static extern ushort GetUserDefaultLangID();
|
||||
|
||||
|
||||
public static uint FormatMessageFromModule(uint lastError, string moduleName, out String msg)
|
||||
{
|
||||
Debug.Assert(!string.IsNullOrEmpty(moduleName));
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#if CORECLR
|
||||
using System.ComponentModel;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
@ -13,7 +11,6 @@ using Microsoft.Powershell.Commands.GetCounter.PdhNative;
|
|||
using System.Globalization;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Commands.GetCounter
|
||||
{
|
||||
public class PerformanceCounterSample
|
||||
|
@ -56,7 +53,6 @@ namespace Microsoft.PowerShell.Commands.GetCounter
|
|||
}
|
||||
private string _path = "";
|
||||
|
||||
|
||||
public string InstanceName
|
||||
{
|
||||
get { return _instanceName; }
|
||||
|
@ -64,7 +60,6 @@ namespace Microsoft.PowerShell.Commands.GetCounter
|
|||
}
|
||||
private string _instanceName = "";
|
||||
|
||||
|
||||
public double CookedValue
|
||||
{
|
||||
get { return _cookedValue; }
|
||||
|
@ -107,7 +102,6 @@ namespace Microsoft.PowerShell.Commands.GetCounter
|
|||
}
|
||||
private DateTime _timeStamp = DateTime.MinValue;
|
||||
|
||||
|
||||
public UInt64 Timestamp100NSec
|
||||
{
|
||||
get { return _timeStamp100nSec; }
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
@ -64,7 +63,6 @@ namespace Microsoft.PowerShell.Commands.GetCounter
|
|||
}
|
||||
private PerformanceCounterCategoryType _counterSetType;
|
||||
|
||||
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
|
@ -27,7 +25,6 @@ using Microsoft.Powershell.Commands.GetCounter.PdhNative;
|
|||
using Microsoft.PowerShell.Commands.GetCounter;
|
||||
using Microsoft.PowerShell.Commands.Diagnostics.Common;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
///
|
||||
|
@ -54,7 +51,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
private string _path;
|
||||
private string _resolvedPath;
|
||||
|
||||
|
||||
//
|
||||
// Format parameter.
|
||||
// Valid strings are "blg", "csv", "tsv" (case-insensitive).
|
||||
|
@ -73,8 +69,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
private string _format = "blg";
|
||||
|
||||
|
||||
|
||||
//
|
||||
// MaxSize parameter
|
||||
// Maximum output file size, in megabytes.
|
||||
|
@ -88,7 +82,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
private UInt32 _maxSize = 0;
|
||||
|
||||
|
||||
//
|
||||
// InputObject parameter
|
||||
//
|
||||
|
@ -109,7 +102,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
private PerformanceCounterSampleSet[] _counterSampleSets = new PerformanceCounterSampleSet[0];
|
||||
|
||||
|
||||
//
|
||||
// Force switch
|
||||
//
|
||||
|
@ -134,8 +126,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
private SwitchParameter _circular;
|
||||
|
||||
|
||||
|
||||
private ResourceManager _resourceMgr = null;
|
||||
|
||||
private PdhHelper _pdhHelper = null;
|
||||
|
@ -213,7 +203,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
_pdhHelper.Dispose();
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Handle Control-C
|
||||
///
|
||||
|
@ -279,7 +268,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
_queryInitialized = true;
|
||||
}
|
||||
|
||||
|
||||
foreach (PerformanceCounterSampleSet set in _counterSampleSets)
|
||||
{
|
||||
_pdhHelper.ResetRelogValues();
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
|
@ -27,7 +25,6 @@ using Microsoft.Powershell.Commands.GetCounter.PdhNative;
|
|||
using Microsoft.PowerShell.Commands.GetCounter;
|
||||
using Microsoft.PowerShell.Commands.Diagnostics.Common;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
///
|
||||
|
@ -59,7 +56,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
private string[] _listSet = { "*" };
|
||||
|
||||
|
||||
//
|
||||
// Counter parameter
|
||||
//
|
||||
|
@ -93,7 +89,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
|
||||
private List<string> _accumulatedCounters = new List<string>();
|
||||
|
||||
|
||||
//
|
||||
// SampleInterval parameter.
|
||||
// Defaults to 1 second.
|
||||
|
@ -111,7 +106,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
private int _sampleInterval = 1;
|
||||
|
||||
|
||||
//
|
||||
// MaxSamples parameter
|
||||
//
|
||||
|
@ -134,7 +128,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
private Int64 _maxSamples = 1;
|
||||
private bool _maxSamplesSpecified = false;
|
||||
|
||||
|
||||
//
|
||||
// Continuous switch
|
||||
//
|
||||
|
@ -146,7 +139,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
private bool _continuous = false;
|
||||
|
||||
|
||||
//
|
||||
// ComputerName parameter
|
||||
//
|
||||
|
@ -228,7 +220,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
if (Continuous.IsPresent && _maxSamplesSpecified)
|
||||
{
|
||||
Exception exc = new Exception(string.Format(CultureInfo.CurrentCulture, _resourceMgr.GetString("CounterContinuousOrMaxSamples")));
|
||||
|
@ -249,7 +240,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
_pdhHelper.Dispose();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Handle Control-C
|
||||
//
|
||||
|
@ -449,7 +439,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
_cultureAndSpecialCharacterMap.TryGetValue(culture.Name, out characterReplacementList);
|
||||
}
|
||||
|
||||
|
||||
StringCollection allExpandedPaths = new StringCollection();
|
||||
foreach (string path in paths)
|
||||
{
|
||||
|
@ -597,7 +586,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// CombineMachinesAndCounterPaths() helper.
|
||||
// For paths that do not contain machine names, creates a path for each machine in machineNames.
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
|
@ -73,7 +72,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
private string[] _logName = { "*" };
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ListProvider parameter
|
||||
/// </summary>
|
||||
|
@ -99,7 +97,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
private string[] _listProvider = { "*" };
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ProviderName parameter
|
||||
/// </summary>
|
||||
|
@ -123,7 +120,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
private string[] _providerName;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Path parameter
|
||||
/// </summary>
|
||||
|
@ -147,7 +143,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
private string[] _path;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// MaxEvents parameter
|
||||
/// </summary>
|
||||
|
@ -244,7 +239,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
private PSCredential _credential = PSCredential.Empty;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// FilterXPath parameter
|
||||
/// </summary>
|
||||
|
@ -294,7 +288,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
private XmlDocument _xmlQuery = null;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// FilterHashtable parameter
|
||||
/// </summary>
|
||||
|
@ -349,7 +342,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
private bool _oldest = false;
|
||||
|
||||
|
||||
//
|
||||
// Query builder constant strings
|
||||
//
|
||||
|
@ -404,7 +396,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
private const string hashkey_data_lc = "data";
|
||||
private const string hashkey_supress_lc = "suppresshashfilter";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// BeginProcessing() is invoked once per pipeline: we will load System.Core.dll here
|
||||
/// </summary>
|
||||
|
@ -413,7 +404,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
_resourceMgr = Microsoft.PowerShell.Commands.Diagnostics.Common.CommonUtilities.GetResourceManager();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// EndProcessing() is invoked once per pipeline
|
||||
/// </summary>
|
||||
|
@ -438,7 +428,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ProcessRecord() override.
|
||||
/// This is the main entry point for the cmdlet.
|
||||
|
@ -481,7 +470,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// AccumulatePipelineCounters() accumulates log names in the pipeline scenario:
|
||||
// we do not want to construct a query until all the log names are supplied.
|
||||
|
@ -540,7 +528,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Process GetProviderSet parameter set
|
||||
//
|
||||
|
@ -558,7 +545,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
EventLogQuery logQuery = null;
|
||||
if (_providersByLogMap.Count > 1)
|
||||
{
|
||||
|
@ -584,7 +570,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Process ListLog parameter set
|
||||
//
|
||||
|
@ -746,7 +731,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Process FileSet parameter set
|
||||
//
|
||||
|
@ -857,7 +841,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
return eventLogSession;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// ReadEvents helper.
|
||||
//
|
||||
|
@ -901,7 +884,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
outputObj.Properties.Add(new PSNoteProperty("Message", evtMessage));
|
||||
|
||||
|
||||
//
|
||||
// Enumerate the object one level to get to event payload
|
||||
//
|
||||
|
@ -918,8 +900,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// BuildStructuredQuery() builds a structured query from cmdlet arguments.
|
||||
//
|
||||
|
@ -1311,7 +1291,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
} //end foreach hashtable
|
||||
|
||||
|
||||
result.Append(queryListClose);
|
||||
|
||||
return result.ToString();
|
||||
|
@ -1444,7 +1423,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
return string.Format(CultureInfo.InvariantCulture, SystemSecurityTemplate, sidCandidate.ToString());
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// HandleStartTimeHashValue helper for hashtable structured query builder.
|
||||
// Constructs and returns TimeCreated XPath portion as a string.
|
||||
|
@ -1488,7 +1466,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
return ret.ToString();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// HandleEndTimeHashValue helper for hashtable structured query builder.
|
||||
// Constructs and returns TimeCreated XPath portion as a string.
|
||||
|
@ -1563,7 +1540,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
return ret.ToString();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// HandleNamedDataHashValue helper for hashtable structured query builder.
|
||||
// Constructs and returns named event data field XPath portion as a string.
|
||||
|
@ -1598,7 +1574,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
return ret.ToString();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Helper checking whether at least one of log, _path, provider is specified.
|
||||
// It will ThrowTerminatingError in case none of those keys are present.
|
||||
|
@ -1673,7 +1648,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// KeywordStringToInt64 helper converts a string to Int64.
|
||||
// Returns true and keyLong ref if successful.
|
||||
|
@ -1876,7 +1850,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// BuildProvidersPredicate() builds a predicate expression like:
|
||||
// "System/Provider[@Name='a' or @Name='b']"
|
||||
|
@ -1903,7 +1876,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
return predicate.ToString();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// BuildAllProvidersPredicate() builds a predicate expression like:
|
||||
// "System/Provider[@Name='a' or @Name='b']"
|
||||
|
@ -1948,7 +1920,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
return predicate.ToString();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// AddLogsForProviderToInternalMap helper.
|
||||
// Retrieves log names to which _providerName writes.
|
||||
|
@ -2130,4 +2101,3 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
|
@ -27,7 +25,6 @@ using Microsoft.Powershell.Commands.GetCounter.PdhNative;
|
|||
using Microsoft.PowerShell.Commands.GetCounter;
|
||||
using Microsoft.PowerShell.Commands.Diagnostics.Common;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
///
|
||||
|
@ -62,7 +59,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
|
||||
private List<string> _accumulatedFileNames = new List<string>();
|
||||
|
||||
|
||||
//
|
||||
// ListSet parameter
|
||||
//
|
||||
|
@ -84,7 +80,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
private string[] _listSet = new string[0];
|
||||
|
||||
|
||||
//
|
||||
// StartTime parameter
|
||||
//
|
||||
|
@ -100,7 +95,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
private DateTime _startTime = DateTime.MinValue;
|
||||
|
||||
|
||||
//
|
||||
// EndTime parameter
|
||||
//
|
||||
|
@ -116,7 +110,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
private DateTime _endTime = DateTime.MaxValue;
|
||||
|
||||
|
||||
//
|
||||
// Counter parameter
|
||||
//
|
||||
|
@ -165,14 +158,12 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
private Int64 _maxSamples = KEEP_ON_SAMPLING;
|
||||
|
||||
|
||||
private ResourceManager _resourceMgr = null;
|
||||
|
||||
private PdhHelper _pdhHelper = null;
|
||||
|
||||
private bool _stopping = false;
|
||||
|
||||
|
||||
//
|
||||
// AccumulatePipelineFileNames() accumulates counter file paths in the pipeline scenario:
|
||||
// we do not want to construct a Pdh query until all the file names are supplied.
|
||||
|
@ -182,7 +173,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
_accumulatedFileNames.AddRange(_path);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// BeginProcessing() is invoked once per pipeline
|
||||
//
|
||||
|
@ -241,7 +231,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
_pdhHelper.Dispose();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Handle Control-C
|
||||
//
|
||||
|
@ -251,7 +240,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
_pdhHelper.Dispose();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// ProcessRecord() override.
|
||||
// This is the main entry point for the cmdlet.
|
||||
|
@ -331,7 +319,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
continue;
|
||||
}
|
||||
|
||||
|
||||
StringCollection counterSetCounters = new StringCollection();
|
||||
StringCollection counterSetInstances = new StringCollection();
|
||||
|
||||
|
@ -508,7 +495,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// ValidateFilePaths() helper.
|
||||
// Validates the _resolvedPaths: present for all parametersets.
|
||||
|
@ -563,7 +549,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// ResolveFilePath helper.
|
||||
// Returns a string collection of resolved file paths.
|
||||
|
@ -674,4 +659,3 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Management.Automation;
|
||||
|
@ -30,7 +29,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
private const string DataTag = "data";
|
||||
private ResourceManager _resourceMgr = Microsoft.PowerShell.Commands.Diagnostics.Common.CommonUtilities.GetResourceManager();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ProviderName
|
||||
/// </summary>
|
||||
|
@ -73,7 +71,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
private int _id;
|
||||
private bool _idSpecified = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Version (event version)
|
||||
/// </summary>
|
||||
|
@ -95,7 +92,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
private byte _version;
|
||||
private bool _versionSpecified = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Event Payload
|
||||
/// </summary>
|
||||
|
@ -353,4 +349,4 @@ namespace Microsoft.PowerShell.Commands
|
|||
: base(msg)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
@ -105,8 +104,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
public const long PDH_QUERY_PERF_DATA_TIMEOUT = 0xC0000BFEL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
internal static class PerfDetail
|
||||
{
|
||||
public const uint PERF_DETAIL_NOVICE = 100; // The uninformed can understand it
|
||||
|
@ -203,7 +200,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
_isPreVista = isPreVista;
|
||||
}
|
||||
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||
private struct PDH_COUNTER_PATH_ELEMENTS
|
||||
{
|
||||
|
@ -274,7 +270,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
public UInt32 SampleCount;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
//
|
||||
// This is the structure returned by PdhGetCounterInfo().
|
||||
|
@ -304,7 +299,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
[FieldOffset(104)]public IntPtr DataBuffer;
|
||||
}*/
|
||||
|
||||
|
||||
[DllImport("pdh.dll", CharSet = CharSet.Unicode)]
|
||||
private static extern uint PdhBindInputDataSource(out PdhSafeDataSourceHandle phDataSource, string szLogFileNameList);
|
||||
|
||||
|
@ -347,7 +341,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
[DllImport("pdh.dll", CharSet = CharSet.Unicode)]
|
||||
private static extern void PdhResetRelogCounterValues(PdhSafeLogHandle LogHandle);
|
||||
|
||||
|
||||
//Win7+ only
|
||||
[DllImport("pdh.dll", CharSet = CharSet.Unicode)]
|
||||
private static extern uint PdhSetCounterValue(IntPtr CounterHandle,
|
||||
|
@ -396,7 +389,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
ref IntPtr pdwBufferSize,
|
||||
uint dwFlags);
|
||||
|
||||
|
||||
[DllImport("pdh.dll", CharSet = CharSet.Unicode)]
|
||||
private static extern uint PdhExpandWildCardPathH(PdhSafeDataSourceHandle hDataSource,
|
||||
string szWildCardPath,
|
||||
|
@ -427,11 +419,9 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
[DllImport("pdh.dll", CharSet = CharSet.Unicode)]
|
||||
private static extern uint PdhSetQueryTimeRange(PdhSafeQueryHandle hQuery, ref PDH_TIME_INFO pInfo);
|
||||
|
||||
|
||||
[DllImport("pdh.dll", CharSet = CharSet.Unicode)]
|
||||
private static extern uint PdhLookupPerfNameByIndex(string szMachineName, UInt32 dwNameIndex, IntPtr szNameBuffer, ref int pcchNameBufferSize);
|
||||
|
||||
|
||||
private PdhSafeDataSourceHandle _hDataSource = null;
|
||||
|
||||
private PdhSafeQueryHandle _hQuery = null;
|
||||
|
@ -468,7 +458,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
//
|
||||
private Dictionary<string, CounterHandleNInstance> _consumerPathToHandleAndInstanceMap = new Dictionary<string, CounterHandleNInstance>();
|
||||
|
||||
|
||||
//
|
||||
// m_ReloggerPathToHandleAndInstanceMap map is used for writing relog counters.
|
||||
//
|
||||
|
@ -504,8 +493,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
strColl.AddRange(allSubstringsWithNulls.Split('\0'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
private uint GetCounterInfoPlus(IntPtr hCounter, out UInt32 counterType, out UInt32 defaultScale, out UInt64 timeBase)
|
||||
{
|
||||
uint res = 0;
|
||||
|
@ -586,7 +573,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
return res;
|
||||
}
|
||||
|
||||
|
||||
public uint ConnectToDataSource(StringCollection blgFileNames)
|
||||
{
|
||||
if (blgFileNames.Count == 1)
|
||||
|
@ -635,7 +621,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
return res;
|
||||
}
|
||||
|
||||
|
||||
public uint SetQueryTimeRange(DateTime startTime, DateTime endTime)
|
||||
{
|
||||
Debug.Assert(_hQuery != null);
|
||||
|
@ -799,7 +784,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
{
|
||||
Debug.Assert(_hDataSource != null && !_hDataSource.IsInvalid, "Call ConnectToDataSource before GetValidPathsFromFiles");
|
||||
|
||||
|
||||
StringCollection machineNames = new StringCollection();
|
||||
uint res = this.EnumBlgFilesMachines(ref machineNames);
|
||||
if (res != 0)
|
||||
|
@ -894,7 +878,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private uint MakePath(PDH_COUNTER_PATH_ELEMENTS pathElts, out string outPath, bool bWildcardInstances)
|
||||
{
|
||||
outPath = "";
|
||||
|
@ -947,7 +930,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
return MakePath(elts, out unifiedPath, true);
|
||||
}
|
||||
|
||||
|
||||
private uint ParsePath(string fullPath, ref PDH_COUNTER_PATH_ELEMENTS pCounterPathElements)
|
||||
{
|
||||
IntPtr bufSize = new IntPtr(0);
|
||||
|
@ -1022,7 +1004,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
RegistryKey rootKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Perflib\\009");
|
||||
string[] regCounters = (string[])rootKey.GetValue("Counter");
|
||||
|
||||
|
||||
// NOTE: 1-based enumeration because the name strings follow index strings in the array
|
||||
Int32 counterIndex = -1;
|
||||
Int32 objIndex = -1;
|
||||
|
@ -1062,7 +1043,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
return (uint)PdhResults.PDH_INVALID_PATH;
|
||||
}
|
||||
|
||||
|
||||
// Now, call retrieve the localized names of the object and the counter by index:
|
||||
string objNameLocalized;
|
||||
res = LookupPerfNameByIndex(pathElts.MachineName, (uint)objIndex, out objNameLocalized);
|
||||
|
@ -1072,7 +1052,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
}
|
||||
pathElts.ObjectName = objNameLocalized;
|
||||
|
||||
|
||||
string ctrNameLocalized;
|
||||
res = LookupPerfNameByIndex(pathElts.MachineName, (uint)counterIndex, out ctrNameLocalized);
|
||||
if (res != 0)
|
||||
|
@ -1085,11 +1064,9 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
|
||||
res = MakePath(pathElts, out localizedPath, false);
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public uint LookupPerfNameByIndex(string machineName, uint index, out string locName)
|
||||
{
|
||||
//
|
||||
|
@ -1124,8 +1101,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public uint GetValidPaths(string machineName,
|
||||
string objectName,
|
||||
ref StringCollection counters,
|
||||
|
@ -1168,7 +1143,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
return res;
|
||||
}
|
||||
|
||||
|
||||
public uint AddCounters(ref StringCollection validPaths, bool bFlushOldCounters)
|
||||
{
|
||||
Debug.Assert(_hQuery != null && !_hQuery.IsInvalid);
|
||||
|
@ -1210,7 +1184,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
return bAtLeastOneAdded ? 0 : res;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// AddRelogCounters combines instances and adds counters to m_hQuery.
|
||||
// The counter handles and full paths
|
||||
|
@ -1325,8 +1298,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
return (_reloggerPathToHandleAndInstanceMap.Keys.Count > 0) ? 0 : res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// AddRelogCountersPreservingPaths preserves all paths and adds as relog counters to m_hQuery.
|
||||
// The counter handles and full paths are added to m_ReloggerPathToHandleAndInstanceMap
|
||||
|
@ -1534,7 +1505,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
return res;
|
||||
}
|
||||
|
||||
|
||||
public uint ReadNextSet(out PerformanceCounterSampleSet nextSet, bool bSkipReading)
|
||||
{
|
||||
Debug.Assert(_hQuery != null && !_hQuery.IsInvalid);
|
||||
|
@ -1658,7 +1628,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
fmtValueDouble.CStatus);
|
||||
}
|
||||
|
||||
|
||||
nextSet = new PerformanceCounterSampleSet(batchStamp, samplesArr, _firstReading);
|
||||
_firstReading = false;
|
||||
|
||||
|
@ -1677,7 +1646,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
return res;
|
||||
}
|
||||
|
||||
|
||||
public uint GetFilesSummary(out CounterFileInfo summary)
|
||||
{
|
||||
IntPtr pNumEntries = new IntPtr(0);
|
||||
|
@ -1770,7 +1738,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
rawStruct.TimeStamp.dwLowDateTime = (int)(new DateTime(sample.Timestamp.Ticks, DateTimeKind.Utc).ToFileTimeUtc() & 0xFFFFFFFFL);
|
||||
rawStruct.CStatus = sample.Status;
|
||||
|
||||
|
||||
return PdhSetCounterValue(_reloggerPathToHandleAndInstanceMap[lcPath].hCounter,
|
||||
ref rawStruct, /*PPDH_RAW_COUNTER */
|
||||
_reloggerPathToHandleAndInstanceMap[lcPath].InstanceName);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
@ -21,7 +20,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
|
||||
protected override bool ReleaseHandle()
|
||||
{
|
||||
|
@ -29,9 +27,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
internal sealed class PdhSafeQueryHandle : SafeHandle
|
||||
{
|
||||
private PdhSafeQueryHandle() : base(IntPtr.Zero, true) { }
|
||||
|
@ -44,7 +39,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
|
||||
protected override bool ReleaseHandle()
|
||||
{
|
||||
|
@ -64,7 +58,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
|
||||
protected override bool ReleaseHandle()
|
||||
{
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using Microsoft.Management.Infrastructure;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using Microsoft.Management.Infrastructure;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using Microsoft.Management.Infrastructure;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Management.Automation;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Microsoft.Management.Infrastructure;
|
||||
using Microsoft.PowerShell.Cim;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System.Management.Automation;
|
||||
using Microsoft.Management.Infrastructure;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using Microsoft.Management.Infrastructure;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
|
@ -398,7 +397,6 @@ namespace Microsoft.PowerShell.Cmdletization.Cim
|
|||
|
||||
operationOptions.SetOption("__MI_OPERATIONOPTIONS_IMPROVEDPERF_STREAMING", 1);
|
||||
|
||||
|
||||
operationOptions.Flags |= this.JobContext.CmdletInvocationContext.CmdletDefinitionContext.SchemaConformanceLevel;
|
||||
|
||||
if (this.JobContext.CmdletInvocationContext.CmdletDefinitionContext.ResourceUri != null)
|
||||
|
@ -524,7 +522,6 @@ namespace Microsoft.PowerShell.Cmdletization.Cim
|
|||
return _jobSpecificCustomOptions.Value;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Controlling job state
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Management.Automation;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -666,4 +665,4 @@ namespace Microsoft.PowerShell.Cim
|
|||
"Caller should verify that type is an intrinsic CIM type");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -52,7 +51,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
holder.PathInfo.Path,
|
||||
e);
|
||||
|
||||
|
||||
// Log a provider health event
|
||||
|
||||
MshLog.LogProviderHealthEvent(
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
using System;
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System.Management.Automation;
|
||||
using Dbg = System.Management.Automation;
|
||||
|
@ -77,7 +76,6 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A virtual method for retrieving the dynamic parameters for a cmdlet. Derived cmdlets
|
||||
/// that require dynamic parameters should override this method and return the
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Management.Automation;
|
||||
|
@ -173,6 +172,5 @@ namespace Microsoft.PowerShell.Commands
|
|||
} // ProcessRecord
|
||||
#endregion Command code
|
||||
|
||||
|
||||
} // ClearItemPropertyCommand
|
||||
} // namespace Microsoft.PowerShell.Commands
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue