-
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.
Merge pull request #1 from BNWEIN/Dev
Upped Version
- Loading branch information
Showing
25 changed files
with
542 additions
and
4 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,18 @@ | ||
function Get-CIPPAccessCheck { | ||
[CmdletBinding()] | ||
Param( | ||
[Parameter(Mandatory = $true)] | ||
[string[]]$CustomerTenantID | ||
) | ||
|
||
Write-Verbose "Running tenant access check for $CustomerTenantID" | ||
$Endpoint = "/api/execaccesschecks" | ||
|
||
$params = @{ | ||
tenants = "true" | ||
} | ||
$body = @{ | ||
tenantid = $CustomerTenantID | ||
} | ||
Invoke-CIPPRestMethod -Endpoint $Endpoint -Body $body -Params $params -Method POST | ||
} |
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,22 @@ | ||
function Set-CIPPExecCPVPerms { | ||
[CmdletBinding()] | ||
Param( | ||
[Parameter(Mandatory = $true)] | ||
[guid]$CustomerTenantID, | ||
[Parameter(Mandatory = $false)] | ||
[ValidateSet( | ||
"true", | ||
"false" | ||
)] | ||
[string]$resetsp = "false" | ||
) | ||
|
||
Write-Verbose "Refreshing CPV for $CustomerTenantID" | ||
$endpoint = "/api/execcpvpermissions" | ||
$params = @{ | ||
tenantfilter = $CustomerTenantID | ||
ResetSP = $resetsp | ||
} | ||
Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params | ||
} | ||
|
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,28 @@ | ||
function Set-CIPPCopyToSent { | ||
[CmdletBinding()] | ||
Param( | ||
[Parameter(Mandatory = $true)] | ||
[string]$CustomerTenantID, | ||
[Parameter(Mandatory = $true)] | ||
[string]$UserID, | ||
[Parameter(Mandatory = $false)] | ||
[ValidateSet( | ||
"true", | ||
"false" | ||
)] | ||
[string]$MessageCopyForSentAsEnabled = "true" | ||
) | ||
|
||
|
||
Write-Verbose "Copy Sent Items to Shared Mailbox for $userID $MessageCopyForSentAsEnabled" | ||
|
||
$endpoint = "/api/execcopyforsent" | ||
$params = @{ | ||
tenantfilter = $CustomerTenantID | ||
id = $UserID | ||
MessageCopyForSentAsEnabled = $MessageCopyForSentAsEnabled | ||
} | ||
|
||
Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params | ||
} | ||
|
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,20 @@ | ||
function Set-CIPPEnableArchive { | ||
[CmdletBinding()] | ||
Param( | ||
[Parameter(Mandatory = $true)] | ||
[string]$CustomerTenantID, | ||
[Parameter(Mandatory = $true)] | ||
[string]$UserID | ||
) | ||
|
||
|
||
Write-Verbose "Enabling Email Archive for $userID" | ||
|
||
$endpoint = "/api/execenablearchive" | ||
$params = @{ | ||
tenantfilter = $CustomerTenantID | ||
id = $UserID | ||
} | ||
|
||
Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params | ||
} |
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,26 @@ | ||
function Set-CIPPHideFromGAL { | ||
param ( | ||
[Parameter(Mandatory = $true)] | ||
[string]$CustomerTenantID, | ||
[Parameter(Mandatory = $true)] | ||
[string]$UserID, | ||
[Parameter(Mandatory = $true)] | ||
[validateset( | ||
'true', | ||
'false' | ||
)] | ||
[string]$hidefromgal | ||
) | ||
|
||
Write-Verbose "Setting hide from GAL to $hidefromgal for $UserID" | ||
|
||
$endpoint = "/api/exechidefromgal" | ||
$params = @{ | ||
tenantfilter = $CustomerTenantID | ||
id = $UserID | ||
hidefromgal = $hidefromgal | ||
} | ||
|
||
Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params | ||
|
||
} |
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,40 @@ | ||
function Set-CIPPMailboxMobileDevices { | ||
[CmdletBinding()] | ||
Param( | ||
[Parameter(Mandatory = $true)] | ||
[string]$CustomerTenantID, | ||
[Parameter(Mandatory = $false)] | ||
[string]$DeviceID, | ||
[Parameter(Mandatory = $true)] | ||
[string]$UserID, | ||
[Parameter(Mandatory = $false)] | ||
[ValidateSet("true", "False")] | ||
[string]$Quarantine, | ||
[Parameter(Mandatory = $false)] | ||
[ValidateSet("true", "False")] | ||
[string]$Delete = "False", | ||
[Parameter(Mandatory = $false)] | ||
[guid]$DeviceGUID | ||
) | ||
|
||
Write-Verbose "Editing Mobile Device for $UserID" | ||
$endpoint = "/api/execmailboxmobiledevices" | ||
if ($Quarantine) { | ||
$params = @{ | ||
tenantfilter = $CustomerTenantID | ||
DeviceID = $DeviceID | ||
Userid = $UserID | ||
Quarantine = $Quarantine | ||
} | ||
} else { | ||
$params = @{ | ||
tenantfilter = $CustomerTenantID | ||
Userid = $UserID | ||
Delete = $Delete | ||
GUID = $DeviceGUID | ||
} | ||
} | ||
|
||
Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params | ||
} | ||
|
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,33 @@ | ||
function Set-CIPPQuarantineManagement { | ||
[CmdletBinding()] | ||
Param( | ||
[Parameter(Mandatory = $true)] | ||
[string]$CustomerTenantID, | ||
[Parameter(Mandatory = $true)] | ||
[string]$ID, | ||
[Parameter(Mandatory = $false)] | ||
[ValidateSet( | ||
'true', | ||
'false' | ||
)] | ||
[string]$AllowSender, | ||
[Parameter(Mandatory = $true)] | ||
[ValidateSet( | ||
'Deny', | ||
'Release, | ||
')] | ||
[string]$Type | ||
|
||
) | ||
|
||
Write-Verbose "Managing Quarentine for $CustomerTenantID" | ||
$endpoint = "/api/execquarantinemanagement" | ||
$params = @{ | ||
tenantfilter = $CustomerTenantID | ||
id = $ID | ||
allowSender = $AllowSender | ||
type = $Type | ||
} | ||
|
||
Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params | ||
} |
25 changes: 25 additions & 0 deletions
25
public/Identity/Administration/Groups/Remove-CIPPGroup.ps1
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 @@ | ||
function Remove-CIPPGroup { | ||
param ( | ||
[Parameter(Mandatory = $true)] | ||
[string]$CustomerTenantID, | ||
[Parameter(Mandatory = $true)] | ||
[guid]$GroupID, | ||
[Parameter(Mandatory = $true)] | ||
[string]$Grouptype, | ||
[Parameter(Mandatory = $true)] | ||
[string]$DisplayName | ||
) | ||
|
||
Write-Verbose "Removing group: $GroupID" | ||
|
||
$endpoint = "/api/execgroupsdelete" | ||
$params = @{ | ||
tenantfilter = $CustomerTenantID | ||
id = $GroupID | ||
grouptype = $Grouptype | ||
displayname = $DisplayName | ||
} | ||
|
||
Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
public/Identity/Administration/Groups/Set-CIPPGroupDeliveryManagement.ps1
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 @@ | ||
function Set-CIPPGroupDeliveryManagement { | ||
param ( | ||
[Parameter(Mandatory = $true)] | ||
[string]$CustomerTenantID, | ||
[Parameter(Mandatory = $true)] | ||
[guid]$GroupID, | ||
[Parameter(Mandatory = $true)] | ||
[validateset( | ||
'Distribution List', | ||
'Mail-Enabled Security', | ||
'Microsoft 365' | ||
)] | ||
[string]$Grouptype, | ||
[Parameter(Mandatory = $true)] | ||
[validateset( | ||
'true', | ||
'false' | ||
)] | ||
[string]$onlyallowinternal | ||
) | ||
|
||
Write-Verbose "Setting delivery management for group: $GroupID" | ||
|
||
$endpoint = "/api/execgroupsdeliverymanagement" | ||
$params = @{ | ||
tenantfilter = $CustomerTenantID | ||
id = $GroupID | ||
grouptype = $Grouptype | ||
onlyallowinternal = $onlyallowinternal | ||
} | ||
|
||
Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
public/Identity/Administration/Groups/Set-CIPPGroupHideFromGAL.ps1
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,35 @@ | ||
function Set-CIPPGroupHideFromGAL { | ||
param ( | ||
[Parameter(Mandatory = $true)] | ||
[string]$CustomerTenantID, | ||
[Parameter(Mandatory = $true)] | ||
[guid]$GroupID, | ||
[Parameter(Mandatory = $true)] | ||
[validateset( | ||
'Distribution List', | ||
'Mail-Enabled Security', | ||
'Microsoft 365', | ||
'Security' | ||
)] | ||
[string]$Grouptype, | ||
[Parameter(Mandatory = $true)] | ||
[validateset( | ||
'true', | ||
'false' | ||
)] | ||
[string]$hidefromgal | ||
) | ||
|
||
Write-Verbose "Setting hide from GAL to $hidefromgal for $GroupID" | ||
|
||
$endpoint = "/api/execgroupshidefromgal" | ||
$params = @{ | ||
tenantfilter = $CustomerTenantID | ||
id = $GroupID | ||
grouptype = $Grouptype | ||
hidefromgal = $hidefromgal | ||
} | ||
|
||
Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
public/Identity/Administration/Users/Get-CIPPUniversalSearch.ps1
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,16 @@ | ||
function Get-CIPPUniversalSearch { | ||
[CmdletBinding()] | ||
Param( | ||
[Parameter(Mandatory = $true)] | ||
[string]$Name | ||
) | ||
|
||
Write-Verbose "Searching for $Name" | ||
|
||
$endpoint = "/api/execuniversalsearch" | ||
$params = @{ | ||
name = $Name | ||
} | ||
Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params | ||
} | ||
|
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,19 @@ | ||
function Send-CIPPPush { | ||
[CmdletBinding()] | ||
Param( | ||
[Parameter(Mandatory = $true)] | ||
[string]$CustomerTenantID, | ||
[Parameter(Mandatory = $true)] | ||
[string]$UserEmail | ||
) | ||
|
||
Write-Verbose "Sending Push Notification to $UserEmail" | ||
|
||
$endpoint = "/api/execsendpush" | ||
$params = @{ | ||
tenantfilter = $CustomerTenantID | ||
Useremail = $UserEmail | ||
} | ||
Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params | ||
} | ||
|
19 changes: 19 additions & 0 deletions
19
public/Identity/Administration/Users/Set-CIPPCreateTap.ps1
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,19 @@ | ||
function Set-CIPPCreateTap { | ||
[CmdletBinding()] | ||
Param( | ||
[Parameter(Mandatory = $true)] | ||
[string]$CustomerTenantID, | ||
[Parameter(Mandatory = $true)] | ||
[string]$UserID | ||
) | ||
|
||
Write-Verbose "Creating TAP for User: $userID" | ||
|
||
$endpoint = "/api/execcreatetap" | ||
$params = @{ | ||
tenantfilter = $CustomerTenantID | ||
Id = $UserID | ||
} | ||
Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params | ||
} | ||
|
27 changes: 27 additions & 0 deletions
27
public/Identity/Administration/Users/Set-CIPPResetPassword.ps1
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,27 @@ | ||
function Set-CIPPResetPassword { | ||
[CmdletBinding()] | ||
Param( | ||
[Parameter(Mandatory = $true)] | ||
[string]$CustomerTenantID, | ||
[Parameter(Mandatory = $true)] | ||
[string]$UserID, | ||
[Parameter(Mandatory = $false)] | ||
[ValidateSet( | ||
"true", | ||
"false" | ||
)] | ||
[string]$MustChange = "true" | ||
|
||
) | ||
|
||
Write-Verbose "Resetting password for $UserID" | ||
|
||
$endpoint = "/api/execresetpass" | ||
$params = @{ | ||
tenantfilter = $CustomerTenantID | ||
Id = $UserID | ||
MustChange = $MustChange | ||
} | ||
Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params | ||
} | ||
|
Oops, something went wrong.