編集

次の方法で共有


Set-NetworkControllerDiagnostic

Changes diagnostic settings for the Network Controller.

Syntax

Default (Default)

Set-NetworkControllerDiagnostic
    [-LogScope <LogScope>]
    [-DiagnosticLogLocation <String>]
    [-LogLocationCredential <PSCredential>]
    [-UseLocalLogLocation]
    [-LogTimeLimitInDays <UInt32>]
    [-LogSizeLimitInMBs <UInt32>]
    [-LogLevel <LogLevel>]
    [-PassThru]
    [-Force]
    [-ComputerName <String>]
    [-UseSsl]
    [-Credential <PSCredential>]
    [-CertificateThumbprint <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-NetworkControllerDiagnostic cmdlet changes diagnostic settings for the Network Controller. You can specify whether to collect logs locally on the nodes, or in a single central remote ___location. You can specify the central ___location and credentials to access that ___location. You can specify whether to collect all logs or only cluster logs.

Examples

Example 1: Modify diagnostic settings

PS C:\> Set-NetworkControllerDiagnostic -LogScope All -UseLocalLogLocation -PassThru
LogScope               : All
DiagnosticLogLocation  :

This command changes the ___location for diagnostic logs to be the Network Controller nodes. The command also starts logging both cluster and application logs.

Parameters

-CertificateThumbprint

Specifies the digital public key X.509 certificate of a user account that has permission to perform this action. Specify the certificate thumbprint of the certificate. Specify this parameter only if you run this cmdlet on a computer that is not part of the Network Controller cluster.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ComputerName

Specifies the name of the Network Controller node on which this cmdlet operates.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Credential

Specifies a user credential that has permission to perform this action. The default is the current user. Specify this parameter only if you run this cmdlet on a computer that is not part of the Network Controller cluster.

Parameter properties

Type:PSCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DiagnosticLogLocation

Specifies a central remote ___location for the logs.

If you do not specify a value for this parameter, the logs are stored locally on each node. Application logs are stored locally in the %systemdrive%\Windows\tracing\SDNDiagnostics folder. Cluster logs are stored locally in %systemdrive%\ProgramData\Microsoft\Service Fabric\log\Traces folder.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Forces the command to run without asking for user confirmation.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LogLevel

Specifies the level of the log.The acceptable values for this parameter are:

  • Error
  • Warning
  • Informational
  • Verbose

The default value is Verbose.

Parameter properties

Type:LogLevel
Default value:None
Accepted values:Error, Warning, Informational, Verbose
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LogLocationCredential

Specifies the credentials required to access the log ___location. Specify this parameter only if the log ___location restricts access.

Parameter properties

Type:PSCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LogScope

Specifies whether Network Controller collects cluster logs or collects all logs. All logs include cluster and application logs. The acceptable values for this parameter are: Cluster and All.

Parameter properties

Type:LogScope
Default value:None
Accepted values:Cluster, All
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LogSizeLimitInMBs

Specifies the maximum log size, in MB, to store. Logs are stored in a circular fashion. . If the DiagnosticLogLocation parameter is provided, the default value of this parameter is 40 GB. If DiagnosticLogLocation is not provided, the logs are stored on the Network Controller nodes and the default value of this parameter is 15 GB.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LogTimeLimitInDays

Specifies the duration, in days, that logs are stored. Logs are stored in a circular fashion. The default value of this parameter is 3 days.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UseLocalLogLocation

Indicates that this cmdlet collects all diagnostic logs locally on each node in the Network Controller cluster. To collect logs centrally in a remote ___location, specify the DiagnosticLogLocation parameter.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UseSsl

Indicates that the remote computer uses the Secure Sockets Layer (SSL) protocol to establish a connection to the Network Controller node. The default value of this parameter is $False. Specify this parameter only if you run this cmdlet on a computer that is not part of the Network Controller cluster.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

Object

This cmdlet returns an object that contains the following fields:

  • Log scope
  • Diagnostic log ___location
  • Log aging size limit in MBs
  • Log aging time limit in days
  • Log level