Skip to main content

Invoke-CPCReprovision

SYNOPSIS​

Reprovision a Cloud PC

SYNTAX​

Invoke-CPCReprovision -Name <String> [-OsVersion <String>] [-UserAccountType <String>]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION​

The function will reprovision a Cloud PC using the Microsoft Graph v1.0 API. Optionally override the OS version (Windows 10 or 11) and the user account type (standard user or local administrator) for the reprovisioned Cloud PC.

EXAMPLES​

EXAMPLE 1​

Invoke-CPCReprovision -Name "CloudPC01"

EXAMPLE 2​

Invoke-CPCReprovision -Name "CloudPC01" -OsVersion windows11 -UserAccountType standardUser

PARAMETERS​

-Name​

Enter the Cloud PC display name

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OsVersion​

Optional. The operating system version to provision. Valid values: 'windows10', 'windows11'. When omitted the tenant/policy default is used.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserAccountType​

Optional. The local account type for the user on the reprovisioned Cloud PC. Valid values: 'standardUser', 'administrator'. When omitted the tenant/policy default is used.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf​

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

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm​

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction​

Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by Write-Progress.

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters​

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

INPUTS​

OUTPUTS​

NOTES​

API reference: https://learn.microsoft.com/en-us/graph/api/cloudpc-reprovision