< Back

New-AzureServiceDiagnosticsExtensionConfig

Wed Jan 30, 2019 5:48 pm

NAME New-AzureServiceDiagnosticsExtensionConfig



SYNOPSIS

Generates a configuration for a diagnostics extension for specified role(s) or all roles.





SYNTAX

New-AzureServiceDiagnosticsExtensionConfig [[-Role] <String[]>] [[-X509Certificate] <X509Certificate2>] [[-ThumbprintAlgorithm] <String>]

[[-StorageAccountName] <String>] [[-StorageAccountKey] <String>] [[-StorageAccountEndpoint] <String>] [[-StorageContext] <AzureStorageContext>]

[-DiagnosticsConfigurationPath] <String> [[-ExtensionId] <String>] [-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>]

[-InformationVariable <String>] [<CommonParameters>]



New-AzureServiceDiagnosticsExtensionConfig [[-Role] <String[]>] [-CertificateThumbprint] <String> [[-ThumbprintAlgorithm] <String>]

[[-StorageAccountKey] <String>] [[-StorageAccountEndpoint] <String>] [[-StorageContext] <AzureStorageContext>] [-DiagnosticsConfigurationPath] <String>

[[-ExtensionId] <String>] [-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]



New-AzureServiceDiagnosticsExtensionConfig [[-StorageAccountName] <String>] [-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>]

[-InformationVariable <String>] [<CommonParameters>]





DESCRIPTION

The New-AzureServiceDiagnosticsExtensionConfig cmdlet generates a configuration for a diagnostics extension for specified roles or all roles.





PARAMETERS

-Role <String[]>

Specifies an optional array of roles to specify the diagnostics configuration for. If not specified the diagnostics configuration is applied as the

default configuration for all roles.



Required? false

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-X509Certificate <X509Certificate2>

Specifies an X.509 certificate that is automatically uploaded to the cloud service and used for encrypting the extension private configuration.



Required? false

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ThumbprintAlgorithm <String>

Specifies a thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default

is sha1.



Required? false

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-StorageAccountName <String>





Required? false

Position? 3

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-StorageAccountKey <String>





Required? false

Position? 4

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-StorageAccountEndpoint <String>





Required? false

Position? 5

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-StorageContext <AzureStorageContext>

Specifies an Azure storage context.



Required? false

Position? 6

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DiagnosticsConfigurationPath <String>

Specifies the diagnostics configuration path.



Required? true

Position? 7

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ExtensionId <String>





Required? false

Position? 8

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Profile <AzureSMProfile>

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationAction <ActionPreference>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationVariable <String>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-CertificateThumbprint <String>

Specifies a certificate thumbprint to use to encrypt the private configuration. This certificate has to already exist in the certificate store. If

you do not specify a certificate, this cmdlet creates a certificate.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES









-------------------------- Example 1: Create the Azure Diagnostics extension for all roles in the cloud service --------------------------



PS C:\\>$WadConfig = New-AzureServiceDiagnosticExtensionConfig -StorageContext $StorageContext -DiagnosticsConfigurationPath $WadConfigXML



This command creates the Azure Diagnostics extension for all of the roles in the cloud service.

-------------------------- Example 2: Create the Azure Diagnostics extension for a role --------------------------



PS C:\\>$WadConfig = New-AzureServiceDiagnosticExtensionConfig -StorageContext $StorageContext -DiagnosticsConfigurationPath $WadConfigXML -Role

"WebRole1"



This command creates the Azure Diagnostics extension for the role WebRole01 in the cloud service.



RELATED LINKS

Get-AzureServiceDiagnosticsExtension

Set-AzureServiceDiagnosticsExtension