Changes diagnostic settings for the Network Controller.
Networking / Security · Risk: High · Documentation Verified
Last verified: 2026-10-26
Microsoft NetworkController reference: Changes diagnostic settings for the Network Controller. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Use an account with the target resource permissions documented for Set-NetworkControllerDiagnostic. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Supported environments
Windows / NetworkController · Windows Server 2025 documentation; feature/module prerequisites apply
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.
-ComputerName
Specifies the name of the Network Controller node on which this cmdlet operates.
-Confirm
Prompts you for confirmation before running the cmdlet.
-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.
-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.
-Force
Forces the command to run without asking for user confirmation.
-LogLevel
Specifies the level of the log.The acceptable values for this parameter are: - Error - Warning - Informational - Verbose The default value is Verbose.
-LogLocationCredential
Specifies the credentials required to access the log location. Specify this parameter only if the log location restricts access.
-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.
-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.
-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.
-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
-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.
-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.
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Prerequisites
Windows with the NetworkController module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
Security considerations
This cmdlet changes system state. Review every target and parameter in the official reference, test outside production, and prepare an appropriate backup or rollback. Do not execute the example automatically.
Examples
Example 1: Modify diagnostic settings
Set-NetworkControllerDiagnostic -LogScope All -UseLocalLogLocation -PassThru
This command changes the location for diagnostic logs to be the Network Controller nodes. The command also starts logging both cluster and application logs. Source: Microsoft, CC BY 4.0; transcript prompt/output removed. This example was not executed.