-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Example Script, and upped version
Added Get-AllTenants-AutoPilotDevices and upped version
- Loading branch information
Showing
9 changed files
with
332 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Add-CIPPSharePointSite | ||
## SYNOPSIS | ||
Adds a new SharePoint site to the specified customer tenant. | ||
## DESCRIPTION | ||
The Add-CIPPSharePointSite function creates a new SharePoint site with the specified parameters. | ||
It supports different site designs and templates. | ||
# PARAMETERS | ||
|
||
## **-CustomerTenantID** | ||
>   \ | ||
The ID of the customer tenant where the SharePoint site will be added. This parameter is mandatory. | ||
|
||
## **-DisplayName** | ||
>   \ | ||
The display name of the SharePoint site. This parameter is mandatory. | ||
|
||
## **-Description** | ||
>   \ | ||
The description of the SharePoint site. This parameter is mandatory. | ||
|
||
## **-Owner** | ||
>   \ | ||
The owner of the SharePoint site. Should be a valid user principal name (UPN). This parameter is mandatory. | ||
|
||
## **-SiteDesign** | ||
>   \ | ||
The design of the SharePoint site. Valid values are 'Topic', 'Showcase', 'Blank', and 'Custom'. The default value is 'Showcase'. This parameter is optional. | ||
|
||
## **-TemplateName** | ||
>   \ | ||
The template of the SharePoint site. Valid values are 'Communication' and 'Team'. The default value is 'Communication'. This parameter is optional. | ||
|
||
#### EXAMPLE 1 | ||
```powershell | ||
PS > Add-CIPPSharePointSite -CustomerTenantID "166cc908-10b2-405f-a00b-03006c430c9c" -DisplayName "Project Site" -Description "Site for project collaboration" -Owner "owner@domain.com" | ||
``` | ||
#### EXAMPLE 2 | ||
```powershell | ||
PS > Add-CIPPSharePointSite -CustomerTenantID "domain.com" -DisplayName "Project Site" -Description "Site for project collaboration" -Owner "owner@domain.com" | ||
``` | ||
|
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,36 @@ | ||
# Add-CIPPTeam | ||
## SYNOPSIS | ||
Adds a new team site to the specified customer tenant. | ||
## DESCRIPTION | ||
The Add-CIPPTeam function creates a new team site in the specified customer tenant using the provided display name, description, visibility, and owner. | ||
# PARAMETERS | ||
|
||
## **-CustomerTenantID** | ||
>   \ | ||
The ID of the customer tenant where the team site will be added. Can be the tenant ID or default domain name. | ||
|
||
## **-DisplayName** | ||
>   \ | ||
The display name of the new team site. | ||
|
||
## **-Description** | ||
>   \ | ||
A description for the new team site. | ||
|
||
## **-Visibility** | ||
>   \ | ||
The visibility setting for the new team site (e.g., Public or Private). | ||
|
||
## **-Owner** | ||
>   \ | ||
The owner of the new team site. Should be a valid user principal name (UPN) with a teams license assigned. | ||
|
||
#### EXAMPLE 1 | ||
```powershell | ||
PS > Add-CIPPTeam -CustomerTenantID "9d606831-a394-4d1a-b508-260f428807a4" -DisplayName "Engineering Team" -Description "Team for engineering department" -Visibility "Private" -Owner "john.doe@example.com" | ||
``` | ||
#### EXAMPLE 2 | ||
```powershell | ||
PS > Add-CIPPTeam -CustomerTenantID "exampleTenant.onmicrosoft.com" -DisplayName "Marketing Team" -Description "Team for marketing department" -Visibility "Public" -Owner "Jane.doe@example.com" | ||
``` | ||
|
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,119 @@ | ||
# New-CIPPUserOffboarding | ||
## SYNOPSIS | ||
Offboards a user from a specified customer tenant. | ||
## DESCRIPTION | ||
The New-CIPPUserOffboarding function automates the offboarding process for a user in a specified customer tenant. | ||
It provides various options to customize the offboarding process, including forwarding emails, converting the mailbox | ||
to a shared mailbox, disabling sign-in, removing licenses, and more. It is also possible to schedule the offboarding for a later date. | ||
# PARAMETERS | ||
|
||
## **-CustomerTenantID** | ||
>   \ | ||
The ID of the customer tenant from which the user is being offboarded. This parameter is mandatory. | ||
|
||
## **-User** | ||
>   \ | ||
The username of the user being offboarded. UserPrincipalName(UPN) should be used. This parameter is mandatory. | ||
|
||
## **-OutOfOffice** | ||
>   \ | ||
Sets an out-of-office message for the user. This parameter is optional. | ||
|
||
## **-ForwardTo** | ||
>   \ | ||
Forwards the user's emails to another address. This parameter is optional. | ||
|
||
## **-ForwardKeepCopyInMailbox** | ||
>   \ | ||
Keeps a copy of forwarded emails in the user's mailbox. This parameter is optional. | ||
|
||
## **-OnedriveAccessTo** | ||
>   \ | ||
Grants access to the user's OneDrive to another user. UserPrincipalName(UPN) should be used. This parameter is optional. | ||
|
||
## **-MailboxAccessNoAutomap** | ||
>   \ | ||
Grants access to the user's mailbox without automapping. UserPrincipalName(UPN) should be used. This parameter is optional. | ||
|
||
## **-MailboxAccessAutomap** | ||
>   \ | ||
Grants access to the user's mailbox with automapping. UserPrincipalName(UPN) should be used. This parameter is optional. | ||
|
||
## **-ConvertToSharedMailbox** | ||
>   \ | ||
Converts the user's mailbox to a shared mailbox. This parameter is optional. | ||
|
||
## **-HideFromGAL** | ||
>   \ | ||
Hides the user from the Global Address List (GAL). This parameter is optional. | ||
|
||
## **-DisableSignIn** | ||
>   \ | ||
Disables sign-in for the user. This parameter is optional. | ||
|
||
## **-DeleteUser** | ||
>   \ | ||
Deletes the user account. This parameter is optional. | ||
|
||
## **-RemoveFromAllGroups** | ||
>   \ | ||
Removes the user from all groups. This parameter is optional. | ||
|
||
## **-CancelAllCalendarInvites** | ||
>   \ | ||
Cancels all calendar invites for the user. This parameter is optional. | ||
|
||
## **-RemoveAllLicenses** | ||
>   \ | ||
Removes all licenses assigned to the user. This parameter is optional. | ||
|
||
## **-ResetPassword** | ||
>   \ | ||
Resets the user's password. This parameter is optional. | ||
|
||
## **-RevokeAllSessions** | ||
>   \ | ||
Revokes all active sessions for the user. This parameter is optional. | ||
|
||
## **-RemoveAllMailboxRules** | ||
>   \ | ||
Removes all mailbox rules for the user. This parameter is optional. | ||
|
||
## **-RemoveAllMobileDevices** | ||
>   \ | ||
Removes all mobile devices associated with the user. This parameter is optional. | ||
|
||
## **-RemoveAllMailboxPermissions** | ||
>   \ | ||
Removes all mailbox permissions for the user. This parameter is optional. | ||
|
||
## **-ScheduledFor** | ||
>   \ | ||
Specifies the date and time when the user should be added. If not specified, the user will be offboarded immediately. Input should be a valid datetime object. Will be converted to Unix time. This parameter is optional. | ||
|
||
## **-SendResultsToEmail** | ||
>   \ | ||
Specifies whether to send the results of the scheduled task to the email address specified in the notification settings of your CIPP instance. This parameter is optional. | ||
|
||
## **-SendResultsToPSA** | ||
>   \ | ||
Specifies whether to send the results of the scheduled task to the PSA system specified in the notification settings of your CIPP instance. This parameter is optional. | ||
|
||
## **-SendResultsToWebhook** | ||
>   \ | ||
Specifies whether to send the results of the scheduled task to the webhook specified in the notification settings of your CIPP instance. This parameter is optional. | ||
|
||
#### EXAMPLE 1 | ||
```powershell | ||
PS > New-CIPPUserOffboarding -CustomerTenantID "8ad00f9e-1953-47d1-897b-8fec4138cde7" -User "jdoe@domain.com" -DisableSignIn -RemoveAllLicenses -ConvertToSharedMailbox | ||
This example immediately offboards the user "jdoe@domain.com" from the customer tenant with ID "8ad00f9e-1953-47d1-897b-8fec4138cde7", disables sign-in, removes all licenses, and converts the user's mailbox to a shared mailbox. | ||
``` | ||
#### EXAMPLE 2 | ||
```powershell | ||
PS > New-CIPPUserOffboarding -CustomerTenantID "8ad00f9e-1953-47d1-897b-8fec4138cde7" -User "jane.doe@domain.com" -DeleteUser -ScheduledFor ((Get-Date).AddDays(7)) -SendResultsToEmail | ||
This example schedules the offboarding of the user "jane.doe@domain.com" from the customer tenant with ID "8ad00f9e-1953-47d1-897b-8fec4138cde7" for 7 days from the current date. | ||
The results of the scheduled task will be sent to the email address specified in the notification settings of your CIPP instance. | ||
``` | ||
|
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,25 @@ | ||
# Remove-CIPPUser | ||
## SYNOPSIS | ||
Removes a user from a specified tenant. | ||
## DESCRIPTION | ||
The Remove-CIPPUser function deletes a user identified by their UserID from a specified tenant identified by the CustomerTenantID. | ||
It sends a request to the '/api/RemoveUser' endpoint to perform the deletion. | ||
# PARAMETERS | ||
|
||
## **-CustomerTenantID** | ||
>   \ | ||
The ID of the tenant from which the user will be removed. This parameter is mandatory. | ||
|
||
## **-User** | ||
>   \ | ||
The unique identifier (GUID) or UserPrincipalName(UPN) of the user to be removed. This parameter is mandatory. | ||
|
||
#### EXAMPLE 1 | ||
```powershell | ||
PS > Remove-CIPPUser -CustomerTenantID "tenant123.domain.com" -UserID "e7402930-efc9-4ba8-a959-ae7fc6c15021" | ||
``` | ||
#### EXAMPLE 2 | ||
```powershell | ||
PS > Remove-CIPPUser -CustomerTenantID "3939eb14-06b3-4287-aea7-defe129c6741" -UserID "user@domaion.com" | ||
``` | ||
|
Oops, something went wrong.