|
17 | 17 |
|
18 | 18 | namespace SharePointPnP.PowerShell.Commands.Provisioning.Tenant
|
19 | 19 | {
|
20 |
| - [Cmdlet("Apply", "PnPTenantTemplate", SupportsShouldProcess = true)] |
21 |
| - [Alias("Apply-PnPProvisioningHierarchy")] |
| 20 | + [Cmdlet(VerbsCommon.Set, "PnPTenantTemplate", SupportsShouldProcess = true)] |
| 21 | + [Alias("Apply-PnPTenantTemplate", "Apply-PnPProvisioningHierarchy")] |
22 | 22 | [CmdletHelp("Applies a tenant template to the current tenant. You must be a SharePoint Online global administrator to run the cmdlet.",
|
23 | 23 | Category = CmdletHelpCategory.Provisioning, SupportedPlatform = CmdletSupportedPlatform.Online)]
|
24 | 24 | [CmdletExample(
|
25 |
| - Code = @"PS:> Apply-PnPTenantTemplate -Path myfile.pnp", |
| 25 | + Code = @"PS:> Set-PnPTenantTemplate -Path myfile.pnp", |
26 | 26 | Remarks = "Will read the tenant template from the filesystem and will apply the sequences in the template",
|
27 | 27 | SortOrder = 1)]
|
28 | 28 | [CmdletExample(
|
29 |
| - Code = @"PS:> Apply-PnPTenantTemplate -Path myfile.pnp -SequenceId ""mysequence""", |
| 29 | + Code = @"PS:> Set-PnPTenantTemplate -Path myfile.pnp -SequenceId ""mysequence""", |
30 | 30 | Remarks = "Will read the tenant template from the filesystem and will apply the specified sequence in the template",
|
31 | 31 | SortOrder = 1)]
|
32 | 32 | [CmdletExample(
|
33 |
| - Code = @"PS:> Apply-PnPTenantTemplate -Path myfile.pnp -Parameters @{""ListTitle""=""Projects"";""parameter2""=""a second value""}", |
| 33 | + Code = @"PS:> Set-PnPTenantTemplate -Path myfile.pnp -Parameters @{""ListTitle""=""Projects"";""parameter2""=""a second value""}", |
34 | 34 | Remarks = @"Applies a tenant template to the current tenant. It will populate the parameter in the template the values as specified and in the template you can refer to those values with the {parameter:<key>} token.
|
35 | 35 |
|
36 | 36 | For instance with the example above, specifying {parameter:ListTitle} in your template will translate to 'Projects' when applying the template. These tokens can be used in most string values in a template.",
|
37 | 37 | SortOrder = 3)]
|
38 |
| - public class ApplyTenantTemplate : PnPAdminCmdlet |
| 38 | + public class SetTenantTemplate : PnPAdminCmdlet |
39 | 39 | {
|
40 | 40 | private const string ParameterSet_PATH = "By Path";
|
41 | 41 | private const string ParameterSet_OBJECT = "By Object";
|
@@ -90,7 +90,11 @@ protected override void ExecuteCmdlet()
|
90 | 90 | {
|
91 | 91 | if (MyInvocation.InvocationName.ToLower() == "apply-pnpprovisioninghierarchy")
|
92 | 92 | {
|
93 |
| - WriteWarning("Apply-PnPProvisioningHierarchy has been deprecated. Use Apply-PnPTenantTemplate instead."); |
| 93 | + WriteWarning("Apply-PnPProvisioningHierarchy has been deprecated. Use Set-PnPTenantTemplate instead."); |
| 94 | + } |
| 95 | + if (MyInvocation.InvocationName.ToLower() == "apply-pnptenanttemplate") |
| 96 | + { |
| 97 | + WriteWarning("Apply-PnPTenantTemplate has been deprecated. Use Set-PnPTenantTemplate instead."); |
94 | 98 | }
|
95 | 99 |
|
96 | 100 | var sitesProvisioned = new List<ProvisionedSite>();
|
|
0 commit comments