This repository has been archived by the owner on Jan 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 662
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2771 from KoenZomers/RenameUnifiedGroupToMicrosof…
…t365Group Renamed UnifiedGroup cmdlets to Microsoft365Group
- Loading branch information
Showing
15 changed files
with
143 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#if !ONPREMISES && !NETSTANDARD2_1 | ||
using OfficeDevPnP.Core.Framework.Graph; | ||
using SharePointPnP.PowerShell.CmdletHelpAttributes; | ||
using SharePointPnP.PowerShell.Commands.Base; | ||
using SharePointPnP.PowerShell.Commands.Base.PipeBinds; | ||
using System.Management.Automation; | ||
|
||
namespace SharePointPnP.PowerShell.Commands.Graph | ||
{ | ||
[Cmdlet(VerbsCommon.Reset, "PnPMicrosoft365GroupExpiration")] | ||
[Alias("Reset-PnPUnifiedGroupExpiration")] | ||
[CmdletHelp("Renews the Microsoft 365 Group by extending its expiration with the number of days defined in the group expiration policy set on the Azure Active Directory", | ||
DetailedDescription = "Renews the Microsoft 365 Group by extending its expiration with the number of days defined in the group expiration policy set on the Azure Active Directory", | ||
Category = CmdletHelpCategory.Graph, | ||
SupportedPlatform = CmdletSupportedPlatform.Online)] | ||
[CmdletExample( | ||
Code = "PS:> Reset-PnPMicrosoft365GroupExpiration", | ||
Remarks = "Renews the Microsoft 365 Group by extending its expiration with the number of days defined in the group expiration policy set on the Azure Active Directory", | ||
SortOrder = 1)] | ||
[CmdletRelatedLink(Text = "Documentation", Url = "https://docs.microsoft.com/graph/api/group-renew")] | ||
[CmdletMicrosoftGraphApiPermission(MicrosoftGraphApiPermission.Directory_ReadWrite_All | MicrosoftGraphApiPermission.Group_ReadWrite_All)] | ||
public class ResetMicrosoft365GroupExpiration : PnPGraphCmdlet | ||
{ | ||
[Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The Identity of the Microsoft 365 Group")] | ||
public Microsoft365GroupPipeBind Identity; | ||
|
||
protected override void ExecuteCmdlet() | ||
{ | ||
var group = Identity.GetGroup(AccessToken); | ||
UnifiedGroupsUtility.RenewUnifiedGroup(group.GroupId, AccessToken); | ||
} | ||
} | ||
} | ||
#endif |
Oops, something went wrong.