Skip to content

Commit

Permalink
Update command name again
Browse files Browse the repository at this point in the history
  • Loading branch information
jennywu committed Jan 23, 2024
1 parent 239c8d5 commit c57aa81
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
Module Name: PnP.PowerShell
schema: 2.0.0
applicable: SharePoint Online
online version: https://pnp.github.io/powershell/cmdlets/Get-PnPSiteSetVPProgressExistingLibs.html
online version: https://pnp.github.io/powershell/cmdlets/Get-PnPSiteVPSettingProgressForExistingLibrary.html
external help file: PnP.PowerShell.dll-Help.xml
title: Get-PnPSiteSetVPProgressExistingLibs
title: Get-PnPSiteVPSettingProgressForExistingLibrary
---

# Get-PnPSiteSetVPProgressExistingLibs
# Get-PnPSiteVPSettingProgressForExistingLibrary

## SYNOPSIS
Get the progress of setting version policy for existing document libraries on the site.

## SYNTAX

```powershell
Get-PnPSiteSetVPProgressExistingLibs [-Connection <PnPConnection>]
Get-PnPSiteVPSettingProgressForExistingLibrary [-Connection <PnPConnection>]
```

## DESCRIPTION
Expand All @@ -25,7 +25,7 @@ This cmdlet allows retrieval of the progress of setting version policy for exist

### EXAMPLE 1
```powershell
Get-PnPSiteSetVPProgressExistingLibs
Get-PnPSiteVPSettingProgressForExistingLibrary
```

Returns the progress of setting version policy for existing document libraries on the site.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
Module Name: PnP.PowerShell
schema: 2.0.0
applicable: SharePoint Online
online version: https://pnp.github.io/powershell/cmdlets/Get-PnPSiteVersionPolicyForNewLibs.html
online version: https://pnp.github.io/powershell/cmdlets/Get-PnPSiteVersionPolicyForNewLibrary.html
external help file: PnP.PowerShell.dll-Help.xml
title: Get-PnPSiteVersionPolicyForNewLibs
title: Get-PnPSiteVersionPolicyForNewLibrary
---

# Get-PnPSiteVersionPolicyForNewLibs
# Get-PnPSiteVersionPolicyForNewLibrary

## SYNOPSIS
Get version policy setting of the site.

## SYNTAX

```powershell
Get-PnPSiteVersionPolicyForNewLibs [-Connection <PnPConnection>]
Get-PnPSiteVersionPolicyForNewLibrary [-Connection <PnPConnection>]
```

## DESCRIPTION
Expand All @@ -26,7 +26,7 @@ If the version policy is not set on the site, the setting of the tenant will be

### EXAMPLE 1
```powershell
Get-PnPSiteVersionPolicyForNewLibs
Get-PnPSiteVersionPolicyForNewLibrary
```

Returns the version policy setting of the site.
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/Site/GetSetVersionPolicyProgress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace PnP.PowerShell.Commands.Site
{
[Cmdlet(VerbsCommon.Get, "PnPSiteSetVPProgressExistingLibs")]
[Cmdlet(VerbsCommon.Get, "PnPSiteVPSettingProgressForExistingLibrary")]
[OutputType(typeof(PnP.PowerShell.Commands.Model.SharePoint.SetVersionPolicyProgressClient))]
public class GetSetVersionPolicyProgress : PnPSharePointCmdlet
{
Expand Down
10 changes: 5 additions & 5 deletions src/Commands/Site/GetSiteVersionPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace PnP.PowerShell.Commands.Site
{
[Cmdlet(VerbsCommon.Get, "PnPSiteVersionPolicyForNewLibs")]
[Cmdlet(VerbsCommon.Get, "PnPSiteVersionPolicyForNewLibrary")]
[OutputType(typeof(PnP.PowerShell.Commands.Model.SharePoint.SiteVersionPolicy))]
public class GetSiteVersionPolicy : PnPSharePointCmdlet
{
Expand All @@ -22,7 +22,7 @@ protected override void ExecuteCmdlet()

if (site.VersionPolicyForNewLibrariesTemplate.MajorVersionLimit == -1)
{
vp.Description = "No Site Level Policy Set";
vp.Description = "No Site Level Policy Set for new libraries";
}
else
{
Expand All @@ -32,18 +32,18 @@ protected override void ExecuteCmdlet()

if (site.VersionPolicyForNewLibrariesTemplate.VersionPolicies.DefaultTrimMode == VersionPolicyTrimMode.AutoExpiration)
{
vp.Description = "Site has Automatic Policy Set";
vp.Description = "Site has Automatic Policy Set for new libraries";
}
else
{
if (site.VersionPolicyForNewLibrariesTemplate.VersionPolicies.DefaultTrimMode == VersionPolicyTrimMode.ExpireAfter)
{
vp.DefaultExpireAfterDays = site.VersionPolicyForNewLibrariesTemplate.VersionPolicies.DefaultExpireAfterDays.ToString();
vp.Description = "Site has Manual settings with specific count and time limits";
vp.Description = "Site has Manual settings with specific count and time limits for new libraries";
}
else if (site.VersionPolicyForNewLibrariesTemplate.VersionPolicies.DefaultTrimMode == VersionPolicyTrimMode.NoExpiration)
{
vp.Description = "Site has Manual settings with specific version count limit and no time limits";
vp.Description = "Site has Manual settings with specific version count limit and no time limits for new libraries";
}
vp.MajorVersionLimit = site.VersionPolicyForNewLibrariesTemplate.MajorVersionLimit.ToString();
}
Expand Down
6 changes: 3 additions & 3 deletions src/Commands/Site/SetSite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ protected override void ExecuteCmdlet()
site.EnsureProperty(s => s.VersionPolicyForNewLibrariesTemplate);
site.VersionPolicyForNewLibrariesTemplate.InheritTenantSettings();
context.ExecuteQueryRetry();
WriteWarning("The setting for new libraries takes effect immediately. Please run Get-PnPSiteVersionPolicyForNewLibs to display the newly set values.");
WriteWarning("The setting for new libraries takes effect immediately. Please run Get-PnPSiteVersionPolicyForNewLibrary to display the newly set values.");
}
else
{
Expand Down Expand Up @@ -368,7 +368,7 @@ protected override void ExecuteCmdlet()
}
}

WriteWarning("The setting for new libraries takes effect immediately. Please run Get-PnPSiteVersionPolicyForNewLibs to display the newly set values.");
WriteWarning("The setting for new libraries takes effect immediately. Please run Get-PnPSiteVersionPolicyForNewLibrary to display the newly set values.");
}

if (!(ParameterSpecified(nameof(ApplyForNewLibs)) &&
Expand All @@ -387,7 +387,7 @@ protected override void ExecuteCmdlet()
context.ExecuteQueryRetry();
}

WriteWarning("The setting for existing libraries takes at least 24 hours to take effect. Please run Get-PnPSiteSetVPProgressExistingLibs to check the progress.");
WriteWarning("The setting for existing libraries takes at least 24 hours to take effect. Please run Get-PnPSiteVPSettingProgressForExistingLibrary to check the progress.");
}
}
else
Expand Down

0 comments on commit c57aa81

Please sign in to comment.