Initialize-CafTenant
Initializes the whole tenant by performing all CAF setup actions in sequence.
Syntax
Initialize-CafTenant
[-DeploymentFileName <string>]
[-DeploymentParameterFileName <string>]
[-DeploymentTechType <string>]
[-DevOpsConnectionType <string>]
[-DoNotEnsureDeployGroup]
[-ForceAssetDownload]
[-RunClearStaleRoleAssignments]
[-RunCspInitialization]
[-RunDevOpsInitialization]
[-SkipServicePrincipalsInitialization]
[-SkipSubscriptionsInitialization]
[-WhatIf]
Description
Calls the other CAF initialization functions in sequence to initialize the complete tenant. By default runs subscription initialization and service principal initialization. Stale role assignment cleanup, Azure DevOps service connection initialization, and CSP initialization are opt-in via their respective switches.
Example
Initialize-CafTenant -WhatIf
Parameter
-DeploymentFileName The name of the Bicep or Terraform deployment file for subscriptions.
| Property | Value |
|---|---|
| Type: | string |
| Default value: | "main.bicep" |
| Required: | False |
-DeploymentParameterFileName The name of the Bicep or Terraform parameter file for subscriptions.
| Property | Value |
|---|---|
| Type: | string |
| Default value: | "main.bicepparam" |
| Required: | False |
-DeploymentTechType The deployment technology to use for subscription initialization.
| Property | Value |
|---|---|
| Type: | string |
| Allowed values: | ["bicep", "terraform"] |
| Default value: | "bicep" |
| Required: | False |
-DevOpsConnectionType
The type of Azure DevOps service connection to create. Only used when -RunDevOpsInitialization is specified.
| Property | Value |
|---|---|
| Type: | string |
| Allowed values: | ["secretBased", "federated"] |
| Default value: | "federated" |
| Required: | False |
-DoNotEnsureDeployGroup
If provided, skips calling Initialize-CafDeploymentSpGroup after service principal creation.
| Property | Value |
|---|---|
| Type: | SwitchParameter |
| Default value: | False |
| Required: | False |
-ForceAssetDownload
If specified, forces re-download of deployment assets even if they already exist locally.
| Property | Value |
|---|---|
| Type: | SwitchParameter |
| Default value: | False |
| Required: | False |
-RunClearStaleRoleAssignments
If specified, executes Remove-CafStaleRoleAssignments as part of the initialization.
| Property | Value |
|---|---|
| Type: | SwitchParameter |
| Default value: | False |
| Required: | False |
-RunCspInitialization
If specified, executes Initialize-CafCsp as part of the initialization.
| Property | Value |
|---|---|
| Type: | SwitchParameter |
| Default value: | False |
| Required: | False |
-RunDevOpsInitialization
If specified, executes Initialize-CafAdoServiceConnections as part of the initialization.
| Property | Value |
|---|---|
| Type: | SwitchParameter |
| Default value: | False |
| Required: | False |
-SkipServicePrincipalsInitialization
If specified, skips the service principal initialization step.
| Property | Value |
|---|---|
| Type: | SwitchParameter |
| Default value: | False |
| Required: | False |
-SkipSubscriptionsInitialization
If specified, skips the subscription initialization step.
| Property | Value |
|---|---|
| Type: | SwitchParameter |
| Default value: | False |
| Required: | False |
-WhatIf
If specified, only simulates all actions without making any changes.
| Property | Value |
|---|---|
| Type: | SwitchParameter |
| Default value: | False |
| Required: | False |