Share via


Set-SmaAdminConfiguration

Modifies administrative configuration settings in SMA.

Syntax

Default (Default)

Set-SmaAdminConfiguration
    [-Telemetry <Boolean>]
    [-DrainTimeInSeconds <Int32>]
    [-ScriptExecutionPolicy <String>]
    [-MaxJobRecords <Int32>]
    [-PurgeJobsOlderThanCountDays <Int32>]
    [-Force]
    [-ChartTimeSliceSampleSize <ChartTimeSliceSampleSize>]
    -WebServiceEndpoint <String>
    [-Port <Int32>]
    [-AuthenticationType <String>]
    [-Credential <PSCredential>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-SmaAdminConfiguration cmdlet modifies administration configuration settings in Service Management Automation (SMA). Specify the web service endpoint and, if necessary, a port.

Use this cmdlet to configure the following settings:

  • Whether to share diagnostic and usage data with Microsoft
  • Drain time
  • Script execution policy
  • Chart time slice sample size
  • The maximum job records to store before purging the oldest jobs
  • The maximum age of a job before it is purged

Examples

Example 1: Modify an administrative configuration setting

PS C:\> Set-SmaAdminConfiguration -WebServiceEndpoint "https://contoso.com/app01" -DrainTimeInSeconds 60

This command sets the drain time to 60 seconds.

Parameters

-AuthenticationType

Specifies the authentication type. Valid values are:

  • Basic
  • Windows

The default value for this parameter is Windows. If you use Basic authentication, you must provide credentials by using the Credential parameter.

Parameter properties

Type:String
Default value:None
Accepted values:Basic, Windows
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

-ChartTimeSliceSampleSize

Specifies the chart time slice sample size. Valid values are:

  • Small
  • Medium
  • Large
  • ExtraLarge

Parameter properties

Type:ChartTimeSliceSampleSize
Default value:None
Accepted values:Small, Medium, Large, ExtraLarge
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 PSCredential object for the connection to the SMA web service. To obtain a credential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential.

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

-DrainTimeInSeconds

Specifies the time, in seconds, after which the runbook worker hosts terminate running jobs after a runbook worker service stop has been initiated. While the host is draining, existing jobs are given the specified drain time seconds to suspend or terminate naturally, and no new jobs are accepted.

Parameter properties

Type:Int32
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

-MaxJobRecords

Specifies the maximum number of job records that are retained.

Parameter properties

Type:Int32
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

-Port

Specifies the port number of the SMA web service.

Parameter properties

Type:Int32
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

-PurgeJobsOlderThanCountDays

Specifies the number of days job history is kept. Jobs older than this value are purged.

Parameter properties

Type:Int32
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

-ScriptExecutionPolicy

Determines the Windows PowerShell execution policy for runbook jobs on the worker hosts. For information about execution policies, type Get-Help about_Execution_Policies. Valid values for this parameter are:

  • Restricted. You cannot run scripts. You can use Windows PowerShell only in interactive mode.
  • AllSigned. You can run only scripts signed by a trusted publisher.
  • RemoteSigned. Downloaded scripts must be signed by a trusted publisher before you can run the scripts.
  • Unrestricted. No restrictions; you can run all Windows PowerShell scripts.

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

-Telemetry

Indicates whether to share diagnostic and usage data with Microsoft. The acceptable values for this parameter are:

  • $True. Share diagnostic and usage data with Microsoft.
  • $False. Do not share diagnostic and usage data with Microsoft.

Parameter properties

Type:Boolean
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

-WebServiceEndpoint

Specifies the endpoint, as a URL, of the SMA web service. You must include the protocol, for example, http:// or https://.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:True
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.