From 829789122c6a1d3f3afc1e9fd70f86084d07ff86 Mon Sep 17 00:00:00 2001 From: BNWEIN Date: Mon, 17 Jun 2024 09:27:43 +0100 Subject: [PATCH 1/2] Small updates Small updates --- .gitignore | 3 ++- CIPPAPIModule.psd1 | 2 +- public/Tenant/Tools/Get-CIPPAuditLogTest.ps1 | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 14d29f0..74d020b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /[Oo]utput -/.vscode \ No newline at end of file +/.vscode +/.localonly \ No newline at end of file diff --git a/CIPPAPIModule.psd1 b/CIPPAPIModule.psd1 index 56467fd..763a4d2 100644 --- a/CIPPAPIModule.psd1 +++ b/CIPPAPIModule.psd1 @@ -101,7 +101,7 @@ PrivateData = @{ # LicenseUri = '' # A URL to the main website for this project. - # ProjectUri = '' + ProjectUri = 'https://github.com/BNWEIN/CIPPAPIModule/' # A URL to an icon representing this module. # IconUri = '' diff --git a/public/Tenant/Tools/Get-CIPPAuditLogTest.ps1 b/public/Tenant/Tools/Get-CIPPAuditLogTest.ps1 index 74877a5..145b059 100644 --- a/public/Tenant/Tools/Get-CIPPAuditLogTest.ps1 +++ b/public/Tenant/Tools/Get-CIPPAuditLogTest.ps1 @@ -4,10 +4,11 @@ function Get-CIPPAuditLogTest { [Parameter(Mandatory = $true)] [string]$CustomerTenantId, [Parameter(Mandatory = $true)] + [validateset('Audit.Exchange','Audit.AzureActiveDirectory')] [string]$LogType ) - Write-Verbose "Looking up audit logs for tenant $CustomerTenantId of type $LogType" + Write-Verbose "Looking up $LogType logs for tenant $CustomerTenantId" $endpoint = "/api/ListAuditLogTest" $params = @{ TenantFilter = $CustomerTenantId From 3953e06a9e09badea0832105ac4ba91091010b6e Mon Sep 17 00:00:00 2001 From: BNWEIN Date: Mon, 17 Jun 2024 15:47:48 +0100 Subject: [PATCH 2/2] Added docs for all functions Reorganised, and updated docs for all functions --- .../CIPPAPIModule.psd1 | 2 +- .../CIPPAPIModule.psm1 | 0 CIPPAPIModule/private/Connect-CIPP.ps1 | 46 ++ CIPPAPIModule/private/Get-TokenExpiry.ps1 | 34 + .../private}/Invoke-CIPPPreFlightCheck.ps1 | 14 + .../public/CIPP/Core/Get-CIPPAccessCheck.ps1 | 33 + .../Core/Get-CIPPExecAPIPermissionsList.ps1 | 26 + .../public/CIPP/Core/Get-CIPPKnownIPDB.ps1 | 40 ++ .../public/CIPP/Core/Get-CIPPLogs.ps1 | 25 + .../CIPP/Core/Get-CIPPPublicPhishingCheck.ps1 | 29 + .../public/CIPP/Core/Set-CIPPExecCPVPerms.ps1 | 42 ++ .../public/CIPP/Settings/Get-CIPPVersion.ps1 | 24 + .../Email-Exchange/Add-CIPPContact.ps1 | 27 + .../Email-Exchange/Get-CIPPCalendarPerms.ps1 | 36 ++ .../Email-Exchange/Get-CIPPContacts.ps1 | 44 ++ .../Get-CIPPEnabledSharedMailboxes.ps1 | 29 + .../Get-CIPPExchangeConnectorTemplates.ps1 | 25 + .../Get-CIPPExchangeConnectors.ps1 | 30 + .../Email-Exchange/Get-CIPPMailQuarantine.ps1 | 29 + .../Get-CIPPMailboxMobileDevices.ps1 | 35 ++ .../Get-CIPPMailboxPermissions.ps1 | 37 ++ .../Get-CIPPMailboxRestores.ps1 | 54 ++ .../Email-Exchange/Get-CIPPMailboxRules.ps1 | 30 + .../Get-CIPPMailboxStatistics.ps1 | 29 + .../Email-Exchange/Get-CIPPMailboxes.ps1 | 29 + .../Email-Exchange/Get-CIPPMessageTrace.ps1 | 57 ++ .../Email-Exchange/Get-CIPPOutOfOffice.ps1 | 35 ++ .../Email-Exchange/Get-CIPPPhishPolicies.ps1 | 29 + .../Email-Exchange/Get-CIPPRecipients.ps1 | 29 + .../Email-Exchange/Get-CIPPSpamFilter.ps1 | 29 + .../Get-CIPPSpamFilterTemplates.ps1 | 29 + .../Email-Exchange/Get-CIPPTransportRules.ps1 | 29 + .../Get-CIPPUserMailboxDetails.ps1 | 37 ++ .../Get-CIPPUserMailboxRules.ps1 | 37 ++ .../Set-CIPPCalendarPermissions.ps1 | 85 +++ .../Email-Exchange/Set-CIPPConvertMailbox.ps1 | 47 ++ .../Email-Exchange/Set-CIPPCopyToSent.ps1 | 49 ++ .../Email-Exchange/Set-CIPPEnableArchive.ps1 | 39 ++ .../Email-Exchange/Set-CIPPExchConnector.ps1 | 51 ++ .../Email-Exchange/Set-CIPPHideFromGAL.ps1 | 50 ++ .../Set-CIPPMailboxMobileDevices.ps1 | 76 +++ .../Set-CIPPMailboxPermissions.ps1 | 41 ++ .../Set-CIPPQuarantineManagement.ps1 | 57 ++ .../Email-Exchange/Set-CIPPSpamFilter.ps1 | 53 ++ .../Email-Exchange/Set-CIPPTransportRule.ps1 | 48 ++ .../Endpoint/Applications/Get-CIPPApps.ps1 | 31 + .../Endpoint/Autopilot/Get-CIPPAPDevices.ps1 | 31 + .../Autopilot/Get-CIPPAutoPilotConfig.ps1 | 46 ++ .../public/Endpoint/MEM/Set-CIPPMEMPolicy.ps1 | 56 ++ .../Endpoint/Reports/Get-CIPPDevices.ps1 | 39 ++ .../Identity/Administration/Get-CIPPRoles.ps1 | 29 + .../Groups/Get-CIPPGroupTemplates.ps1 | 40 ++ .../Administration/Groups/Get-CIPPGroups.ps1 | 83 +++ .../Groups/Remove-CIPPGroup.ps1 | 24 + .../Set-CIPPGroupDeliveryManagement.ps1 | 59 ++ .../Groups/Set-CIPPGroupHideFromGAL.ps1 | 63 ++ .../Administration/Users/Add-CIPPUser.ps1 | 150 +++++ .../Administration/Users/Get-CIPPBECCheck.ps1 | 61 ++ .../Users/Get-CIPPDeletedItems.ps1 | 32 + .../Users/Get-CIPPUniversalSearch.ps1 | 31 + .../Users/Get-CIPPUserCAPolicies.ps1 | 37 ++ .../Users/Get-CIPPUserCounts.ps1 | 30 + .../Users/Get-CIPPUserDevices.ps1 | 37 ++ .../Users/Get-CIPPUserGroups.ps1 | 37 ++ .../Users/Get-CIPPUserPhoto.ps1 | 38 ++ .../Users/Get-CIPPUserSignIns.ps1 | 37 ++ .../Administration/Users/Get-CIPPUsers.ps1 | 42 ++ .../Administration/Users/Send-CIPPPush.ps1 | 36 ++ .../Administration/Users/Set-CIPPClrImmID.ps1 | 38 ++ .../Users/Set-CIPPCreateTap.ps1 | 36 ++ .../Users/Set-CIPPResetPassword.ps1 | 46 ++ .../Users/Set-CIPPRestoreDeletedUser.ps1 | 37 ++ .../Users/Set-CIPPRevokeSessions.ps1 | 38 ++ .../Users/Set-CIPPSignInStatus.ps1 | 55 ++ .../Administration/Users/Set-CIPPUser.ps1 | 78 +++ .../Identity/Reports/Get-CIPPBasicAuth.ps1 | 29 + .../Reports/Get-CIPPInactiveAccounts.ps1 | 30 + .../Identity/Reports/Get-CIPPMFAUsers.ps1 | 29 + .../Identity/Reports/Get-CIPPSignIns.ps1 | 47 ++ .../Intune/Device/Get-CIPPGetBitLockerKey.ps1 | 39 ++ .../Intune/Device/Get-CIPPIntuneIntents.ps1 | 37 ++ .../Intune/Device/Get-CIPPIntunePolicy.ps1 | 54 ++ .../Intune/Device/Get-CIPPIntuneTemplates.ps1 | 30 + .../Device/Get-CIPPLocalAdminPassword.ps1 | 52 ++ .../public}/Invoke-CIPPRestMethod.ps1 | 11 +- .../Defender/Get-CIPPDefenderState.ps1 | 30 + .../Security/Defender/Get-CIPPDefenderTVM.ps1 | 29 + .../Security/Incidents/Get-CIPPAlertsList.ps1 | 29 + .../Incidents/Get-CIPPIncidentList.ps1 | 29 + .../Reports/Get-CIPPDeviceCompliance.ps1 | 29 + CIPPAPIModule/public/Set-CIPPAPIDetails.ps1 | 43 ++ .../Sharepoint/Get-CIPPSharePointQuota.ps1 | 33 + .../Sharepoint/Get-CIPPSharePointSites.ps1 | 54 ++ .../Teams-Sharepoint/Teams/Get-CIPPTeams.ps1 | 42 ++ .../Teams/Get-CIPPTeamsActivity.ps1 | 31 + .../Teams/Get-CIPPTeamsVoice.ps1 | 30 + .../Administration/Alerts/Get-CIPPAlerts.ps1 | 27 + .../Administration/Get-CIPPAppConsentReqs.ps1 | 31 + .../Tenant/Administration/Get-CIPPDomains.ps1 | 16 + .../Tenant/Get-CIPPADConnectStatus.ps1 | 12 + .../Administration/Tenant/Get-CIPPOrg.ps1 | 33 + .../Tenant/Get-CIPPPartnerRelationships.ps1 | 33 + .../Tenant/Get-CIPPTenantDetails.ps1 | 33 + .../Administration/Tenant/Get-CIPPTenants.ps1 | 48 ++ .../Tenant/Conditional/Get-CIPPCAPolicies.ps1 | 35 ++ .../Conditional/Get-CIPPCATemplates.ps1 | 25 + .../Conditional/Get-CIPPNamedLocations.ps1 | 33 + .../Tenant/Conditional/Set-CIPPCAPolicy.ps1 | 47 ++ .../GDAP/Remove-CIPPGDAPRelationship.ps1 | 31 + .../Tenant/Reports/Get-CIPPLicenses.ps1 | 33 + .../Tenant/Reports/Get-CIPPOAuthApps.ps1 | 29 + .../public/Tenant/Standards/Get-CIPPBPA.ps1 | 38 ++ .../Tenant/Standards/Get-CIPPBPATemplates.ps1 | 26 + .../Standards/Get-CIPPDomainAnalyser.ps1 | 29 + .../Tenant/Standards/Get-CIPPDomainHealth.ps1 | 51 ++ .../Tenant/Standards/Get-CIPPStandards.ps1 | 33 + .../Tenant/Tools/Get-CIPPAuditLogTest.ps1 | 45 ++ .../Tools/Get-CIPPExternalGEOIPLookup.ps1 | 46 ++ .../Tools/Get-CIPPExternalTenantInfo.ps1 | 30 + Docs/Add-CIPPContact.md | 32 + Docs/Add-CIPPUser.md | 90 +++ Docs/Connect-CIPP.md | 28 + Docs/Get-CIPPADConnectStatus.md | 40 ++ Docs/Get-CIPPAPDevices.md | 16 + Docs/Get-CIPPAccessCheck.md | 16 + Docs/Get-CIPPAlerts.md | 12 + Docs/Get-CIPPAlertsList.md | 16 + Docs/Get-CIPPAppConsentReqs.md | 16 + Docs/Get-CIPPApps.md | 16 + Docs/Get-CIPPAuditLogTest.md | 28 + Docs/Get-CIPPAutoPilotConfig.md | 25 + Docs/Get-CIPPBECCheck.md | 25 + Docs/Get-CIPPBPA.md | 23 + Docs/Get-CIPPBPATemplates.md | 12 + Docs/Get-CIPPBasicAuth.md | 16 + Docs/Get-CIPPCAPolicies.md | 20 + Docs/Get-CIPPCATemplates.md | 12 + Docs/Get-CIPPCalendarPerms.md | 20 + Docs/Get-CIPPContacts.md | 24 + Docs/Get-CIPPDefenderState.md | 16 + Docs/Get-CIPPDefenderTVM.md | 16 + Docs/Get-CIPPDeletedItems.md | 16 + Docs/Get-CIPPDeviceCompliance.md | 16 + Docs/Get-CIPPDevices.md | 16 + Docs/Get-CIPPDomainAnalyser.md | 16 + Docs/Get-CIPPDomainHealth.md | 24 + Docs/Get-CIPPDomains.md | 16 + Docs/Get-CIPPEnabledSharedMailboxes.md | 16 + Docs/Get-CIPPExchangeConnectorTemplates.md | 12 + Docs/Get-CIPPExchangeConnectors.md | 16 + Docs/Get-CIPPExecAPIPermissionsList.md | 12 + Docs/Get-CIPPExternalGEOIPLookup.md | 20 + Docs/Get-CIPPExternalTenantInfo.md | 16 + Docs/Get-CIPPGetBitLockerKey.md | 20 + Docs/Get-CIPPGroupTemplates.md | 20 + Docs/Get-CIPPGroups.md | 40 ++ Docs/Get-CIPPInactiveAccounts.md | 16 + Docs/Get-CIPPIncidentList.md | 16 + Docs/Get-CIPPIntuneIntents.md | 20 + Docs/Get-CIPPIntunePolicy.md | 28 + Docs/Get-CIPPIntuneTemplates.md | 16 + Docs/Get-CIPPKnownIPDB.md | 16 + Docs/Get-CIPPLicenses.md | 20 + Docs/Get-CIPPLocalAdminPassword.md | 20 + Docs/Get-CIPPLogs.md | 12 + Docs/Get-CIPPMFAUsers.md | 16 + Docs/Get-CIPPMailQuarantine.md | 16 + Docs/Get-CIPPMailboxMobileDevices.md | 20 + Docs/Get-CIPPMailboxPermissions.md | 22 + Docs/Get-CIPPMailboxRestores.md | 28 + Docs/Get-CIPPMailboxRules.md | 18 + Docs/Get-CIPPMailboxStatistics.md | 16 + Docs/Get-CIPPMailboxes.md | 16 + Docs/Get-CIPPMessageTrace.md | 37 ++ Docs/Get-CIPPNamedLocations.md | 20 + Docs/Get-CIPPOAuthApps.md | 16 + Docs/Get-CIPPOrg.md | 20 + Docs/Get-CIPPOutOfOffice.md | 20 + Docs/Get-CIPPPartnerRelationships.md | 20 + Docs/Get-CIPPPhishPolicies.md | 16 + Docs/Get-CIPPPublicPhishingCheck.md | 16 + Docs/Get-CIPPRecipients.md | 16 + Docs/Get-CIPPRoles.md | 16 + Docs/Get-CIPPSharePointQuota.md | 20 + Docs/Get-CIPPSharePointSites.md | 32 + Docs/Get-CIPPSignIns.md | 26 + Docs/Get-CIPPSpamFilter.md | 16 + Docs/Get-CIPPSpamFilterTemplates.md | 16 + Docs/Get-CIPPStandards.md | 20 + Docs/Get-CIPPTeams.md | 18 + Docs/Get-CIPPTeamsActivity.md | 16 + Docs/Get-CIPPTeamsVoice.md | 16 + Docs/Get-CIPPTenantDetails.md | 20 + Docs/Get-CIPPTenants.md | 24 + Docs/Get-CIPPTransportRules.md | 16 + Docs/Get-CIPPUniversalSearch.md | 16 + Docs/Get-CIPPUserCAPolicies.md | 20 + Docs/Get-CIPPUserCounts.md | 16 + Docs/Get-CIPPUserDevices.md | 20 + Docs/Get-CIPPUserGroups.md | 20 + Docs/Get-CIPPUserMailboxDetails.md | 20 + Docs/Get-CIPPUserMailboxRules.md | 20 + Docs/Get-CIPPUserPhoto.md | 22 + Docs/Get-CIPPUserSignIns.md | 20 + Docs/Get-CIPPUsers.md | 24 + Docs/Get-CIPPVersion.md | 12 + Docs/Get-TokenExpiry.md | 16 + Docs/Invoke-CIPPPreFlightCheck.md | 39 ++ Docs/Invoke-CIPPRestMethod.md | 44 ++ Docs/Remove-CIPPGDAPRelationship.md | 16 + Docs/Remove-CIPPGroup.md | 28 + Docs/Send-CIPPPush.md | 20 + Docs/Set-CIPPAPIDetails.md | 30 + Docs/Set-CIPPCAPolicy.md | 28 + Docs/Set-CIPPCalendarPermissions.md | 38 ++ Docs/Set-CIPPClrImmID.md | 22 + Docs/Set-CIPPConvertMailbox.md | 28 + Docs/Set-CIPPCopyToSent.md | 26 + Docs/Set-CIPPCreateTap.md | 20 + Docs/Set-CIPPEnableArchive.md | 20 + Docs/Set-CIPPExchConnector.md | 30 + Docs/Set-CIPPExecCPVPerms.md | 24 + Docs/Set-CIPPGroupDeliveryManagement.md | 28 + Docs/Set-CIPPGroupHideFromGAL.md | 32 + Docs/Set-CIPPHideFromGAL.md | 28 + Docs/Set-CIPPMEMPolicy.md | 34 + Docs/Set-CIPPMailboxMobileDevices.md | 45 ++ Docs/Set-CIPPMailboxPermissions.md | 50 ++ Docs/Set-CIPPQuarantineManagement.md | 30 + Docs/Set-CIPPResetPassword.md | 24 + Docs/Set-CIPPRestoreDeletedUser.md | 20 + Docs/Set-CIPPRevokeSessions.md | 20 + Docs/Set-CIPPSignInStatus.md | 30 + Docs/Set-CIPPSpamFilter.md | 32 + Docs/Set-CIPPTransportRule.md | 28 + Docs/Set-CIPPUser.md | 589 ++++++++++++++++++ README.md | 243 +++++++- Tools/Generate-HelpDocs.ps1 | 4 + Tools/Get-HelpByMarkDown.ps1 | 155 +++++ Tools/New-MarkdownHelpPathTree.ps1 | 21 + build.psd1 | 4 +- private/Connect-CIPP.ps1 | 22 - private/Get-TokenExpiry.ps1 | 22 - public/CIPP/Core/Get-CIPPAccessCheck.ps1 | 18 - .../Core/Get-CIPPExecAPIPermissionsList.ps1 | 10 - public/CIPP/Core/Get-CIPPKnownIPDB.ps1 | 14 - public/CIPP/Core/Get-CIPPLogs.ps1 | 10 - .../CIPP/Core/Get-CIPPPublicPhishingCheck.ps1 | 15 - public/CIPP/Core/Set-CIPPExecCPVPerms.ps1 | 22 - public/CIPP/Settings/Get-CIPPVersion.ps1 | 10 - .../Email-Exchange/Get-CIPPCalendarPerms.ps1 | 18 - public/Email-Exchange/Get-CIPPContacts.ps1 | 22 - .../Get-CIPPEnabledSharedMailboxes.ps1 | 15 - .../Get-CIPPExchangeConnectorTemplates.ps1 | 10 - .../Get-CIPPExchangeConnectors.ps1 | 15 - .../Email-Exchange/Get-CIPPMailQuarantine.ps1 | 14 - .../Get-CIPPMailboxMobileDevices.ps1 | 18 - .../Get-CIPPMailboxPermissions.ps1 | 18 - .../Get-CIPPMailboxRestores.ps1 | 32 - .../Email-Exchange/Get-CIPPMailboxRules.ps1 | 15 - .../Get-CIPPMailboxStatistics.ps1 | 14 - public/Email-Exchange/Get-CIPPMailboxes.ps1 | 15 - .../Email-Exchange/Get-CIPPMessageTrace.ps1 | 23 - public/Email-Exchange/Get-CIPPOutOfOffice.ps1 | 18 - .../Email-Exchange/Get-CIPPPhishPolicies.ps1 | 15 - public/Email-Exchange/Get-CIPPRecipients.ps1 | 15 - public/Email-Exchange/Get-CIPPSpamFilter.ps1 | 15 - .../Get-CIPPSpamFilterTemplates.ps1 | 15 - .../Email-Exchange/Get-CIPPTransportRules.ps1 | 15 - .../Get-CIPPUserMailboxDetails.ps1 | 20 - .../Get-CIPPUserMailboxRules.ps1 | 20 - .../Set-CIPPCalendarPermissions.ps1 | 44 -- .../Email-Exchange/Set-CIPPConvertMailbox.ps1 | 24 - public/Email-Exchange/Set-CIPPCopyToSent.ps1 | 28 - .../Email-Exchange/Set-CIPPEnableArchive.ps1 | 20 - .../Email-Exchange/Set-CIPPExchConnector.ps1 | 27 - public/Email-Exchange/Set-CIPPHideFromGAL.ps1 | 26 - .../Set-CIPPMailboxMobileDevices.ps1 | 40 -- .../Set-CIPPQuarantineManagement.ps1 | 33 - public/Email-Exchange/Set-CIPPSpamFilter.ps1 | 26 - .../Email-Exchange/Set-CIPPTransportRule.ps1 | 24 - public/Endpoint/Applications/Get-CIPPApps.ps1 | 16 - .../Endpoint/Autopilot/Get-CIPPAPDevices.ps1 | 16 - .../Autopilot/Get-CIPPAutoPilotConfig.ps1 | 23 - public/Endpoint/MEM/Set-CIPPMEMPolicy.ps1 | 28 - public/Endpoint/Reports/Get-CIPPDevices.ps1 | 15 - .../Identity/Administration/Get-CIPPRoles.ps1 | 15 - .../Groups/Get-CIPPGroupTemplates.ps1 | 22 - .../Administration/Groups/Get-CIPPGroups.ps1 | 49 -- .../Set-CIPPGroupDeliveryManagement.ps1 | 34 - .../Groups/Set-CIPPGroupHideFromGAL.ps1 | 35 -- .../Administration/Users/Add-CIPPUser.ps1 | 81 --- .../Administration/Users/Get-CIPPBECCheck.ps1 | 40 -- .../Users/Get-CIPPDeletedItems.ps1 | 18 - .../Users/Get-CIPPUniversalSearch.ps1 | 16 - .../Users/Get-CIPPUserCAPolicies.ps1 | 20 - .../Users/Get-CIPPUserCounts.ps1 | 15 - .../Users/Get-CIPPUserDevices.ps1 | 20 - .../Users/Get-CIPPUserGroups.ps1 | 20 - .../Users/Get-CIPPUserPhoto.ps1 | 20 - .../Users/Get-CIPPUserSignIns.ps1 | 19 - .../Administration/Users/Get-CIPPUsers.ps1 | 22 - .../Administration/Users/Send-CIPPPush.ps1 | 19 - .../Administration/Users/Set-CIPPClrImmID.ps1 | 19 - .../Users/Set-CIPPCreateTap.ps1 | 19 - .../Users/Set-CIPPResetPassword.ps1 | 27 - .../Users/Set-CIPPRestoreDeletedUser.ps1 | 19 - .../Users/Set-CIPPRevokeSessions.ps1 | 19 - .../Users/Set-CIPPSignInStatus.ps1 | 30 - public/Identity/Reports/Get-CIPPBasicAuth.ps1 | 14 - .../Reports/Get-CIPPInactiveAccounts.ps1 | 15 - public/Identity/Reports/Get-CIPPMFAUsers.ps1 | 14 - public/Identity/Reports/Get-CIPPSignIns.ps1 | 25 - .../Intune/Device/Get-CIPPGetBitLockerKey.ps1 | 21 - .../Intune/Device/Get-CIPPIntuneIntents.ps1 | 18 - public/Intune/Device/Get-CIPPIntunePolicy.ps1 | 29 - .../Intune/Device/Get-CIPPIntuneTemplates.ps1 | 15 - .../Device/Get-CIPPLocalAdminPassword.ps1 | 21 - .../Defender/Get-CIPPDefenderState.ps1 | 15 - .../Security/Defender/Get-CIPPDefenderTVM.ps1 | 14 - .../Security/Incidents/Get-CIPPAlertsList.ps1 | 15 - .../Incidents/Get-CIPPIncidentList.ps1 | 15 - .../Reports/Get-CIPPDeviceCompliance.ps1 | 14 - public/Set-CIPPAPIDetails.ps1 | 18 - .../Sharepoint/Get-CIPPSharePointQuota.ps1 | 15 - .../Sharepoint/Get-CIPPSharePointSites.ps1 | 27 - .../Teams-Sharepoint/Teams/Get-CIPPTeams.ps1 | 20 - .../Teams/Get-CIPPTeamsActivity.ps1 | 17 - .../Teams/Get-CIPPTeamsVoice.ps1 | 16 - .../Administration/Alerts/Get-CIPPAlerts.ps1 | 12 - .../Administration/Get-CIPPAppConsentReqs.ps1 | 16 - .../Administration/Tenant/Get-CIPPOrg.ps1 | 15 - .../Tenant/Get-CIPPPartnerRelationships.ps1 | 15 - .../Tenant/Get-CIPPTenantDetails.ps1 | 15 - .../Administration/Tenant/Get-CIPPTenants.ps1 | 28 - .../Tenant/Conditional/Get-CIPPCAPolicies.ps1 | 16 - .../Conditional/Get-CIPPCATemplates.ps1 | 10 - .../Conditional/Get-CIPPNamedLocations.ps1 | 14 - .../Tenant/Conditional/Set-CIPPCAPolicy.ps1 | 22 - .../GDAP/Remove-CIPPGDAPRelationship.ps1 | 16 - public/Tenant/Reports/Get-CIPPLicenses.ps1 | 14 - public/Tenant/Reports/Get-CIPPOAuthApps.ps1 | 14 - public/Tenant/Standards/Get-CIPPBPA.ps1 | 18 - .../Tenant/Standards/Get-CIPPBPATemplates.ps1 | 10 - .../Standards/Get-CIPPDomainAnalyser.ps1 | 15 - .../Tenant/Standards/Get-CIPPDomainHealth.ps1 | 20 - public/Tenant/Standards/Get-CIPPStandards.ps1 | 15 - public/Tenant/Tools/Get-CIPPAuditLogTest.ps1 | 19 - .../Tools/Get-CIPPExternalGEOIPLookup.ps1 | 16 - .../Tools/Get-CIPPExternalTenantInfo.ps1 | 15 - 350 files changed, 8145 insertions(+), 2199 deletions(-) rename CIPPAPIModule.psd1 => CIPPAPIModule/CIPPAPIModule.psd1 (99%) rename CIPPAPIModule.psm1 => CIPPAPIModule/CIPPAPIModule.psm1 (100%) create mode 100644 CIPPAPIModule/private/Connect-CIPP.ps1 create mode 100644 CIPPAPIModule/private/Get-TokenExpiry.ps1 rename {private => CIPPAPIModule/private}/Invoke-CIPPPreFlightCheck.ps1 (61%) create mode 100644 CIPPAPIModule/public/CIPP/Core/Get-CIPPAccessCheck.ps1 create mode 100644 CIPPAPIModule/public/CIPP/Core/Get-CIPPExecAPIPermissionsList.ps1 create mode 100644 CIPPAPIModule/public/CIPP/Core/Get-CIPPKnownIPDB.ps1 create mode 100644 CIPPAPIModule/public/CIPP/Core/Get-CIPPLogs.ps1 create mode 100644 CIPPAPIModule/public/CIPP/Core/Get-CIPPPublicPhishingCheck.ps1 create mode 100644 CIPPAPIModule/public/CIPP/Core/Set-CIPPExecCPVPerms.ps1 create mode 100644 CIPPAPIModule/public/CIPP/Settings/Get-CIPPVersion.ps1 rename {public => CIPPAPIModule/public}/Email-Exchange/Add-CIPPContact.ps1 (50%) create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPCalendarPerms.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPContacts.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPEnabledSharedMailboxes.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPExchangeConnectorTemplates.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPExchangeConnectors.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPMailQuarantine.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxMobileDevices.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxPermissions.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxRestores.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxRules.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxStatistics.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxes.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPMessageTrace.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPOutOfOffice.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPPhishPolicies.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPRecipients.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPSpamFilter.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPSpamFilterTemplates.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPTransportRules.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPUserMailboxDetails.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Get-CIPPUserMailboxRules.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Set-CIPPCalendarPermissions.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Set-CIPPConvertMailbox.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Set-CIPPCopyToSent.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Set-CIPPEnableArchive.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Set-CIPPExchConnector.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Set-CIPPHideFromGAL.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Set-CIPPMailboxMobileDevices.ps1 rename {public => CIPPAPIModule/public}/Email-Exchange/Set-CIPPMailboxPermissions.ps1 (55%) create mode 100644 CIPPAPIModule/public/Email-Exchange/Set-CIPPQuarantineManagement.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Set-CIPPSpamFilter.ps1 create mode 100644 CIPPAPIModule/public/Email-Exchange/Set-CIPPTransportRule.ps1 create mode 100644 CIPPAPIModule/public/Endpoint/Applications/Get-CIPPApps.ps1 create mode 100644 CIPPAPIModule/public/Endpoint/Autopilot/Get-CIPPAPDevices.ps1 create mode 100644 CIPPAPIModule/public/Endpoint/Autopilot/Get-CIPPAutoPilotConfig.ps1 create mode 100644 CIPPAPIModule/public/Endpoint/MEM/Set-CIPPMEMPolicy.ps1 create mode 100644 CIPPAPIModule/public/Endpoint/Reports/Get-CIPPDevices.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Get-CIPPRoles.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Groups/Get-CIPPGroupTemplates.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Groups/Get-CIPPGroups.ps1 rename {public => CIPPAPIModule/public}/Identity/Administration/Groups/Remove-CIPPGroup.ps1 (50%) create mode 100644 CIPPAPIModule/public/Identity/Administration/Groups/Set-CIPPGroupDeliveryManagement.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Groups/Set-CIPPGroupHideFromGAL.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Add-CIPPUser.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPBECCheck.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPDeletedItems.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUniversalSearch.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserCAPolicies.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserCounts.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserDevices.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserGroups.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserPhoto.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserSignIns.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUsers.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Send-CIPPPush.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPClrImmID.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPCreateTap.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPResetPassword.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPRestoreDeletedUser.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPRevokeSessions.ps1 create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPSignInStatus.ps1 rename {public => CIPPAPIModule/public}/Identity/Administration/Users/Set-CIPPUser.ps1 (67%) create mode 100644 CIPPAPIModule/public/Identity/Reports/Get-CIPPBasicAuth.ps1 create mode 100644 CIPPAPIModule/public/Identity/Reports/Get-CIPPInactiveAccounts.ps1 create mode 100644 CIPPAPIModule/public/Identity/Reports/Get-CIPPMFAUsers.ps1 create mode 100644 CIPPAPIModule/public/Identity/Reports/Get-CIPPSignIns.ps1 create mode 100644 CIPPAPIModule/public/Intune/Device/Get-CIPPGetBitLockerKey.ps1 create mode 100644 CIPPAPIModule/public/Intune/Device/Get-CIPPIntuneIntents.ps1 create mode 100644 CIPPAPIModule/public/Intune/Device/Get-CIPPIntunePolicy.ps1 create mode 100644 CIPPAPIModule/public/Intune/Device/Get-CIPPIntuneTemplates.ps1 create mode 100644 CIPPAPIModule/public/Intune/Device/Get-CIPPLocalAdminPassword.ps1 rename {public => CIPPAPIModule/public}/Invoke-CIPPRestMethod.ps1 (94%) create mode 100644 CIPPAPIModule/public/Security/Defender/Get-CIPPDefenderState.ps1 create mode 100644 CIPPAPIModule/public/Security/Defender/Get-CIPPDefenderTVM.ps1 create mode 100644 CIPPAPIModule/public/Security/Incidents/Get-CIPPAlertsList.ps1 create mode 100644 CIPPAPIModule/public/Security/Incidents/Get-CIPPIncidentList.ps1 create mode 100644 CIPPAPIModule/public/Security/Reports/Get-CIPPDeviceCompliance.ps1 create mode 100644 CIPPAPIModule/public/Set-CIPPAPIDetails.ps1 create mode 100644 CIPPAPIModule/public/Teams-Sharepoint/Sharepoint/Get-CIPPSharePointQuota.ps1 create mode 100644 CIPPAPIModule/public/Teams-Sharepoint/Sharepoint/Get-CIPPSharePointSites.ps1 create mode 100644 CIPPAPIModule/public/Teams-Sharepoint/Teams/Get-CIPPTeams.ps1 create mode 100644 CIPPAPIModule/public/Teams-Sharepoint/Teams/Get-CIPPTeamsActivity.ps1 create mode 100644 CIPPAPIModule/public/Teams-Sharepoint/Teams/Get-CIPPTeamsVoice.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Administration/Alerts/Get-CIPPAlerts.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Administration/Get-CIPPAppConsentReqs.ps1 rename {public => CIPPAPIModule/public}/Tenant/Administration/Get-CIPPDomains.ps1 (51%) rename {public => CIPPAPIModule/public}/Tenant/Administration/Tenant/Get-CIPPADConnectStatus.ps1 (77%) create mode 100644 CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPOrg.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPPartnerRelationships.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPTenantDetails.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPTenants.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Conditional/Get-CIPPCAPolicies.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Conditional/Get-CIPPCATemplates.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Conditional/Get-CIPPNamedLocations.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Conditional/Set-CIPPCAPolicy.ps1 create mode 100644 CIPPAPIModule/public/Tenant/GDAP/Remove-CIPPGDAPRelationship.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Reports/Get-CIPPLicenses.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Reports/Get-CIPPOAuthApps.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Standards/Get-CIPPBPA.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Standards/Get-CIPPBPATemplates.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Standards/Get-CIPPDomainAnalyser.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Standards/Get-CIPPDomainHealth.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Standards/Get-CIPPStandards.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Tools/Get-CIPPAuditLogTest.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Tools/Get-CIPPExternalGEOIPLookup.ps1 create mode 100644 CIPPAPIModule/public/Tenant/Tools/Get-CIPPExternalTenantInfo.ps1 create mode 100644 Docs/Add-CIPPContact.md create mode 100644 Docs/Add-CIPPUser.md create mode 100644 Docs/Connect-CIPP.md create mode 100644 Docs/Get-CIPPADConnectStatus.md create mode 100644 Docs/Get-CIPPAPDevices.md create mode 100644 Docs/Get-CIPPAccessCheck.md create mode 100644 Docs/Get-CIPPAlerts.md create mode 100644 Docs/Get-CIPPAlertsList.md create mode 100644 Docs/Get-CIPPAppConsentReqs.md create mode 100644 Docs/Get-CIPPApps.md create mode 100644 Docs/Get-CIPPAuditLogTest.md create mode 100644 Docs/Get-CIPPAutoPilotConfig.md create mode 100644 Docs/Get-CIPPBECCheck.md create mode 100644 Docs/Get-CIPPBPA.md create mode 100644 Docs/Get-CIPPBPATemplates.md create mode 100644 Docs/Get-CIPPBasicAuth.md create mode 100644 Docs/Get-CIPPCAPolicies.md create mode 100644 Docs/Get-CIPPCATemplates.md create mode 100644 Docs/Get-CIPPCalendarPerms.md create mode 100644 Docs/Get-CIPPContacts.md create mode 100644 Docs/Get-CIPPDefenderState.md create mode 100644 Docs/Get-CIPPDefenderTVM.md create mode 100644 Docs/Get-CIPPDeletedItems.md create mode 100644 Docs/Get-CIPPDeviceCompliance.md create mode 100644 Docs/Get-CIPPDevices.md create mode 100644 Docs/Get-CIPPDomainAnalyser.md create mode 100644 Docs/Get-CIPPDomainHealth.md create mode 100644 Docs/Get-CIPPDomains.md create mode 100644 Docs/Get-CIPPEnabledSharedMailboxes.md create mode 100644 Docs/Get-CIPPExchangeConnectorTemplates.md create mode 100644 Docs/Get-CIPPExchangeConnectors.md create mode 100644 Docs/Get-CIPPExecAPIPermissionsList.md create mode 100644 Docs/Get-CIPPExternalGEOIPLookup.md create mode 100644 Docs/Get-CIPPExternalTenantInfo.md create mode 100644 Docs/Get-CIPPGetBitLockerKey.md create mode 100644 Docs/Get-CIPPGroupTemplates.md create mode 100644 Docs/Get-CIPPGroups.md create mode 100644 Docs/Get-CIPPInactiveAccounts.md create mode 100644 Docs/Get-CIPPIncidentList.md create mode 100644 Docs/Get-CIPPIntuneIntents.md create mode 100644 Docs/Get-CIPPIntunePolicy.md create mode 100644 Docs/Get-CIPPIntuneTemplates.md create mode 100644 Docs/Get-CIPPKnownIPDB.md create mode 100644 Docs/Get-CIPPLicenses.md create mode 100644 Docs/Get-CIPPLocalAdminPassword.md create mode 100644 Docs/Get-CIPPLogs.md create mode 100644 Docs/Get-CIPPMFAUsers.md create mode 100644 Docs/Get-CIPPMailQuarantine.md create mode 100644 Docs/Get-CIPPMailboxMobileDevices.md create mode 100644 Docs/Get-CIPPMailboxPermissions.md create mode 100644 Docs/Get-CIPPMailboxRestores.md create mode 100644 Docs/Get-CIPPMailboxRules.md create mode 100644 Docs/Get-CIPPMailboxStatistics.md create mode 100644 Docs/Get-CIPPMailboxes.md create mode 100644 Docs/Get-CIPPMessageTrace.md create mode 100644 Docs/Get-CIPPNamedLocations.md create mode 100644 Docs/Get-CIPPOAuthApps.md create mode 100644 Docs/Get-CIPPOrg.md create mode 100644 Docs/Get-CIPPOutOfOffice.md create mode 100644 Docs/Get-CIPPPartnerRelationships.md create mode 100644 Docs/Get-CIPPPhishPolicies.md create mode 100644 Docs/Get-CIPPPublicPhishingCheck.md create mode 100644 Docs/Get-CIPPRecipients.md create mode 100644 Docs/Get-CIPPRoles.md create mode 100644 Docs/Get-CIPPSharePointQuota.md create mode 100644 Docs/Get-CIPPSharePointSites.md create mode 100644 Docs/Get-CIPPSignIns.md create mode 100644 Docs/Get-CIPPSpamFilter.md create mode 100644 Docs/Get-CIPPSpamFilterTemplates.md create mode 100644 Docs/Get-CIPPStandards.md create mode 100644 Docs/Get-CIPPTeams.md create mode 100644 Docs/Get-CIPPTeamsActivity.md create mode 100644 Docs/Get-CIPPTeamsVoice.md create mode 100644 Docs/Get-CIPPTenantDetails.md create mode 100644 Docs/Get-CIPPTenants.md create mode 100644 Docs/Get-CIPPTransportRules.md create mode 100644 Docs/Get-CIPPUniversalSearch.md create mode 100644 Docs/Get-CIPPUserCAPolicies.md create mode 100644 Docs/Get-CIPPUserCounts.md create mode 100644 Docs/Get-CIPPUserDevices.md create mode 100644 Docs/Get-CIPPUserGroups.md create mode 100644 Docs/Get-CIPPUserMailboxDetails.md create mode 100644 Docs/Get-CIPPUserMailboxRules.md create mode 100644 Docs/Get-CIPPUserPhoto.md create mode 100644 Docs/Get-CIPPUserSignIns.md create mode 100644 Docs/Get-CIPPUsers.md create mode 100644 Docs/Get-CIPPVersion.md create mode 100644 Docs/Get-TokenExpiry.md create mode 100644 Docs/Invoke-CIPPPreFlightCheck.md create mode 100644 Docs/Invoke-CIPPRestMethod.md create mode 100644 Docs/Remove-CIPPGDAPRelationship.md create mode 100644 Docs/Remove-CIPPGroup.md create mode 100644 Docs/Send-CIPPPush.md create mode 100644 Docs/Set-CIPPAPIDetails.md create mode 100644 Docs/Set-CIPPCAPolicy.md create mode 100644 Docs/Set-CIPPCalendarPermissions.md create mode 100644 Docs/Set-CIPPClrImmID.md create mode 100644 Docs/Set-CIPPConvertMailbox.md create mode 100644 Docs/Set-CIPPCopyToSent.md create mode 100644 Docs/Set-CIPPCreateTap.md create mode 100644 Docs/Set-CIPPEnableArchive.md create mode 100644 Docs/Set-CIPPExchConnector.md create mode 100644 Docs/Set-CIPPExecCPVPerms.md create mode 100644 Docs/Set-CIPPGroupDeliveryManagement.md create mode 100644 Docs/Set-CIPPGroupHideFromGAL.md create mode 100644 Docs/Set-CIPPHideFromGAL.md create mode 100644 Docs/Set-CIPPMEMPolicy.md create mode 100644 Docs/Set-CIPPMailboxMobileDevices.md create mode 100644 Docs/Set-CIPPMailboxPermissions.md create mode 100644 Docs/Set-CIPPQuarantineManagement.md create mode 100644 Docs/Set-CIPPResetPassword.md create mode 100644 Docs/Set-CIPPRestoreDeletedUser.md create mode 100644 Docs/Set-CIPPRevokeSessions.md create mode 100644 Docs/Set-CIPPSignInStatus.md create mode 100644 Docs/Set-CIPPSpamFilter.md create mode 100644 Docs/Set-CIPPTransportRule.md create mode 100644 Docs/Set-CIPPUser.md create mode 100644 Tools/Generate-HelpDocs.ps1 create mode 100644 Tools/Get-HelpByMarkDown.ps1 create mode 100644 Tools/New-MarkdownHelpPathTree.ps1 delete mode 100644 private/Connect-CIPP.ps1 delete mode 100644 private/Get-TokenExpiry.ps1 delete mode 100644 public/CIPP/Core/Get-CIPPAccessCheck.ps1 delete mode 100644 public/CIPP/Core/Get-CIPPExecAPIPermissionsList.ps1 delete mode 100644 public/CIPP/Core/Get-CIPPKnownIPDB.ps1 delete mode 100644 public/CIPP/Core/Get-CIPPLogs.ps1 delete mode 100644 public/CIPP/Core/Get-CIPPPublicPhishingCheck.ps1 delete mode 100644 public/CIPP/Core/Set-CIPPExecCPVPerms.ps1 delete mode 100644 public/CIPP/Settings/Get-CIPPVersion.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPCalendarPerms.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPContacts.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPEnabledSharedMailboxes.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPExchangeConnectorTemplates.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPExchangeConnectors.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPMailQuarantine.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPMailboxMobileDevices.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPMailboxPermissions.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPMailboxRestores.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPMailboxRules.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPMailboxStatistics.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPMailboxes.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPMessageTrace.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPOutOfOffice.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPPhishPolicies.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPRecipients.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPSpamFilter.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPSpamFilterTemplates.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPTransportRules.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPUserMailboxDetails.ps1 delete mode 100644 public/Email-Exchange/Get-CIPPUserMailboxRules.ps1 delete mode 100644 public/Email-Exchange/Set-CIPPCalendarPermissions.ps1 delete mode 100644 public/Email-Exchange/Set-CIPPConvertMailbox.ps1 delete mode 100644 public/Email-Exchange/Set-CIPPCopyToSent.ps1 delete mode 100644 public/Email-Exchange/Set-CIPPEnableArchive.ps1 delete mode 100644 public/Email-Exchange/Set-CIPPExchConnector.ps1 delete mode 100644 public/Email-Exchange/Set-CIPPHideFromGAL.ps1 delete mode 100644 public/Email-Exchange/Set-CIPPMailboxMobileDevices.ps1 delete mode 100644 public/Email-Exchange/Set-CIPPQuarantineManagement.ps1 delete mode 100644 public/Email-Exchange/Set-CIPPSpamFilter.ps1 delete mode 100644 public/Email-Exchange/Set-CIPPTransportRule.ps1 delete mode 100644 public/Endpoint/Applications/Get-CIPPApps.ps1 delete mode 100644 public/Endpoint/Autopilot/Get-CIPPAPDevices.ps1 delete mode 100644 public/Endpoint/Autopilot/Get-CIPPAutoPilotConfig.ps1 delete mode 100644 public/Endpoint/MEM/Set-CIPPMEMPolicy.ps1 delete mode 100644 public/Endpoint/Reports/Get-CIPPDevices.ps1 delete mode 100644 public/Identity/Administration/Get-CIPPRoles.ps1 delete mode 100644 public/Identity/Administration/Groups/Get-CIPPGroupTemplates.ps1 delete mode 100644 public/Identity/Administration/Groups/Get-CIPPGroups.ps1 delete mode 100644 public/Identity/Administration/Groups/Set-CIPPGroupDeliveryManagement.ps1 delete mode 100644 public/Identity/Administration/Groups/Set-CIPPGroupHideFromGAL.ps1 delete mode 100644 public/Identity/Administration/Users/Add-CIPPUser.ps1 delete mode 100644 public/Identity/Administration/Users/Get-CIPPBECCheck.ps1 delete mode 100644 public/Identity/Administration/Users/Get-CIPPDeletedItems.ps1 delete mode 100644 public/Identity/Administration/Users/Get-CIPPUniversalSearch.ps1 delete mode 100644 public/Identity/Administration/Users/Get-CIPPUserCAPolicies.ps1 delete mode 100644 public/Identity/Administration/Users/Get-CIPPUserCounts.ps1 delete mode 100644 public/Identity/Administration/Users/Get-CIPPUserDevices.ps1 delete mode 100644 public/Identity/Administration/Users/Get-CIPPUserGroups.ps1 delete mode 100644 public/Identity/Administration/Users/Get-CIPPUserPhoto.ps1 delete mode 100644 public/Identity/Administration/Users/Get-CIPPUserSignIns.ps1 delete mode 100644 public/Identity/Administration/Users/Get-CIPPUsers.ps1 delete mode 100644 public/Identity/Administration/Users/Send-CIPPPush.ps1 delete mode 100644 public/Identity/Administration/Users/Set-CIPPClrImmID.ps1 delete mode 100644 public/Identity/Administration/Users/Set-CIPPCreateTap.ps1 delete mode 100644 public/Identity/Administration/Users/Set-CIPPResetPassword.ps1 delete mode 100644 public/Identity/Administration/Users/Set-CIPPRestoreDeletedUser.ps1 delete mode 100644 public/Identity/Administration/Users/Set-CIPPRevokeSessions.ps1 delete mode 100644 public/Identity/Administration/Users/Set-CIPPSignInStatus.ps1 delete mode 100644 public/Identity/Reports/Get-CIPPBasicAuth.ps1 delete mode 100644 public/Identity/Reports/Get-CIPPInactiveAccounts.ps1 delete mode 100644 public/Identity/Reports/Get-CIPPMFAUsers.ps1 delete mode 100644 public/Identity/Reports/Get-CIPPSignIns.ps1 delete mode 100644 public/Intune/Device/Get-CIPPGetBitLockerKey.ps1 delete mode 100644 public/Intune/Device/Get-CIPPIntuneIntents.ps1 delete mode 100644 public/Intune/Device/Get-CIPPIntunePolicy.ps1 delete mode 100644 public/Intune/Device/Get-CIPPIntuneTemplates.ps1 delete mode 100644 public/Intune/Device/Get-CIPPLocalAdminPassword.ps1 delete mode 100644 public/Security/Defender/Get-CIPPDefenderState.ps1 delete mode 100644 public/Security/Defender/Get-CIPPDefenderTVM.ps1 delete mode 100644 public/Security/Incidents/Get-CIPPAlertsList.ps1 delete mode 100644 public/Security/Incidents/Get-CIPPIncidentList.ps1 delete mode 100644 public/Security/Reports/Get-CIPPDeviceCompliance.ps1 delete mode 100644 public/Set-CIPPAPIDetails.ps1 delete mode 100644 public/Teams-Sharepoint/Sharepoint/Get-CIPPSharePointQuota.ps1 delete mode 100644 public/Teams-Sharepoint/Sharepoint/Get-CIPPSharePointSites.ps1 delete mode 100644 public/Teams-Sharepoint/Teams/Get-CIPPTeams.ps1 delete mode 100644 public/Teams-Sharepoint/Teams/Get-CIPPTeamsActivity.ps1 delete mode 100644 public/Teams-Sharepoint/Teams/Get-CIPPTeamsVoice.ps1 delete mode 100644 public/Tenant/Administration/Alerts/Get-CIPPAlerts.ps1 delete mode 100644 public/Tenant/Administration/Get-CIPPAppConsentReqs.ps1 delete mode 100644 public/Tenant/Administration/Tenant/Get-CIPPOrg.ps1 delete mode 100644 public/Tenant/Administration/Tenant/Get-CIPPPartnerRelationships.ps1 delete mode 100644 public/Tenant/Administration/Tenant/Get-CIPPTenantDetails.ps1 delete mode 100644 public/Tenant/Administration/Tenant/Get-CIPPTenants.ps1 delete mode 100644 public/Tenant/Conditional/Get-CIPPCAPolicies.ps1 delete mode 100644 public/Tenant/Conditional/Get-CIPPCATemplates.ps1 delete mode 100644 public/Tenant/Conditional/Get-CIPPNamedLocations.ps1 delete mode 100644 public/Tenant/Conditional/Set-CIPPCAPolicy.ps1 delete mode 100644 public/Tenant/GDAP/Remove-CIPPGDAPRelationship.ps1 delete mode 100644 public/Tenant/Reports/Get-CIPPLicenses.ps1 delete mode 100644 public/Tenant/Reports/Get-CIPPOAuthApps.ps1 delete mode 100644 public/Tenant/Standards/Get-CIPPBPA.ps1 delete mode 100644 public/Tenant/Standards/Get-CIPPBPATemplates.ps1 delete mode 100644 public/Tenant/Standards/Get-CIPPDomainAnalyser.ps1 delete mode 100644 public/Tenant/Standards/Get-CIPPDomainHealth.ps1 delete mode 100644 public/Tenant/Standards/Get-CIPPStandards.ps1 delete mode 100644 public/Tenant/Tools/Get-CIPPAuditLogTest.ps1 delete mode 100644 public/Tenant/Tools/Get-CIPPExternalGEOIPLookup.ps1 delete mode 100644 public/Tenant/Tools/Get-CIPPExternalTenantInfo.ps1 diff --git a/CIPPAPIModule.psd1 b/CIPPAPIModule/CIPPAPIModule.psd1 similarity index 99% rename from CIPPAPIModule.psd1 rename to CIPPAPIModule/CIPPAPIModule.psd1 index 763a4d2..fffdfc6 100644 --- a/CIPPAPIModule.psd1 +++ b/CIPPAPIModule/CIPPAPIModule.psd1 @@ -12,7 +12,7 @@ RootModule = 'CIPPAPIModule.psm1' # Version number of this module. -ModuleVersion = '1.0.9' +ModuleVersion = '1.1.0' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/CIPPAPIModule.psm1 b/CIPPAPIModule/CIPPAPIModule.psm1 similarity index 100% rename from CIPPAPIModule.psm1 rename to CIPPAPIModule/CIPPAPIModule.psm1 diff --git a/CIPPAPIModule/private/Connect-CIPP.ps1 b/CIPPAPIModule/private/Connect-CIPP.ps1 new file mode 100644 index 0000000..47e9980 --- /dev/null +++ b/CIPPAPIModule/private/Connect-CIPP.ps1 @@ -0,0 +1,46 @@ +<# +.SYNOPSIS +Connects to the CIPP API using the provided credentials. + +.DESCRIPTION +The Connect-CIPP function establishes a connection to the CIPP API by obtaining an access token using the client credentials flow. It requires the CIPP API URL, client ID, client secret, and tenant ID as input parameters. + +.PARAMETER CIPPAPIUrl +The URL of the CIPP API. + +.PARAMETER CIPPClientID +The client ID used to authenticate with the CIPP API. + +.PARAMETER CIPPClientSecret +The client secret used to authenticate with the CIPP API. + +.PARAMETER TenantID +The ID of the tenant associated with the CIPP API. + +.EXAMPLE +Connect-CIPP -CIPPAPIUrl "https://api.cipp.com" -CIPPClientID "12345678-1234-1234-1234-1234567890ab" -CIPPClientSecret "MyClientSecret" -TenantID "98765432-4321-4321-4321-0987654321ba" +Connects to the CIPP API using the specified credentials. + +#> +function Connect-CIPP { + [CmdletBinding()] + Param( + [string]$CIPPAPIUrl, + [string]$CIPPClientID, + [string]$CIPPClientSecret, + [string]$TenantID + ) + + $Script:AuthBody = @{ + client_id = $script:CIPPClientID + client_secret = $script:CIPPClientSecret + scope = "api://$($script:CIPPClientID)/.default" + grant_type = 'client_credentials' + } + $token = Invoke-RestMethod -Uri "https://login.microsoftonline.com/$script:TenantId/oauth2/v2.0/token" -Method POST -Body $AuthBody + + $script:AuthHeader = @{ Authorization = "Bearer $($token.access_token)" } + $script:TokenAcquiredTime = Get-Date + $script:ExpiresIn = $token.expires_in + +} diff --git a/CIPPAPIModule/private/Get-TokenExpiry.ps1 b/CIPPAPIModule/private/Get-TokenExpiry.ps1 new file mode 100644 index 0000000..2d0d852 --- /dev/null +++ b/CIPPAPIModule/private/Get-TokenExpiry.ps1 @@ -0,0 +1,34 @@ +<# +.SYNOPSIS +Calculates the expiry date and time for a token. + +.DESCRIPTION +The Get-TokenExpiry function calculates the expiry date and time for a token based on the token's expiration time in seconds. + +.PARAMETER ExpiresIn +Specifies the expiration time of the token in seconds. If not provided, the function uses the default expiration time stored in the $script:ExpiresIn variable. + +.OUTPUTS +System.DateTime +The calculated expiry date and time for the token. + +.EXAMPLE +Get-TokenExpiry -ExpiresIn 3600 +Calculates the expiry date and time for a token that expires in 3600 seconds (1 hour). + +#> + +function Get-TokenExpiry { + [CmdletBinding()] + [OutputType([DateTime])] + param ( + [Parameter(Mandatory = $false)] + [int64]$ExpiresIn = $script:ExpiresIn + ) + if ($script:ExpiresIn -eq $null) { + return + } else { + $Script:ExpiryDateTime = $script:TokenAcquiredTime.AddSeconds($script:ExpiresIn) + Write-Verbose "Calculated token expiry as $Script:ExpiryDateTime" + } +} \ No newline at end of file diff --git a/private/Invoke-CIPPPreFlightCheck.ps1 b/CIPPAPIModule/private/Invoke-CIPPPreFlightCheck.ps1 similarity index 61% rename from private/Invoke-CIPPPreFlightCheck.ps1 rename to CIPPAPIModule/private/Invoke-CIPPPreFlightCheck.ps1 index 2fbaa20..2cfdcb7 100644 --- a/private/Invoke-CIPPPreFlightCheck.ps1 +++ b/CIPPAPIModule/private/Invoke-CIPPPreFlightCheck.ps1 @@ -1,3 +1,17 @@ +<# +.SYNOPSIS + Invokes the pre-flight check before connecting to the CIPP API. + +.DESCRIPTION + This function performs a pre-flight check before connecting to the CIPP API. It checks if the required CIPP API information is available and if the token has expired. If the information is not found or the token has expired, it connects to the CIPP API using the provided credentials. + +.PARAMETER None + This function does not accept any parameters. + +.EXAMPLE + Invoke-CIPPPreFlightCheck + +#> function Invoke-CIPPPreFlightCheck { [CmdletBinding()] param () diff --git a/CIPPAPIModule/public/CIPP/Core/Get-CIPPAccessCheck.ps1 b/CIPPAPIModule/public/CIPP/Core/Get-CIPPAccessCheck.ps1 new file mode 100644 index 0000000..d713242 --- /dev/null +++ b/CIPPAPIModule/public/CIPP/Core/Get-CIPPAccessCheck.ps1 @@ -0,0 +1,33 @@ +<# +.SYNOPSIS + Performs a tenant access check for the specified customer tenant ID. + +.DESCRIPTION + The Get-CIPPAccessCheck function performs a tenant access check for the specified customer tenant ID. It sends a POST request to the "/api/execaccesschecks" endpoint with the provided tenant ID. + +.PARAMETER CustomerTenantID + Specifies the customer tenant ID for which the access check needs to be performed. + +.EXAMPLE + Get-CIPPAccessCheck -CustomerTenantID "12345678" + Runs a tenant access check for the customer tenant ID "12345678". + +#> +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 +} diff --git a/CIPPAPIModule/public/CIPP/Core/Get-CIPPExecAPIPermissionsList.ps1 b/CIPPAPIModule/public/CIPP/Core/Get-CIPPExecAPIPermissionsList.ps1 new file mode 100644 index 0000000..fd2e8d8 --- /dev/null +++ b/CIPPAPIModule/public/CIPP/Core/Get-CIPPExecAPIPermissionsList.ps1 @@ -0,0 +1,26 @@ +<# +.SYNOPSIS +Retrieves the list of CIPP execution API permissions. + +.DESCRIPTION +The Get-CIPPExecAPIPermissionsList function retrieves the list of CIPP execution API permissions by making a REST API call to the specified endpoint. + +.PARAMETER None +This function does not accept any parameters. + +.EXAMPLE +Get-CIPPExecAPIPermissionsList +Retrieves the list of CIPP execution API permissions. + +#> + +function Get-CIPPExecAPIPermissionsList { + [CmdletBinding()] + Param() + + Write-Verbose "Getting CIPP Logs" + $endpoint = "/api/ExecAPIPermissionList" + + Invoke-CIPPRestMethod -Endpoint $endpoint +} + diff --git a/CIPPAPIModule/public/CIPP/Core/Get-CIPPKnownIPDB.ps1 b/CIPPAPIModule/public/CIPP/Core/Get-CIPPKnownIPDB.ps1 new file mode 100644 index 0000000..38ab0b5 --- /dev/null +++ b/CIPPAPIModule/public/CIPP/Core/Get-CIPPKnownIPDB.ps1 @@ -0,0 +1,40 @@ +<# +.SYNOPSIS +Retrieves the Known IP Database for a specific customer tenant. + +.DESCRIPTION +The Get-CIPPKnownIPDB function retrieves the Known IP Database for a specific customer tenant by making a REST API call to the "/api/listknownipdb" endpoint. + +.PARAMETER CustomerTenantID +Specifies the ID of the customer tenant for which to retrieve the Known IP Database. + +.EXAMPLE +Get-CIPPKnownIPDB -CustomerTenantID "12345678" +Retrieves the Known IP Database for the customer tenant with ID "12345678". + +.INPUTS +None. + +.OUTPUTS +System.Object + +.NOTES +This function requires the Invoke-CIPPRestMethod function to be available. + +.LINK +Invoke-CIPPRestMethod +#> +function Get-CIPPKnownIPDB { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $false)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting Known IP Database for $CustomerTenantID" + $endpoint = "/api/listknownipdb" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/CIPP/Core/Get-CIPPLogs.ps1 b/CIPPAPIModule/public/CIPP/Core/Get-CIPPLogs.ps1 new file mode 100644 index 0000000..7252a40 --- /dev/null +++ b/CIPPAPIModule/public/CIPP/Core/Get-CIPPLogs.ps1 @@ -0,0 +1,25 @@ +<# +.SYNOPSIS +Retrieves CIPP logs from the API. + +.DESCRIPTION +The Get-CIPPLogs function retrieves logs from the CIPP API by invoking the "/api/ListLogs" endpoint. + +.PARAMETER None +This function does not accept any parameters. + +.EXAMPLE +Get-CIPPLogs +Retrieves CIPP logs from the API. + +#> + +function Get-CIPPLogs { + [CmdletBinding()] + Param() + + Write-Verbose "Getting CIPP Logs" + $endpoint = "/api/ListLogs" + + Invoke-CIPPRestMethod -Endpoint $endpoint +} diff --git a/CIPPAPIModule/public/CIPP/Core/Get-CIPPPublicPhishingCheck.ps1 b/CIPPAPIModule/public/CIPP/Core/Get-CIPPPublicPhishingCheck.ps1 new file mode 100644 index 0000000..3a75c8d --- /dev/null +++ b/CIPPAPIModule/public/CIPP/Core/Get-CIPPPublicPhishingCheck.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Retrieves public phishing check for a specific customer tenant. + +.DESCRIPTION +The Get-CIPPPublicPhishingCheck function retrieves the public phishing check for a specific customer tenant. It makes an API call to the "/api/publicphishingcheck" endpoint with the provided tenant ID. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which to retrieve the public phishing check. + +.EXAMPLE +Get-CIPPPublicPhishingCheck -CustomerTenantID "12345" +Retrieves the public phishing check for the customer tenant with the ID "12345". + +#> +function Get-CIPPPublicPhishingCheck { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting public phishing check $CustomerTenantID" + $endpoint = "/api/publicphishingcheck" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/CIPP/Core/Set-CIPPExecCPVPerms.ps1 b/CIPPAPIModule/public/CIPP/Core/Set-CIPPExecCPVPerms.ps1 new file mode 100644 index 0000000..c7fd4de --- /dev/null +++ b/CIPPAPIModule/public/CIPP/Core/Set-CIPPExecCPVPerms.ps1 @@ -0,0 +1,42 @@ +<# +.SYNOPSIS +Sets the CPV (Customer Provided Values) permissions for a specific customer tenant. + +.DESCRIPTION +The Set-CIPPExecCPVPerms function is used to refresh the CPV permissions for a specified customer tenant. It calls the Invoke-CIPPRestMethod function internally to make the REST API call. + +.PARAMETER CustomerTenantID +Specifies the ID of the customer tenant for which the CPV permissions need to be refreshed. This parameter is mandatory. + +.PARAMETER resetsp +Specifies whether to reset the Stored Procedure (SP) associated with the CPV permissions. The valid values are "true" and "false". This parameter is optional and defaults to "false". + +.EXAMPLE +Set-CIPPExecCPVPerms -CustomerTenantID "12345678-1234-1234-1234-1234567890AB" -resetsp "true" +Refreshes the CPV permissions for the customer tenant with the ID "12345678-1234-1234-1234-1234567890AB" and resets the associated Stored Procedure. + +.EXAMPLE +Set-CIPPExecCPVPerms -CustomerTenantID "87654321-4321-4321-4321-0987654321BA" +Refreshes the CPV permissions for the customer tenant with the ID "87654321-4321-4321-4321-0987654321BA" without resetting the associated Stored Procedure. +#> +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 +} diff --git a/CIPPAPIModule/public/CIPP/Settings/Get-CIPPVersion.ps1 b/CIPPAPIModule/public/CIPP/Settings/Get-CIPPVersion.ps1 new file mode 100644 index 0000000..6f36d17 --- /dev/null +++ b/CIPPAPIModule/public/CIPP/Settings/Get-CIPPVersion.ps1 @@ -0,0 +1,24 @@ +<# +.SYNOPSIS + Retrieves the version of the CIPP application. + +.DESCRIPTION + The Get-CIPPVersion function retrieves the version of the CIPP application by making a REST API call to the "/api/Getversion" endpoint. + +.PARAMETER None + This function does not accept any parameters. + +.EXAMPLE + Get-CIPPVersion + Retrieves the version of the CIPP application. + +#> +function Get-CIPPVersion { + [CmdletBinding()] + Param() + + Write-Verbose "Getting CIPP Version" + $endpoint = "/api/Getversion" + + Invoke-CIPPRestMethod -Endpoint $endpoint +} diff --git a/public/Email-Exchange/Add-CIPPContact.ps1 b/CIPPAPIModule/public/Email-Exchange/Add-CIPPContact.ps1 similarity index 50% rename from public/Email-Exchange/Add-CIPPContact.ps1 rename to CIPPAPIModule/public/Email-Exchange/Add-CIPPContact.ps1 index a47324a..e777253 100644 --- a/public/Email-Exchange/Add-CIPPContact.ps1 +++ b/CIPPAPIModule/public/Email-Exchange/Add-CIPPContact.ps1 @@ -1,3 +1,30 @@ +<# +.SYNOPSIS +Adds a contact to a customer's tenant. + +.DESCRIPTION +The Add-CIPPContact function adds a contact to a customer's tenant using the CIPP API. It requires the customer's tenant ID, display name, external email address, first name, and last name as mandatory parameters. + +.PARAMETER CustomerTenantID +The ID of the customer's tenant. + +.PARAMETER DisplayName +The display name of the contact. + +.PARAMETER ExternalEmailAddress +The external email address of the contact. + +.PARAMETER FirstName +The first name of the contact. + +.PARAMETER LastName +The last name of the contact. + +.EXAMPLE +Add-CIPPContact -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -DisplayName "John Doe" -ExternalEmailAddress "john.doe@example.com" -FirstName "John" -LastName "Doe" +Adds a contact with the specified details to the customer's tenant. + +#> function Add-CIPPContact { [CmdletBinding()] Param( diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPCalendarPerms.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPCalendarPerms.ps1 new file mode 100644 index 0000000..1ff0be8 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPCalendarPerms.ps1 @@ -0,0 +1,36 @@ +<# +.SYNOPSIS +Retrieves calendar permissions for a user in a specified customer tenant. + +.DESCRIPTION +The Get-CIPPCalendarPerms function retrieves the calendar permissions for a user in a specified customer tenant using the CIPP API. It sends a request to the "/api/listcalendarpermissions" endpoint with the provided customer tenant ID and user ID. + +.PARAMETER CustomerTenantID +The ID of the customer tenant. + +.PARAMETER UserID +The ID of the user. + +.EXAMPLE +Get-CIPPCalendarPerms -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "john.doe@example.com" +Retrieves the calendar permissions for the user "john.doe@example.com" in the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> + +function Get-CIPPCalendarPerms { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$UserID + ) + + Write-Verbose "Getting user calendar permissions for user: $UserID" + $Endpoint = "/api/listcalendarpermissions" + $Params = @{ + tenantfilter = $CustomerTenantID + userId = $UserID + } + Invoke-CIPPRestMethod -Endpoint $Endpoint -Params $Params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPContacts.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPContacts.ps1 new file mode 100644 index 0000000..6203ecb --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPContacts.ps1 @@ -0,0 +1,44 @@ +<# +.SYNOPSIS +Retrieves contact details for a specific contact or all contacts for a given tenant. + +.DESCRIPTION +The Get-CIPPContacts function retrieves contact details for a specific contact or all contacts for a given tenant in the CIPP system. It makes use of the Invoke-CIPPRestMethod function to send a request to the CIPP API. + +.PARAMETER CustomerTenantID +Specifies the ID of the customer tenant for which to retrieve the contacts. This parameter is mandatory. + +.PARAMETER ContactID +Specifies the ID of the contact to retrieve details for. If not provided, details for all contacts in the specified tenant will be retrieved. This parameter is optional. + +.EXAMPLE +Get-CIPPContacts -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -ContactID "65be49bb-85cb-4d92-9e34-9e855d0c830c" +Retrieves contact details for the contact with ID "65be49bb-85cb-4d92-9e34-9e855d0c830c" in the tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +.EXAMPLE +Get-CIPPContacts -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves contact details for all contacts in the tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPContacts { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $false)] + [GUID]$ContactID + ) + + if ($ContactID) { + Write-Verbose "Getting Contact details for Contact: $ContactID" + } else { + Write-Verbose "Getting all Contacts for tenant $CustomerTenantID" + } + $endpoint = "/api/listcontacts" + $params = @{ + tenantfilter = $CustomerTenantID + contactid = $ContactID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params + +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPEnabledSharedMailboxes.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPEnabledSharedMailboxes.ps1 new file mode 100644 index 0000000..9d61dbe --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPEnabledSharedMailboxes.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Retrieves shared mailboxes with account enabled for a specific customer tenant ID. + +.DESCRIPTION +The Get-CIPPEnabledSharedMailboxes function retrieves shared mailboxes with account enabled for a specific customer tenant ID. It makes use of the Invoke-CIPPRestMethod function to send a request to the CIPP API and retrieve the shared mailboxes. + +.PARAMETER CustomerTenantID +Specifies the customer tenant ID for which to retrieve the shared mailboxes. + +.EXAMPLE +Get-CIPPEnabledSharedMailboxes -CustomerTenantID "contoso.onmicrosoft.com" +Retrieves shared mailboxes with account enabled for the "contoso.onmicrosoft.com" customer tenant ID. + +#> +function Get-CIPPEnabledSharedMailboxes { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting shared mailboxes with account enabled for $CustomerTenantID" + $endpoint = "/api/listsharedmailboxaccountenabled" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPExchangeConnectorTemplates.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPExchangeConnectorTemplates.ps1 new file mode 100644 index 0000000..dbaa5c9 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPExchangeConnectorTemplates.ps1 @@ -0,0 +1,25 @@ +<# +.SYNOPSIS +Retrieves the Exchange Connector Templates. + +.DESCRIPTION +The Get-CIPPExchangeConnectorTemplates function retrieves the Exchange Connector Templates by making a REST API call to the specified endpoint. + +.PARAMETER None +This function does not accept any parameters. + +.EXAMPLE +Get-CIPPExchangeConnectorTemplates +This example demonstrates how to use the Get-CIPPExchangeConnectorTemplates function to retrieve the Exchange Connector Templates. + +#> + +function Get-CIPPExchangeConnectorTemplates { + [CmdletBinding()] + Param() + + Write-Verbose "Getting Exchange Connectors Templates" + $endpoint = "/api/listexconnectortemplates" + + Invoke-CIPPRestMethod -Endpoint $endpoint +} diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPExchangeConnectors.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPExchangeConnectors.ps1 new file mode 100644 index 0000000..8bdb835 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPExchangeConnectors.ps1 @@ -0,0 +1,30 @@ +<# +.SYNOPSIS +Retrieves Exchange Connectors for a specific customer. + +.DESCRIPTION +The Get-CIPPExchangeConnectors function retrieves Exchange Connectors for a specific customer based on the provided CustomerTenantID. + +.PARAMETER CustomerTenantID +Specifies the unique identifier of the customer's tenant. + +.EXAMPLE +Get-CIPPExchangeConnectors -CustomerTenantID "Get-CIPPEnabledSharedMailboxes" +Retrieves the Exchange Connectors for the customer with the tenant ID "Get-CIPPEnabledSharedMailboxes". + +#> + +function Get-CIPPExchangeConnectors { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting Exchange Connectors for customer: $CustomerTenantID" + $endpoint = "/api/listexchangeconnectors" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailQuarantine.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailQuarantine.ps1 new file mode 100644 index 0000000..b3d9b1f --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailQuarantine.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Retrieves the mail quarantine for a specific customer tenant. + +.DESCRIPTION +The Get-CIPPMailQuarantine function retrieves the mail quarantine for a specific customer tenant by making a REST API call to the "/api/listmailquarantine" endpoint. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which to retrieve the mail quarantine. + +.EXAMPLE +Get-CIPPMailQuarantine -CustomerTenantID "contoso.onmicrosoft.com" +Retrieves the mail quarantine for the customer tenant with the ID "contoso.onmicrosoft.com". + +#> +function Get-CIPPMailQuarantine { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting mail quarantine for $CustomerTenantID" + $endpoint = "/api/listmailquarantine" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxMobileDevices.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxMobileDevices.ps1 new file mode 100644 index 0000000..8d78282 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxMobileDevices.ps1 @@ -0,0 +1,35 @@ +<# +.SYNOPSIS +Retrieves the mobile devices associated with a mailbox. + +.DESCRIPTION +The Get-CIPPMailboxMobileDevices function retrieves the mobile devices associated with a mailbox in the CIPP system. It makes use of the Invoke-CIPPRestMethod function to send a request to the CIPP API and retrieve the mobile devices. + +.PARAMETER CustomerTenantID +Specifies the ID of the customer tenant. + +.PARAMETER Mailbox +Specifies the mailbox for which to retrieve the mobile devices. + +.EXAMPLE +Get-CIPPMailboxMobileDevices -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -Mailbox "user@example.com" +Retrieves the mobile devices associated with the mailbox "user@example.com" in the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPMailboxMobileDevices { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$Mailbox + ) + + Write-Verbose "Getting mailbox mobile devices for $Mailbox" + $endpoint = "/api/listmailboxmobiledevices" + $params = @{ + tenantfilter = $CustomerTenantID + mailbox = $Mailbox + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxPermissions.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxPermissions.ps1 new file mode 100644 index 0000000..bef5993 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxPermissions.ps1 @@ -0,0 +1,37 @@ +<# +.SYNOPSIS +Retrieves mailbox permissions for a specified customer tenant and user ID. + +.DESCRIPTION +The Get-CIPPMailboxPermissions function retrieves mailbox permissions for a specified customer tenant and user ID. It makes an API call to the "/api/listmailboxpermissions" endpoint with the provided parameters. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which mailbox permissions are to be retrieved. This parameter is mandatory. + +.PARAMETER UserID +The ID of the user for which mailbox permissions are to be retrieved. This parameter is mandatory. + +.EXAMPLE +Get-CIPPMailboxPermissions -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "user1@domain.com" + +This example retrieves mailbox permissions for the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" and the user with ID "user1@domain.com". + +#> + +function Get-CIPPMailboxPermissions { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$UserID + ) + + Write-Verbose "Getting mailbox permissions for $CustomerTenantID" + $endpoint = "/api/listmailboxpermissions" + $params = @{ + tenantfilter = $CustomerTenantID + userid = $UserID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxRestores.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxRestores.ps1 new file mode 100644 index 0000000..ab9c3b4 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxRestores.ps1 @@ -0,0 +1,54 @@ +<# +.SYNOPSIS + Retrieves mailbox restores for a specified customer tenant. + +.DESCRIPTION + The Get-CIPPMailboxRestores function retrieves mailbox restores for a specified customer tenant in the CIPP project. It uses the Invoke-CIPPRestMethod function to make a REST API call to the "/api/listmailboxrestores" endpoint. + +.PARAMETER CustomerTenantID + Specifies the ID of the customer tenant for which mailbox restores should be retrieved. This parameter is mandatory. + +.PARAMETER Identity + Specifies the identity of the mailbox for which restores should be retrieved. This parameter is optional. + +.PARAMETER Includereport + Indicates whether to include the restore report in the results. This parameter is optional. + +.PARAMETER Statistics + Indicates whether to include statistics about the restores in the results. This parameter is optional. + +.EXAMPLE + Get-CIPPMailboxRestores -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -Identity "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" -Includereport -Statistics + Retrieves mailbox restores for the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" and includes the restore report and statistics in the results. + +#> +function Get-CIPPMailboxRestores { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $false)] + [string]$Identity, + [Parameter(Mandatory = $false)] + [switch]$Includereport, + [Parameter(Mandatory = $false)] + [switch]$Statistics + ) + + Write-Verbose "Getting mailbox restores for $CustomerTenantID" + $endpoint = "/api/listmailboxrestores" + $params = @{ + tenantfilter = $CustomerTenantID + identity = $Identity + } + + if ($Includereport) { + $params.IncludeReport = "true" + } + + if ($Statistics) { + $params.Statistics = "true" + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxRules.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxRules.ps1 new file mode 100644 index 0000000..1994695 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxRules.ps1 @@ -0,0 +1,30 @@ +<# +.SYNOPSIS +Retrieves mailbox rules for a specified customer tenant ID. + +.DESCRIPTION +The Get-CIPPMailboxRules function retrieves mailbox rules for a specified customer tenant ID by making a REST API call to the "/api/listmailboxrules" endpoint. + +.PARAMETER CustomerTenantID +The customer tenant ID for which to retrieve mailbox rules. + +.EXAMPLE +Get-CIPPMailboxRules -CustomerTenantID "contoso.onmicrosoft.com" + +This example retrieves mailbox rules for the customer tenant with the ID "contoso.onmicrosoft.com". + +#> +function Get-CIPPMailboxRules { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting mailbox rules for $CustomerTenantID" + $endpoint = "/api/listmailboxrules" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxStatistics.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxStatistics.ps1 new file mode 100644 index 0000000..749915f --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxStatistics.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Retrieves mailbox statistics for a specified customer tenant ID. + +.DESCRIPTION +The Get-CIPPMailboxStatistics function retrieves mailbox statistics for a specified customer tenant ID by making a REST API call to the "/api/listmailboxstatistics" endpoint. + +.PARAMETER CustomerTenantID +Specifies the customer tenant ID for which mailbox statistics need to be retrieved. + +.EXAMPLE +Get-CIPPMailboxStatistics -CustomerTenantID "contoso.onmicrosoft.com" +Retrieves mailbox statistics for the customer tenant with the ID "contoso.onmicrosoft.com". + +#> +function Get-CIPPMailboxStatistics { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting mailbox statistics for $CustomerTenantID" + $endpoint = "/api/listmailboxstatistics" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxes.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxes.ps1 new file mode 100644 index 0000000..f470173 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPMailboxes.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Retrieves a list of mailboxes for a specific customer tenant. + +.DESCRIPTION +The Get-CIPPMailboxes function retrieves a list of mailboxes for a specific customer tenant by making a REST API call to the "/api/ListMailboxes" endpoint. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which to retrieve the mailbox list. + +.EXAMPLE +Get-CIPPMailboxes -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves the mailbox list for the customer tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPMailboxes { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting Mailbox List for $CustomerTenantID" + $endpoint = "/api/ListMailboxes" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPMessageTrace.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPMessageTrace.ps1 new file mode 100644 index 0000000..3cf3877 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPMessageTrace.ps1 @@ -0,0 +1,57 @@ +<# +.SYNOPSIS + Retrieves the message trace for a specific customer tenant ID. + +.DESCRIPTION + The Get-CIPPMessageTrace function retrieves the message trace for a specific customer tenant ID within a specified number of days. + It can also filter the results based on the sender and recipient email addresses. + +.PARAMETER CustomerTenantID + Specifies the customer tenant ID for which the message trace needs to be retrieved. This parameter is mandatory. + +.PARAMETER Days + Specifies the number of days within which the message trace needs to be retrieved. This parameter is mandatory. + +.PARAMETER Sender + Specifies the sender email address to filter the message trace results. This parameter is optional. + +.PARAMETER Recipient + Specifies the recipient email address to filter the message trace results. This parameter is optional. + +.EXAMPLE + Get-CIPPMessageTrace -CustomerTenantID "contoso.onmicrosoft.com" -Days 7 + Retrieves the message trace for the customer tenant ID "contoso.onmicrosoft.com" within the last 7 days. + +.EXAMPLE + Get-CIPPMessageTrace -CustomerTenantID "contoso.onmicrosoft.com" -Days 30 -Sender "john.doe@contoso.com" + Retrieves the message trace for the customer tenant ID "contoso.onmicrosoft.com" within the last 30 days, + filtering the results to include only messages sent by "john.doe@contoso.com". + +.EXAMPLE + Get-CIPPMessageTrace -CustomerTenantID "contoso.onmicrosoft.com" -Days 14 -Recipient "jane.smith@contoso.com" + Retrieves the message trace for the customer tenant ID "contoso.onmicrosoft.com" within the last 14 days, + filtering the results to include only messages received by "jane.smith@contoso.com". +#> +function Get-CIPPMessageTrace { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$Days, + [Parameter(Mandatory = $false)] + [string]$Sender, + [Parameter(Mandatory = $false)] + [string]$Recipient + ) + + Write-Verbose "Getting message trace for $CustomerTenantID" + $endpoint = "/api/listmessagetrace" + $params = @{ + tenantfilter = $CustomerTenantID + days = $Days + sender = $Sender + recipient = $Recipient + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPOutOfOffice.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPOutOfOffice.ps1 new file mode 100644 index 0000000..61b6616 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPOutOfOffice.ps1 @@ -0,0 +1,35 @@ +<# +.SYNOPSIS + Retrieves the out of office status for a specified user. + +.DESCRIPTION + The Get-CIPPOutOfOffice function retrieves the out of office status for a specified user in a customer's tenant. + +.PARAMETER CustomerTenantID + Specifies the ID of the customer's tenant. + +.PARAMETER UserID + Specifies the ID of the user. + +.EXAMPLE + Get-CIPPOutOfOffice -CustomerTenantID "contoso.onmicrosoft.com" -UserID "john.doe@domain.com" + Retrieves the out of office status for the user with the ID "john.doe@domain.com" in the customer's tenant with the ID "contoso.onmicrosoft.com". + +#> +function Get-CIPPOutOfOffice { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$UserID + ) + + Write-Verbose "Getting out of office for $UserID" + $endpoint = "/api/listooo" + $params = @{ + tenantfilter = $CustomerTenantID + userid = $UserID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPPhishPolicies.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPPhishPolicies.ps1 new file mode 100644 index 0000000..612fba3 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPPhishPolicies.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Retrieves the phishing policies for a specific customer tenant. + +.DESCRIPTION +The Get-CIPPPhishPolicies function retrieves the phishing policies for a specific customer tenant by making a REST API call to the "/api/listphishpolicies" endpoint. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which to retrieve the phishing policies. + +.EXAMPLE +Get-CIPPPhishPolicies -CustomerTenantID "contoso.onmicrosoft.com" +Retrieves the phishing policies for the customer tenant with the ID "contoso.onmicrosoft.com". + +#> +function Get-CIPPPhishPolicies { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting Phish Policies for $CustomerTenantID" + $endpoint = "/api/listphishpolicies" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPRecipients.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPRecipients.ps1 new file mode 100644 index 0000000..7ce5cf8 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPRecipients.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Retrieves recipients for a specified customer tenant ID. + +.DESCRIPTION +The Get-CIPPRecipients function retrieves recipients for a specified customer tenant ID by making a REST API call to the "/api/listrecipients" endpoint. + +.PARAMETER CustomerTenantID +Specifies the customer tenant ID for which to retrieve recipients. + +.EXAMPLE +Get-CIPPRecipients -CustomerTenantID "contoso.onmicrosoft.com" +Retrieves recipients for the customer tenant ID "contoso.onmicrosoft.com". + +#> +function Get-CIPPRecipients { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting recipients for $CustomerTenantID" + $endpoint = "/api/listrecipients" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPSpamFilter.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPSpamFilter.ps1 new file mode 100644 index 0000000..96c8551 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPSpamFilter.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Retrieves the spam filter settings for a specified customer tenant ID. + +.DESCRIPTION +The Get-CIPPSpamFilter function retrieves the spam filter settings for a specified customer tenant ID using the CIPP API. It sends a request to the "/api/listspamfilter" endpoint with the provided tenant ID as a filter parameter. + +.PARAMETER CustomerTenantID +The customer tenant ID for which to retrieve the spam filter settings. This parameter is mandatory. + +.EXAMPLE +Get-CIPPSpamFilter -CustomerTenantID "contoso.onmicrosoft.com" +Retrieves the spam filter settings for the customer tenant with the ID "contoso.onmicrosoft.com". + +#> +function Get-CIPPSpamFilter { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting spam filter settings for $CustomerTenantID" + $endpoint = "/api/listspamfilter" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPSpamFilterTemplates.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPSpamFilterTemplates.ps1 new file mode 100644 index 0000000..65cefdd --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPSpamFilterTemplates.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Retrieves spam filter templates from the CIPP API. + +.DESCRIPTION +The Get-CIPPSpamFilterTemplates function retrieves spam filter templates from the CIPP API. It makes a REST API call to the "/api/listspamfiltertemplates" endpoint and returns the templates. + +.PARAMETER TemplateID +Specifies the ID of the template to retrieve. This parameter is optional. + +.EXAMPLE +Get-CIPPSpamFilterTemplates -TemplateID "12345" +Retrieves the spam filter template with the ID "12345" from the CIPP API. + +#> +function Get-CIPPSpamFilterTemplates { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $false)] + [string]$TemplateID + ) + + Write-Verbose "Getting spam filter templates" + $endpoint = "/api/listspamfiltertemplates" + $params = @{ + id = $TemplateID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPTransportRules.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPTransportRules.ps1 new file mode 100644 index 0000000..c203103 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPTransportRules.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Retrieves transport rules for a specified customer tenant ID. + +.DESCRIPTION +The Get-CIPPTransportRules function retrieves transport rules for a specified customer tenant ID using the CIPP API. + +.PARAMETER CustomerTenantID +The unique identifier of the customer tenant for which to retrieve the transport rules. + +.EXAMPLE +Get-CIPPTransportRules -CustomerTenantID "contoso.onmicrosoft.com" +Retrieves the transport rules for the customer tenant with the ID "contoso.onmicrosoft.com". + +#> +function Get-CIPPTransportRules { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting transport rules for $CustomerTenantID" + $endpoint = "/api/listtransportrulestemplates" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPUserMailboxDetails.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPUserMailboxDetails.ps1 new file mode 100644 index 0000000..3da8ea1 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPUserMailboxDetails.ps1 @@ -0,0 +1,37 @@ +<# +.SYNOPSIS +Retrieves the mailbox details for a specific user in the CIPP system. + +.DESCRIPTION +The Get-CIPPUserMailboxDetails function retrieves the mailbox details for a specific user in the CIPP system. It makes an API call to the "/api/listusermailboxdetails" endpoint, passing the customer tenant ID and user ID as parameters. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which to retrieve the mailbox details. + +.PARAMETER UserID +The ID of the user for which to retrieve the mailbox details. + +.EXAMPLE +Get-CIPPUserMailboxDetails -CustomerTenantID "contoso.onmicrosoft.com" -UserID "user@domain.com" +Retrieves the mailbox details for the user with ID "user@domain.com" in the customer tenant with ID "contoso.onmicrosoft.com". + +#> + +function Get-CIPPUserMailboxDetails { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$UserID + ) + + Write-Verbose "Getting user Mailbox Details for $userID" + + $endpoint = "/api/listusermailboxdetails" + $params = @{ + tenantfilter = $CustomerTenantID + userId = $UserID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Get-CIPPUserMailboxRules.ps1 b/CIPPAPIModule/public/Email-Exchange/Get-CIPPUserMailboxRules.ps1 new file mode 100644 index 0000000..5477faa --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Get-CIPPUserMailboxRules.ps1 @@ -0,0 +1,37 @@ +<# +.SYNOPSIS +Retrieves the mailbox rules for a specific user in the CIPP system. + +.DESCRIPTION +The Get-CIPPUserMailboxRules function retrieves the mailbox rules for a specific user in the CIPP system. It makes an API call to the "/api/listusermailboxrules" endpoint, passing the customer tenant ID and user ID as parameters. + +.PARAMETER CustomerTenantID +The ID of the customer tenant. + +.PARAMETER UserID +The ID of the user. + +.EXAMPLE +Get-CIPPUserMailboxRules -CustomerTenantID "contoso.onmicrosoft.com" -UserID "user@domain.com" +Retrieves the mailbox rules for the user with the ID "user@domain.com" in the customer tenant with the ID "contoso.onmicrosoft.com". + +#> + +function Get-CIPPUserMailboxRules { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$UserID + ) + + Write-Verbose "Getting user Mailbox Rules for $userID" + + $endpoint = "/api/listusermailboxrules" + $params = @{ + tenantfilter = $CustomerTenantID + userId = $UserID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Set-CIPPCalendarPermissions.ps1 b/CIPPAPIModule/public/Email-Exchange/Set-CIPPCalendarPermissions.ps1 new file mode 100644 index 0000000..d21f465 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Set-CIPPCalendarPermissions.ps1 @@ -0,0 +1,85 @@ +<# +.SYNOPSIS +Sets calendar permissions for a user in a customer's tenant. + +.DESCRIPTION +The Set-CIPPCalendarPermissions function is used to edit calendar permissions for a specified user in a customer's tenant. It allows you to set different levels of permissions for the user on the calendar folder. + +.PARAMETER CustomerTenantID +Specifies the ID of the customer's tenant. + +.PARAMETER Permissions +Specifies the level of permissions to be set for the user on the calendar folder. Valid values are: +- Author +- Contributor +- Editor +- Owner +- Non Editing Author +- Publishing Author +- Publishing Editor +- Reviewer +- LimitedDetails +- AvailabilityOnly + +.PARAMETER Userid +Specifies the ID of the user for whom the calendar permissions are being set. + +.PARAMETER RemoveAccess +Specifies whether to remove the user's access to the calendar folder. This parameter is optional. + +.PARAMETER usertogetpermissions +Specifies the ID of the user for whom you are giving permission to. This parameter is optional. + +.PARAMETER FolderName +Specifies the name of the calendar folder. The default value is "Calendar". + +.EXAMPLE +Set-CIPPCalendarPermissions -CustomerTenantID "contoso.onmicrosoft.com" -Permissions "Editor" -Userid "user@example.com" + +This example sets the calendar permissions for the user with the ID "user@example.com" in the customer's tenant with the ID "contoso.onmicrosoft.com" to "Editor" level. + +#> + +function Set-CIPPCalendarPermissions { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $false)] + [ValidateSet( + "Author", + "Contributor", + "Editor", + "Owner", + "Non Editing Author", + "Publishing Author", + "Publishing Editor", + "Reviewer", + "LimitedDetails", + "AvailabilityOnly" + )] + [string]$Permissions, + [Parameter(Mandatory = $true)] + [string]$Userid, + [Parameter(Mandatory = $false)] + [string]$RemoveAccess, + [Parameter(Mandatory = $false)] + [string]$usertogetpermissions, + [Parameter(Mandatory = $false)] + [string]$FolderName = "Calendar" + ) + + + Write-Verbose "Editing calendar permissions for $Userid" + $endpoint = "/api/execeditcalendarpermissions" + $params = @{ + TenantFilter = $CustomerTenantID + permissions = $Permissions + userid = $Userid + removeaccess = $RemoveAccess + usertogetpermissions = $usertogetpermissions + FolderName = $FolderName + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Set-CIPPConvertMailbox.ps1 b/CIPPAPIModule/public/Email-Exchange/Set-CIPPConvertMailbox.ps1 new file mode 100644 index 0000000..74fc155 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Set-CIPPConvertMailbox.ps1 @@ -0,0 +1,47 @@ +<# +.SYNOPSIS +Converts a mailbox to a shared mailbox or user mailbox in the CIPP system. + +.DESCRIPTION +The Set-CIPPConvertMailbox function is used to convert a mailbox in the CIPP system to either a shared mailbox or a user mailbox. It sends a request to the CIPP API to perform the conversion. + +.PARAMETER CustomerTenantID +The ID of the customer tenant where the mailbox belongs. + +.PARAMETER UserID +The ID of the user whose mailbox needs to be converted. + +.PARAMETER ConvertToUserMailbox +Specifies whether the mailbox should be converted to a user mailbox. If this switch is provided, the mailbox will be converted to a user mailbox. If not provided, the mailbox will be converted to a shared mailbox. + +.EXAMPLE +Set-CIPPConvertMailbox -CustomerTenantID "contoso.onmicrosoft.com" -UserID "user@domain.com" -ConvertToUserMailbox +Converts the mailbox of user "user1" in the customer tenant "contoso.onmicrosoft.com" to a user mailbox. + +.EXAMPLE +Set-CIPPConvertMailbox -CustomerTenantID "contoso.onmicrosoft.com" -UserID "user@domain.com" +Converts the mailbox of user "user@domain.com" in the customer tenant "contoso.onmicrosoft.com" to a shared mailbox. + +#> +function Set-CIPPConvertMailbox { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$UserID, + [Parameter(Mandatory = $false)] + [switch]$ConvertToUserMailbox + ) + + Write-Verbose "Converting Mailbox $userID" + + $endpoint = "/api/execconverttosharedmailbox" + $params = @{ + tenantfilter = $CustomerTenantID + id = $UserID + ConvertToUser = if ($ConvertToUserMailbox) { "true" } else { "false" } + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Set-CIPPCopyToSent.ps1 b/CIPPAPIModule/public/Email-Exchange/Set-CIPPCopyToSent.ps1 new file mode 100644 index 0000000..cfc8dbc --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Set-CIPPCopyToSent.ps1 @@ -0,0 +1,49 @@ +<# +.SYNOPSIS + Sets the option to copy sent items to a shared mailbox for a specific user. + +.DESCRIPTION + The Set-CIPPCopyToSent function sets the option to copy sent items to a shared mailbox for a specific user in the CIPP system. + +.PARAMETER CustomerTenantID + Specifies the ID of the customer's tenant. + +.PARAMETER UserID + Specifies the ID of the user. + +.PARAMETER MessageCopyForSentAsEnabled + Specifies whether to enable or disable the option to copy sent items for the user. Valid values are "true" or "false". The default value is "true". + +.EXAMPLE + Set-CIPPCopyToSent -CustomerTenantID "contoso.onmicrosoft.com" -UserID "john.doe@domain.com" -MessageCopyForSentAsEnabled "true" + + This example sets the option to copy sent items to a shared mailbox for the user "john.doe@domain.com" in the customer's tenant with ID "contoso.onmicrosoft.com". + +#> +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 +} diff --git a/CIPPAPIModule/public/Email-Exchange/Set-CIPPEnableArchive.ps1 b/CIPPAPIModule/public/Email-Exchange/Set-CIPPEnableArchive.ps1 new file mode 100644 index 0000000..baee5d0 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Set-CIPPEnableArchive.ps1 @@ -0,0 +1,39 @@ +<# +.SYNOPSIS +Enables email archiving for a specified user in the CIPP system. + +.DESCRIPTION +The Set-CIPPEnableArchive function enables email archiving for a specified user in the CIPP system. It sends a request to the CIPP API to enable email archiving for the user identified by the provided CustomerTenantID and UserID. + +.PARAMETER CustomerTenantID +The unique identifier of the customer tenant. + +.PARAMETER UserID +The unique identifier of the user. + +.EXAMPLE +Set-CIPPEnableArchive -CustomerTenantID "contoso.onmicrosoft.com" -UserID "user@domain.com" +Enables email archiving for the user with the CustomerTenantID "contoso.onmicrosoft.com" and UserID "user@domain.com". + +#> + +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 +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Email-Exchange/Set-CIPPExchConnector.ps1 b/CIPPAPIModule/public/Email-Exchange/Set-CIPPExchConnector.ps1 new file mode 100644 index 0000000..5384743 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Set-CIPPExchConnector.ps1 @@ -0,0 +1,51 @@ +<# +.SYNOPSIS +Sets the state and type of an Exchange Connector for a specific customer tenant. + +.DESCRIPTION +The Set-CIPPExchConnector function is used to edit the state and type of an Exchange Connector for a specific customer tenant. It sends a REST API request to update the connector settings. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which the Exchange Connector needs to be edited. + +.PARAMETER State +The state of the Exchange Connector. Valid values are "Enable" and "Disabled". + +.PARAMETER Guid +The GUID of the Exchange Connector. + +.PARAMETER Type +The type of the Exchange Connector. + +.EXAMPLE +Set-CIPPExchConnector -CustomerTenantID "contoso.onmicrosoft.com" -State "Enable" -Guid "abcdefg" -Type "Inbound" + +This example sets the state of the Exchange Connector for the customer tenant with ID "contoso.onmicrosoft.com" to "Enable", using the GUID "abcdefg" and the type "Inbound". + +#> +function Set-CIPPExchConnector { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory)] + [ValidateSet("Enable", "Disabled")] + [string]$State, + [Parameter(Mandatory = $true)] + [guid]$Guid, + [Parameter(Mandatory = $true)] + [string]$Type + ) + + + Write-Verbose "Editing Exchange Connector for tenant $CustomerTenantID" + $endpoint = "/api/editexconnector" + $params = @{ + TenantFilter = $CustomerTenantID + state = $State + GUID = $Guid + Type = $Type + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Set-CIPPHideFromGAL.ps1 b/CIPPAPIModule/public/Email-Exchange/Set-CIPPHideFromGAL.ps1 new file mode 100644 index 0000000..8b72ca7 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Set-CIPPHideFromGAL.ps1 @@ -0,0 +1,50 @@ +<# +.SYNOPSIS +Sets the "hide from Global Address List (GAL)" property for a user in a customer's tenant. + +.DESCRIPTION +The Set-CIPPHideFromGAL function is used to set the "hide from GAL" property for a specified user in a customer's tenant. This property determines whether the user's email address is visible in the Global Address List (GAL) or not. + +.PARAMETER CustomerTenantID +Specifies the ID of the customer's tenant. + +.PARAMETER UserID +Specifies the ID of the user for whom the "hide from GAL" property needs to be set. + +.PARAMETER hidefromgal +Specifies whether the user's email address should be hidden from the GAL or not. Valid values are 'true' and 'false'. + +.EXAMPLE +Set-CIPPHideFromGAL -CustomerTenantID "contoso.onmicrosoft.com" -UserID "user1@example.com" -hidefromgal "true" +Sets the "hide from GAL" property to true for the user with the email address "user1@example.com" in the customer's tenant with ID "contoso.onmicrosoft.com". + +.EXAMPLE +Set-CIPPHideFromGAL -CustomerTenantID "contoso.onmicrosoft.com" -UserID "user2@example.com" -hidefromgal "false" +Sets the "hide from GAL" property to false for the user with the email address "user2@example.com" in the customer's tenant with ID "contoso.onmicrosoft.com". +#> +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 + +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Email-Exchange/Set-CIPPMailboxMobileDevices.ps1 b/CIPPAPIModule/public/Email-Exchange/Set-CIPPMailboxMobileDevices.ps1 new file mode 100644 index 0000000..5df0cf7 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Set-CIPPMailboxMobileDevices.ps1 @@ -0,0 +1,76 @@ +<# +.SYNOPSIS + Edits the mobile device settings for a specified user in a customer's tenant. + +.DESCRIPTION + The Set-CIPPMailboxMobileDevices function allows you to edit the mobile device settings for a specified user in a customer's tenant. + You can set the device ID, user ID, quarantine status, delete status, and device GUID. + +.PARAMETER CustomerTenantID + Specifies the ID of the customer's tenant. + +.PARAMETER DeviceID + Specifies the ID of the mobile device. + +.PARAMETER UserID + Specifies the ID of the user. + +.PARAMETER Quarantine + Specifies whether the mobile device should be quarantined. Valid values are "true" or "False". + +.PARAMETER Delete + Specifies whether the mobile device should be deleted. Valid values are "true" or "False". The default value is "False". + +.PARAMETER DeviceGUID + Specifies the GUID of the mobile device. + +.EXAMPLE + Set-CIPPMailboxMobileDevices -CustomerTenantID "contoso.onmicrosoft.com" -DeviceID "ABCD1234" -UserID "user1@domain.com" -Quarantine "true" + + This example sets the mobile device with the ID "ABCD1234" for the user "user1@domain.com" in the customer's tenant with the ID "contoso.onmicrosoft.com" to be quarantined. + +.EXAMPLE + Set-CIPPMailboxMobileDevices -CustomerTenantID "contoso.onmicrosoft.com" -UserID "user1@domain.com" -Delete "true" -DeviceGUID "EFGH5678" + + This example deletes the mobile device with the GUID "EFGH5678" for the user "user1@domain.com" in the customer's tenant with the ID "contoso.onmicrosoft.com". + +#> +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 +} diff --git a/public/Email-Exchange/Set-CIPPMailboxPermissions.ps1 b/CIPPAPIModule/public/Email-Exchange/Set-CIPPMailboxPermissions.ps1 similarity index 55% rename from public/Email-Exchange/Set-CIPPMailboxPermissions.ps1 rename to CIPPAPIModule/public/Email-Exchange/Set-CIPPMailboxPermissions.ps1 index 6032551..081654e 100644 --- a/public/Email-Exchange/Set-CIPPMailboxPermissions.ps1 +++ b/CIPPAPIModule/public/Email-Exchange/Set-CIPPMailboxPermissions.ps1 @@ -1,3 +1,44 @@ +<# +.SYNOPSIS +Sets mailbox permissions for a user in the CIPP system. + +.DESCRIPTION +The Set-CIPPMailboxPermissions function is used to edit mailbox permissions for a specified user in the CIPP system. It allows you to add or remove full access, send as, and send on behalf permissions for the user's mailbox. + +.PARAMETER CustomerTenantID +The ID of the customer's tenant in the CIPP system. + +.PARAMETER Userid +The ID of the user whose mailbox permissions need to be edited. + +.PARAMETER RemoveFullAccess +An optional array of mailboxes from which to remove full access permissions for the user. + +.PARAMETER AddFullAccessAutoMap +An optional array of mailboxes to which to add full access permissions with automapping enabled for the user. + +.PARAMETER AddFullAccessNoAutoMap +An optional array of mailboxes to which to add full access permissions with automapping disabled for the user. + +.PARAMETER AddSendAs +An optional array of mailboxes to which to add send as permissions for the user. + +.PARAMETER RemoveSendAs +An optional array of mailboxes from which to remove send as permissions for the user. + +.PARAMETER AddSendOnBehalf +An optional array of mailboxes to which to add send on behalf permissions for the user. + +.PARAMETER RemoveSendOnBehalf +An optional array of mailboxes from which to remove send on behalf permissions for the user. + +.EXAMPLE +Set-CIPPMailboxPermissions -CustomerTenantID "contoso.onmicrosoft.com" -Userid "john.doe@example.com" -AddFullAccessAutoMap "mailbox1@example.com", "mailbox2@example.com" -AddSendAs "mailbox3@example.com" + +This example sets mailbox permissions for the user "john.doe@example.com" in the CIPP system. It adds full access permissions with automapping enabled to "mailbox1@example.com" and "mailbox2@example.com", and adds send as permissions to "mailbox3@example.com". + +#> + function Set-CIPPMailboxPermissions { [CmdletBinding()] Param( diff --git a/CIPPAPIModule/public/Email-Exchange/Set-CIPPQuarantineManagement.ps1 b/CIPPAPIModule/public/Email-Exchange/Set-CIPPQuarantineManagement.ps1 new file mode 100644 index 0000000..10562db --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Set-CIPPQuarantineManagement.ps1 @@ -0,0 +1,57 @@ +<# +.SYNOPSIS + Manages quarantine for a specific customer tenant ID. + +.DESCRIPTION + The Set-CIPPQuarantineManagement function is used to manage quarantine for a specific customer tenant ID. It allows you to set various parameters such as the ID, AllowSender, and Type. + +.PARAMETER CustomerTenantID + Specifies the customer tenant ID for which the quarantine management is performed. This parameter is mandatory. + +.PARAMETER ID + Specifies the ID of the quarantine management. This parameter is mandatory. + +.PARAMETER AllowSender + Specifies whether to allow the sender. Valid values are 'true' or 'false'. This parameter is optional. + +.PARAMETER Type + Specifies the type of quarantine management. Valid values are 'Deny' or 'Release'. This parameter is mandatory. + +.EXAMPLE + Set-CIPPQuarantineManagement -CustomerTenantID "contoso.onmicrosoft.com" -ID "67890" -AllowSender "true" -Type "Deny" + + This example sets the quarantine management for the customer tenant ID "contoso.onmicrosoft.com" with the ID "67890". It allows the sender and sets the type to "Deny". + +#> +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 Quarantine for $CustomerTenantID" + $endpoint = "/api/execquarantinemanagement" + $params = @{ + tenantfilter = $CustomerTenantID + id = $ID + allowSender = $AllowSender + type = $Type + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Email-Exchange/Set-CIPPSpamFilter.ps1 b/CIPPAPIModule/public/Email-Exchange/Set-CIPPSpamFilter.ps1 new file mode 100644 index 0000000..fb220c5 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Set-CIPPSpamFilter.ps1 @@ -0,0 +1,53 @@ +<# +.SYNOPSIS +Sets the state of a spam filter for a customer's tenant. + +.DESCRIPTION +The Set-CIPPSpamFilter function is used to edit the state of a spam filter for a customer's tenant. It takes the customer's tenant ID, a unique identifier (optional), the name of the spam filter, and the desired state (Enable or Disable) as parameters. + +.PARAMETER CustomerTenantID +The ID of the customer's tenant. + +.PARAMETER Guid +A unique identifier for the spam filter. This parameter is optional. + +.PARAMETER Name +The name of the spam filter. + +.PARAMETER State +The desired state of the spam filter. Valid values are "Enable" or "Disable". + +.EXAMPLE +Set-CIPPSpamFilter -CustomerTenantID "contoso.onmicrosoft.com" -Name "SpamFilter1" -State "Enable" +Sets the state of the spam filter named "SpamFilter1" to "Enable" for the customer's tenant with ID "contoso.onmicrosoft.com". + +.EXAMPLE +Set-CIPPSpamFilter -CustomerTenantID "contoso.onmicrosoft.com" -Guid "abcdefg" -Name "SpamFilter2" -State "Disable" +Sets the state of the spam filter named "SpamFilter2" to "Disable" for the customer's tenant with ID "contoso.onmicrosoft.com" using the unique identifier "abcdefg". + +#> +function Set-CIPPSpamFilter { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $false)] + [guid]$Guid, + [Parameter(Mandatory = $true)] + [string]$Name, + [Parameter(Mandatory = $true)] + [ValidateSet("Enable", "Disable")] + [string]$State + ) + + Write-Verbose "Editing Spam Filter" + $endpoint = "/api/editspamfilter" + $params = @{ + tenantfilter = $CustomerTenantID + guid = $Guid + name = $Name + state = $State + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Email-Exchange/Set-CIPPTransportRule.ps1 b/CIPPAPIModule/public/Email-Exchange/Set-CIPPTransportRule.ps1 new file mode 100644 index 0000000..e4be7a5 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Set-CIPPTransportRule.ps1 @@ -0,0 +1,48 @@ +<# +.SYNOPSIS +Sets the state of a transport rule for a specific customer tenant. + +.DESCRIPTION +The Set-CIPPTransportRule function is used to set the state of a transport rule for a specific customer tenant in the CIPP API. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which the transport rule needs to be edited. + +.PARAMETER State +The state to set for the transport rule. Valid values are "Enable" and "Disable". + +.PARAMETER Guid +The GUID of the transport rule to be edited. + +.EXAMPLE +Set-CIPPTransportRule -CustomerTenantID "contoso.onmicrosoft.com" -State "Enable" -Guid "abcdefg" +Sets the state of the transport rule with the GUID "abcdefg" to "Enable" for the customer tenant with ID "contoso.onmicrosoft.com". + +.EXAMPLE +Set-CIPPTransportRule -CustomerTenantID "contoso.onmicrosoft.com" -State "Disable" -Guid "hijklmn" +Sets the state of the transport rule with the GUID "hijklmn" to "Disable" for the customer tenant with ID "contoso.onmicrosoft.com". +#> + +function Set-CIPPTransportRule { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory)] + [ValidateSet("Enable", "Disable")] + [string]$State, + [Parameter(Mandatory = $true)] + [guid]$Guid + ) + + + Write-Verbose "Editing transport rule for tenant $CustomerTenantID" + $endpoint = "/api/edittransportrule" + $params = @{ + TenantFilter = $CustomerTenantID + state = $State + GUID = $Guid + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Endpoint/Applications/Get-CIPPApps.ps1 b/CIPPAPIModule/public/Endpoint/Applications/Get-CIPPApps.ps1 new file mode 100644 index 0000000..2907dfd --- /dev/null +++ b/CIPPAPIModule/public/Endpoint/Applications/Get-CIPPApps.ps1 @@ -0,0 +1,31 @@ +<# +.SYNOPSIS +Retrieves a list of apps for a specific customer tenant ID. + +.DESCRIPTION +The Get-CIPPApps function retrieves a list of apps for a specific customer tenant ID by making a REST API call to the "/api/listapps" endpoint. + +.PARAMETER CustomerTenantID +Specifies the customer tenant ID for which to retrieve the apps. + +.EXAMPLE +Get-CIPPApps -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves a list of apps for the customer tenant ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPApps { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting Apps for $CustomerTenantID" + $Endpoint = "/api/listapps" + $Params = @{ + tenantfilter = $CustomerTenantID + } + + Invoke-CIPPRestMethod -Endpoint $Endpoint -Params $Params + +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Endpoint/Autopilot/Get-CIPPAPDevices.ps1 b/CIPPAPIModule/public/Endpoint/Autopilot/Get-CIPPAPDevices.ps1 new file mode 100644 index 0000000..73f8343 --- /dev/null +++ b/CIPPAPIModule/public/Endpoint/Autopilot/Get-CIPPAPDevices.ps1 @@ -0,0 +1,31 @@ +<# +.SYNOPSIS +Retrieves AutoPilot devices for a specific customer tenant. + +.DESCRIPTION +The Get-CIPPAPDevices function retrieves AutoPilot devices for a specific customer tenant by making a REST API call to the "/api/listapdevices" endpoint. + +.PARAMETER CustomerTenantID +Specifies the ID of the customer tenant for which to retrieve AutoPilot devices. + +.EXAMPLE +Get-CIPPAPDevices -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves AutoPilot devices for the customer tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPAPDevices { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting AutoPilot Devices for $CustomerTenantID" + $Endpoint = "/api/listapdevices" + $Params = @{ + tenantfilter = $CustomerTenantID + } + + Invoke-CIPPRestMethod -Endpoint $Endpoint -Params $Params + +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Endpoint/Autopilot/Get-CIPPAutoPilotConfig.ps1 b/CIPPAPIModule/public/Endpoint/Autopilot/Get-CIPPAutoPilotConfig.ps1 new file mode 100644 index 0000000..296cfb3 --- /dev/null +++ b/CIPPAPIModule/public/Endpoint/Autopilot/Get-CIPPAutoPilotConfig.ps1 @@ -0,0 +1,46 @@ +<# +.SYNOPSIS + Retrieves AutoPilot configuration information for a specified customer tenant ID and type. + +.DESCRIPTION + The Get-CIPPAutoPilotConfig function retrieves AutoPilot configuration information for a specified customer tenant ID and type. + It makes a REST API call to retrieve the configuration data. + +.PARAMETER CustomerTenantID + Specifies the customer tenant ID for which to retrieve the AutoPilot configuration. + +.PARAMETER Type + Specifies the type of AutoPilot configuration to retrieve. Valid values are "ESP" and "ApProfile". + +.EXAMPLE + Get-CIPPAutoPilotConfig -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -Type "ESP" + Retrieves the AutoPilot Status Page for the customer tenant ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +.EXAMPLE + Get-CIPPAutoPilotConfig -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -Type "ApProfile" + Retrieves the AutoPilot Profile for the customer tenant ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPAutoPilotConfig { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$Type + ) + + if ($Type -eq "ESP") { + Write-Verbose "Getting AutoPilot Status Page for $CustomerTenantID" + } elseif ($Type -eq "ApProfile"){ + Write-Verbose "Getting AutoPilot Profile for customer: $CustomerTenantID" + } + + $Endpoint = "/api/listautopilotconfig" + $Params = @{ + tenantfilter = $CustomerTenantID + type = $Type + } + + Invoke-CIPPRestMethod -Endpoint $Endpoint -Params $Params +} diff --git a/CIPPAPIModule/public/Endpoint/MEM/Set-CIPPMEMPolicy.ps1 b/CIPPAPIModule/public/Endpoint/MEM/Set-CIPPMEMPolicy.ps1 new file mode 100644 index 0000000..dcda054 --- /dev/null +++ b/CIPPAPIModule/public/Endpoint/MEM/Set-CIPPMEMPolicy.ps1 @@ -0,0 +1,56 @@ +<# +.SYNOPSIS +Sets the CIPP MEM policy for a customer. + +.DESCRIPTION +The Set-CIPPMEMPolicy function is used to set the CIPP (Customer Identity and Protection Platform) MEM (Mobile Endpoint Management) policy for a customer. It allows you to specify the customer tenant ID, policy ID, display name, description, and assignment type. + +.PARAMETER CustomerTenantID +The unique identifier of the customer tenant. + +.PARAMETER ID +The unique identifier of the policy. + +.PARAMETER DisplayName +The display name of the policy. + +.PARAMETER Description +The description of the policy. + +.PARAMETER AssignTo +The assignment type for the policy. Valid values are "allLicensedUsers", "AllDevices", and "AllDevicesAndUsers". + +.EXAMPLE +Set-CIPPMEMPolicy -CustomerTenantID "12345678-1234-1234-1234-1234567890ab" -ID "Policy001" -DisplayName "Policy 1" -Description "This is policy 1" -AssignTo "AllDevices" + +This example sets the CIPP MEM policy for a customer with the specified parameters. + +#> +function Set-CIPPMEMPolicy { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$ID, + [Parameter(Mandatory = $false)] + [string]$DisplayName, + [Parameter(Mandatory = $false)] + [string]$Description, + [ValidateSet("allLicensedUsers", "AllDevices", "AllDevicesAndUsers")] + [string]$AssignTo + ) + + Write-Verbose "Getting app consent requests for customer: $CustomerTenantID" + $Endpoint = "/api/editpolicy" + + $body = @{ + Tenant = $CustomerTenantID + ID = $ID + displayname = $DisplayName + description = $Description + } + + Invoke-CIPPRestMethod -Endpoint $Endpoint -Body $body -Method 'POST' + +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Endpoint/Reports/Get-CIPPDevices.ps1 b/CIPPAPIModule/public/Endpoint/Reports/Get-CIPPDevices.ps1 new file mode 100644 index 0000000..60f8abd --- /dev/null +++ b/CIPPAPIModule/public/Endpoint/Reports/Get-CIPPDevices.ps1 @@ -0,0 +1,39 @@ +<# +.SYNOPSIS +Retrieves a list of devices for a specific customer. + +.DESCRIPTION +The Get-CIPPDevices function retrieves a list of devices associated with a specific customer in the CIPP system. + +.PARAMETER CustomerTenantID +The unique identifier of the customer's tenant. + +.EXAMPLE +Get-CIPPDevices -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves a list of devices for the customer with the tenant ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +.INPUTS +None. + +.OUTPUTS +System.Object. + +.NOTES +Author: [Your Name] +Date: [Current Date] +#> + +function Get-CIPPDevices { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting Devices for customer: $CustomerTenantID" + $endpoint = "/api/listdevices" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Identity/Administration/Get-CIPPRoles.ps1 b/CIPPAPIModule/public/Identity/Administration/Get-CIPPRoles.ps1 new file mode 100644 index 0000000..92b85d1 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Get-CIPPRoles.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Retrieves the roles for a specific customer tenant ID. + +.DESCRIPTION +The Get-CIPPRoles function retrieves the roles associated with a specific customer tenant ID by making a REST API call to the "/api/listroles" endpoint. + +.PARAMETER CustomerTenantID +The customer tenant ID for which to retrieve the roles. + +.EXAMPLE +Get-CIPPRoles -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves the roles for the customer tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPRoles { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting roles for $CustomerTenantID" + $endpoint = "/api/listroles" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Identity/Administration/Groups/Get-CIPPGroupTemplates.ps1 b/CIPPAPIModule/public/Identity/Administration/Groups/Get-CIPPGroupTemplates.ps1 new file mode 100644 index 0000000..213ba74 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Groups/Get-CIPPGroupTemplates.ps1 @@ -0,0 +1,40 @@ +<# +.SYNOPSIS +Retrieves group templates from the CIPP API. + +.DESCRIPTION +The Get-CIPPGroupTemplates function retrieves group templates from the CIPP API. It can retrieve all group templates or a specific template based on the provided TemplateID. + +.PARAMETER TemplateID +Specifies the ID of the group template to retrieve. If not provided, all group templates will be retrieved. + +.EXAMPLE +Get-CIPPGroupTemplates -TemplateID "12345" +Retrieves the group template with the ID "12345" from the CIPP API. + +.EXAMPLE +Get-CIPPGroupTemplates +Retrieves all group templates from the CIPP API. + +#> + +function Get-CIPPGroupTemplates { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $false)] + [string]$TemplateID + ) + + if ($TemplateID) { + Write-Verbose "Getting Group Template $TemplateID" + } else { + Write-Verbose "Getting all Group Templates" + } + + $endpoint = "/api/ListGroupTemplates" + $params = @{ + id = $TemplateID + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Identity/Administration/Groups/Get-CIPPGroups.ps1 b/CIPPAPIModule/public/Identity/Administration/Groups/Get-CIPPGroups.ps1 new file mode 100644 index 0000000..a485aad --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Groups/Get-CIPPGroups.ps1 @@ -0,0 +1,83 @@ +<# +.SYNOPSIS + Retrieves information about CIPP groups. + +.DESCRIPTION + The Get-CIPPGroups function retrieves information about CIPP groups based on the provided parameters. It can retrieve all groups for a specific tenant, group details for a specific group, group members for a specific group, or group owners for a specific group. + +.PARAMETER CustomerTenantID + Specifies the ID of the customer tenant for which to retrieve the groups. + +.PARAMETER GroupID + Specifies the ID of the group for which to retrieve the information. If not provided, all groups for the specified tenant will be retrieved. + +.PARAMETER Members + Switch parameter. If specified, retrieves the members of the specified group. + +.PARAMETER Owners + Switch parameter. If specified, retrieves the owners of the specified group. + +.EXAMPLE + Get-CIPPGroups -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" + Retrieves all groups for the specified customer tenant. + +.EXAMPLE + Get-CIPPGroups -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -GroupID "abcdefg" + Retrieves the details of the specified group. + +.EXAMPLE + Get-CIPPGroups -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -GroupID "abcdefg" -Members + Retrieves the members of the specified group. + +.EXAMPLE + Get-CIPPGroups -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -GroupID "abcdefg" -Owners + Retrieves the owners of the specified group. +#> +function Get-CIPPGroups { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $false)] + [GUID]$GroupID, + [Parameter(Mandatory = $false)] + [switch]$Members, + [Parameter(Mandatory = $false)] + [switch]$Owners + ) + + $switchCount = 0 + + if ($Members) { $switchCount++ } + if ($Owners) { $switchCount++ } + + if ($switchCount -gt 1) { + Write-Error "Only one role switch can be specified at a time." + return + } + + if (-not $GroupID) { + Write-Verbose "Getting all Groups for tenant $CustomerTenantID" + } elseif ($GroupID -and -not $Members -and -not $Owners) { + Write-Verbose "Getting Group Details for Group $GroupID" + } elseif ($GroupID -and $Members -and -not $Owners) { + Write-Verbose "Getting Group Members for Group $GroupID" + } elseif ($GroupID -and -not $Members -and $Owners) { + Write-Verbose "Getting Group Owners for Group $GroupID" + } + $endpoint = "/api/listgroups" + $params = @{ + tenantfilter = $CustomerTenantID + groupid = $GroupID + } + + if ($Members) { + $params.members = "true" + } + + if ($Owners) { + $params.owners = "true" + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/public/Identity/Administration/Groups/Remove-CIPPGroup.ps1 b/CIPPAPIModule/public/Identity/Administration/Groups/Remove-CIPPGroup.ps1 similarity index 50% rename from public/Identity/Administration/Groups/Remove-CIPPGroup.ps1 rename to CIPPAPIModule/public/Identity/Administration/Groups/Remove-CIPPGroup.ps1 index 91274c5..fb3b1c9 100644 --- a/public/Identity/Administration/Groups/Remove-CIPPGroup.ps1 +++ b/CIPPAPIModule/public/Identity/Administration/Groups/Remove-CIPPGroup.ps1 @@ -1,3 +1,27 @@ +<# +.SYNOPSIS +Removes a CIPP group. + +.DESCRIPTION +The Remove-CIPPGroup function is used to remove a CIPP group from the specified customer tenant. + +.PARAMETER CustomerTenantID +The ID of the customer tenant. + +.PARAMETER GroupID +The ID of the group to be removed. + +.PARAMETER Grouptype +The type of the group. + +.PARAMETER DisplayName +The display name of the group. + +.EXAMPLE +Remove-CIPPGroup -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -GroupID "98765432-1234-5678-9012-34567890ABCD" -Grouptype "Security" -DisplayName "Admins" +This example removes a group with the specified ID, type, and display name from the customer tenant with the specified ID. + +#> function Remove-CIPPGroup { param ( [Parameter(Mandatory = $true)] diff --git a/CIPPAPIModule/public/Identity/Administration/Groups/Set-CIPPGroupDeliveryManagement.ps1 b/CIPPAPIModule/public/Identity/Administration/Groups/Set-CIPPGroupDeliveryManagement.ps1 new file mode 100644 index 0000000..be1db51 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Groups/Set-CIPPGroupDeliveryManagement.ps1 @@ -0,0 +1,59 @@ +<# +.SYNOPSIS +Sets the delivery management settings for a group. + +.DESCRIPTION +The Set-CIPPGroupDeliveryManagement function is used to set the delivery management settings for a group in the CIPP project. It allows you to specify the customer tenant ID, group ID, group type, and whether to only allow internal delivery. + +.PARAMETER CustomerTenantID +The ID of the customer tenant. + +.PARAMETER GroupID +The ID of the group. + +.PARAMETER GroupType +The type of the group. Valid values are 'Distribution List', 'Mail-Enabled Security', and 'Microsoft 365'. + +.PARAMETER OnlyAllowInternal +Specifies whether to only allow internal delivery. Valid values are 'true' and 'false'. + +.EXAMPLE +Set-CIPPGroupDeliveryManagement -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -GroupID "67890" -GroupType "Distribution List" -OnlyAllowInternal "true" +Sets the delivery management settings for the group with the specified customer tenant ID, group ID, group type, and only allow internal delivery. + +#> + +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 + +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Identity/Administration/Groups/Set-CIPPGroupHideFromGAL.ps1 b/CIPPAPIModule/public/Identity/Administration/Groups/Set-CIPPGroupHideFromGAL.ps1 new file mode 100644 index 0000000..730fff6 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Groups/Set-CIPPGroupHideFromGAL.ps1 @@ -0,0 +1,63 @@ +<# +.SYNOPSIS +Sets the "hide from GAL" property for a specified group. + +.DESCRIPTION +The Set-CIPPGroupHideFromGAL function is used to set the "hide from GAL" property for a specified group in the CIPP (Cloud Identity and Privacy Protection) system. This function requires the customer tenant ID, group ID, group type, and the hide from GAL value as input parameters. + +.PARAMETER CustomerTenantID +Specifies the ID of the customer tenant. This parameter is mandatory. + +.PARAMETER GroupID +Specifies the ID of the group. This parameter is mandatory. + +.PARAMETER GroupType +Specifies the type of the group. Valid values are 'Distribution List', 'Mail-Enabled Security', 'Microsoft 365', and 'Security'. This parameter is mandatory. + +.PARAMETER HideFromGAL +Specifies whether the group should be hidden from the Global Address List (GAL). Valid values are 'true' and 'false'. This parameter is mandatory. + +.EXAMPLE +Set-CIPPGroupHideFromGAL -CustomerTenantID "12345678-1234-1234-1234-1234567890AB" -GroupID "98765432-4321-4321-4321-0987654321BA" -GroupType "Distribution List" -HideFromGAL "true" +Sets the "hide from GAL" property to true for the specified distribution list group. + +.EXAMPLE +Set-CIPPGroupHideFromGAL -CustomerTenantID "12345678-1234-1234-1234-1234567890AB" -GroupID "98765432-4321-4321-4321-0987654321BA" -GroupType "Security" -HideFromGAL "false" +Sets the "hide from GAL" property to false for the specified security group. +#> + +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 + +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Add-CIPPUser.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Add-CIPPUser.ps1 new file mode 100644 index 0000000..e54f421 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Add-CIPPUser.ps1 @@ -0,0 +1,150 @@ +<# +.SYNOPSIS +Adds a user to the specified customer tenant. + +.DESCRIPTION +The Add-CIPPUser function adds a user to the specified customer tenant in the CIPP system. It sends a request to the "/api/adduser" endpoint with the provided user details. + +.PARAMETER CustomerTenantID +The ID of the customer tenant to which the user will be added. + +.PARAMETER DisplayName +The display name of the user. + +.PARAMETER UserName +The username of the user. + +.PARAMETER AutoPassword +Specifies whether to automatically generate a password for the user. Default value is $true. + +.PARAMETER FirstName +The first name of the user. + +.PARAMETER LastName +The last name of the user. + +.PARAMETER Domain +The domain of the user. + +.PARAMETER AddedAliases +Additional aliases for the user. + +.PARAMETER CopyFrom +Specifies the user to copy settings from. + +.PARAMETER UsageLocation +The usage location of the user. + +.PARAMETER Department +The department of the user. + +.PARAMETER City +The city of the user. + +.PARAMETER Country +The country of the user. + +.PARAMETER Jobtitle +The job title of the user. + +.PARAMETER MobilePhone +The mobile phone number of the user. + +.PARAMETER StreetAddress +The street address of the user. + +.PARAMETER PostalCode +The postal code of the user. + +.PARAMETER CompanyName +The company name of the user. + +.PARAMETER MustChangePass +Specifies whether the user must change their password on first login. Default value is $true. + +.EXAMPLE +Add-CIPPUser -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -DisplayName "John Doe" -UserName "johndoe" -FirstName "John" -LastName "Doe" -Domain "example.com" -UsageLocation "US" + +Adds a user with the specified details to the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". The user's display name is "John Doe", username is "johndoe", first name is "John", last name is "Doe", domain is "example.com", and usage location is "US". + +#> + +function Add-CIPPUser { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$DisplayName, + [Parameter(Mandatory = $true)] + [string]$UserName, + [Parameter(Mandatory = $false)] + [bool]$AutoPassword = $true, + [Parameter(Mandatory = $true)] + [string]$FirstName, + [Parameter(Mandatory = $true)] + [string]$LastName, + [Parameter(Mandatory = $true)] + [string]$Domain, + [Parameter(Mandatory = $false)] + [string]$AddedAliases, + [Parameter(Mandatory = $false)] + [string]$CopyFrom, + [Parameter(Mandatory = $true)] + [string]$UsageLocation, + [Parameter(Mandatory = $false)] + [string]$Department, + [Parameter(Mandatory = $false)] + [string]$City, + [Parameter(Mandatory = $false)] + [string]$Country, + [Parameter(Mandatory = $false)] + [string]$Jobtitle, + [Parameter(Mandatory = $false)] + [string]$MobilePhone, + [Parameter(Mandatory = $false)] + [string]$StreetAddress, + [Parameter(Mandatory = $false)] + [string]$PostalCode, + [Parameter(Mandatory = $false)] + [string]$CompanyName, + [Parameter(Mandatory = $false)] + [bool]$MustChangePass = $true + ) + + Write-Verbose "Adding User to $CustomerTenantID" + + $endpoint = "/api/adduser" + $body = @{ + tenantID = $CustomerTenantID + DisplayName = $DisplayName + UserName = $UserName + AutoPassword = $AutoPassword + FirstName = $FirstName + LastName = $LastName + Domain = $Domain + AddedAliases = $AddedAliases + CopyFrom = $CopyFrom + Usagelocation = $UsageLocation + MustChangePass = $MustChangePass + } + + $optionalParams = @{ + Country = $Country + PostalCode = $PostalCode + CompanyName = $CompanyName + StreetAddress = $StreetAddress + MobilePhone = $MobilePhone + Jobtitle = $Jobtitle + Department = $Department + City = $City + } + + foreach ($key in $optionalParams.Keys) { + if ($optionalParams[$key]) { + $body[$key] = $optionalParams[$key] + } + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Body $body -Method 'POST' +} diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPBECCheck.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPBECCheck.ps1 new file mode 100644 index 0000000..7e3b13d --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPBECCheck.ps1 @@ -0,0 +1,61 @@ +<# +.SYNOPSIS + Performs a BEC (Business Email Compromise) check for a user. + +.DESCRIPTION + The Get-CIPPBECCheck function performs a BEC check for a user by making a REST API call to the specified endpoint. + It waits for the check to complete and returns the response. + +.PARAMETER CustomerTenantID + The ID of the customer's tenant. + +.PARAMETER UserID + The ID of the user. + +.PARAMETER UserName + The name of the user. + +.EXAMPLE + Get-CIPPBECCheck -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" -UserName "JohnDoe" + This example performs a BEC check for the user with the specified CustomerTenantID, UserID, and UserName. + +#> + +function Get-CIPPBECCheck { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$UserID, + [Parameter(Mandatory = $true)] + [string]$UserName + ) + + Write-Verbose "Running BEC Check for $Username" + + $endpoint = "/api/execbeccheck" + $params = @{ + tenantfilter = $CustomerTenantID + userId = $UserID + username = $UserName + } + + $initialResponse = Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params + $GUID = $initialResponse.guid + + Write-Verbose "Initial check complete. GUID returned: $GUID" + $params.guid = $GUID + + do { + Start-Sleep -Seconds 10 + $response = Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params + + if ($response.waiting -eq "True") { + Write-Verbose "BEC Check Still Running." + } else { + Write-Verbose "BEC Check complete" + return $response + } + } while ($response.waiting -eq "True") +} diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPDeletedItems.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPDeletedItems.ps1 new file mode 100644 index 0000000..1b0e0e9 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPDeletedItems.ps1 @@ -0,0 +1,32 @@ +<# +.SYNOPSIS +Retrieves the deleted items for a specific customer tenant. + +.DESCRIPTION +The Get-CIPPDeletedItems function retrieves the deleted items for a specific customer tenant by making a REST API call to the "/api/listdeleteditems" endpoint. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which to retrieve the deleted items. + +.EXAMPLE +Get-CIPPDeletedItems -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves the deleted items for the customer tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPDeletedItems { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting deleted items for $CustomerTenantID" + + $endpoint = "/api/listdeleteditems" + $params = @{ + tenantfilter = $CustomerTenantID + userId = $UserID + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUniversalSearch.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUniversalSearch.ps1 new file mode 100644 index 0000000..6bf42f0 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUniversalSearch.ps1 @@ -0,0 +1,31 @@ +<# +.SYNOPSIS +Performs a universal search for a specified name. + +.DESCRIPTION +The Get-CIPPUniversalSearch function performs a universal search for a specified name by making a REST API call to the /api/execuniversalsearch endpoint. + +.PARAMETER Name +The name to search for. + +.EXAMPLE +Get-CIPPUniversalSearch -Name "John Doe" +Searches for the name "John Doe" using the universal search functionality. + +#> + +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 +} diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserCAPolicies.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserCAPolicies.ps1 new file mode 100644 index 0000000..53da34d --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserCAPolicies.ps1 @@ -0,0 +1,37 @@ +<# +.SYNOPSIS +Retrieves the Conditional Access (CA) policies for a specific user in a customer's tenant. + +.DESCRIPTION +The Get-CIPPUserCAPolicies function retrieves the Conditional Access (CA) policies for a specific user in a customer's tenant. It makes use of the Invoke-CIPPRestMethod function to send a request to the API endpoint "/api/listuserconditionalaccesspolicies" and returns the response. + +.PARAMETER CustomerTenantID +The ID of the customer's tenant. + +.PARAMETER UserID +The ID of the user for whom the CA policies are to be retrieved. + +.EXAMPLE +Get-CIPPUserCAPolicies -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "user1@dom.com" +This example retrieves the CA policies for the user with the ID "user1@domain.com" in the customer's tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> + +function Get-CIPPUserCAPolicies { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$UserID + ) + + Write-Verbose "Getting user CA Policies $CustomerTenantID" + + $endpoint = "/api/listuserconditionalaccesspolicies" + $params = @{ + tenantfilter = $CustomerTenantID + userId = $UserID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserCounts.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserCounts.ps1 new file mode 100644 index 0000000..af42bf4 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserCounts.ps1 @@ -0,0 +1,30 @@ +<# +.SYNOPSIS +Retrieves user counts for a specific customer tenant ID. + +.DESCRIPTION +The Get-CIPPUserCounts function retrieves user counts for a specific customer tenant ID by making a REST API call to the "/api/listusercounts" endpoint. + +.PARAMETER CustomerTenantID +The customer tenant ID for which to retrieve user counts. + +.EXAMPLE +Get-CIPPUserCounts -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves user counts for the customer tenant ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> + +function Get-CIPPUserCounts { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting User Counts for $CustomerTenantID" + $endpoint = "/api/listusercounts" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserDevices.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserDevices.ps1 new file mode 100644 index 0000000..0d3f274 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserDevices.ps1 @@ -0,0 +1,37 @@ +<# +.SYNOPSIS +Retrieves the devices associated with a specific user. + +.DESCRIPTION +The Get-CIPPUserDevices function retrieves the devices associated with a specific user in the CIPP system. It makes a REST API call to the "/api/listuserdevices" endpoint, passing the customer tenant ID and user ID as parameters. + +.PARAMETER CustomerTenantID +The ID of the customer tenant. + +.PARAMETER UserID +The ID of the user. + +.EXAMPLE +Get-CIPPUserDevices -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "user1@domain.com" +Retrieves the devices associated with the user "user1@domain.com" in the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> + +function Get-CIPPUserDevices { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$UserID + ) + + Write-Verbose "Getting user devices for $userID" + + $endpoint = "/api/listuserdevices" + $params = @{ + tenantfilter = $CustomerTenantID + userId = $UserID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserGroups.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserGroups.ps1 new file mode 100644 index 0000000..91f3be1 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserGroups.ps1 @@ -0,0 +1,37 @@ +<# +.SYNOPSIS +Retrieves the groups that a user belongs to. + +.DESCRIPTION +The Get-CIPPUserGroups function retrieves the groups that a user belongs to based on the provided CustomerTenantID and UserID. + +.PARAMETER CustomerTenantID +The ID of the customer tenant. + +.PARAMETER UserID +The ID of the user. + +.EXAMPLE +Get-CIPPUserGroups -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "user@domain.com" +Retrieves the groups that the user with the ID "user@domain.com" belongs to in the customer tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> + +function Get-CIPPUserGroups { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$UserID + ) + + Write-Verbose "Getting user groups for $userID" + + $endpoint = "/api/listusergroups" + $params = @{ + tenantfilter = $CustomerTenantID + userId = $UserID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserPhoto.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserPhoto.ps1 new file mode 100644 index 0000000..38b3114 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserPhoto.ps1 @@ -0,0 +1,38 @@ +<# +.SYNOPSIS +Retrieves the photo of a user from the CIPP API. + +.DESCRIPTION +The Get-CIPPUserPhoto function is used to retrieve the photo of a user from the CIPP API. It sends a request to the API endpoint "/api/listuserphoto" with the specified customer tenant ID and user ID. + +.PARAMETER CustomerTenantID +The customer tenant ID associated with the user. + +.PARAMETER UserID +The ID of the user whose photo needs to be retrieved. + +.EXAMPLE +Get-CIPPUserPhoto -CustomerTenantID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" -UserID "user@domain.com" + +This example retrieves the photo of the user with the ID "user@domain.com" from the customer tenant with the ID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc". + +#> + +function Get-CIPPUserPhoto { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$UserID + ) + + Write-Verbose "Getting user photo for $userID" + + $endpoint = "/api/listuserphoto" + $params = @{ + tenantfilter = $CustomerTenantID + userId = $UserID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserSignIns.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserSignIns.ps1 new file mode 100644 index 0000000..71d174e --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUserSignIns.ps1 @@ -0,0 +1,37 @@ +<# +.SYNOPSIS +Retrieves sign-in logs for a specific user in the CIPP system. + +.DESCRIPTION +The Get-CIPPUserSignIns function retrieves the sign-in logs for a specific user in the CIPP system. It requires the customer tenant ID and the user ID as mandatory parameters. + +.PARAMETER CustomerTenantID +The customer tenant ID associated with the user. + +.PARAMETER UserID +The unique identifier of the user. + +.EXAMPLE +Get-CIPPUserSignIns -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" +This example retrieves the sign-in logs for the user with the customer tenant ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" and the user ID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc". + +#> + +function Get-CIPPUserSignIns { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [guid]$UserID + ) + + Write-Verbose "Getting sign-in logs for User $userID" + + $endpoint = "/api/listusersigninlogs" + $params = @{ + tenantfilter = $CustomerTenantID + userId = $UserID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUsers.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUsers.ps1 new file mode 100644 index 0000000..4f6797c --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPUsers.ps1 @@ -0,0 +1,42 @@ +<# +.SYNOPSIS +Retrieves user information from the CIPP API. + +.DESCRIPTION +The Get-CIPPUsers function is used to retrieve user information from the CIPP API. It can retrieve all users for a specific tenant or retrieve details for a specific user. + +.PARAMETER CustomerTenantID +Specifies the ID of the customer tenant for which to retrieve user information. This parameter is mandatory. + +.PARAMETER UserID +Specifies the ID of the user for which to retrieve details. This parameter is optional. + +.EXAMPLE +Get-CIPPUsers -CustomerTenantID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" +Retrieves all users for the tenant with ID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc". + +.EXAMPLE +Get-CIPPUsers -CustomerTenantID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" -UserID "user@domain.com" +Retrieves details for the user with ID "user@domain.com" in the tenant with ID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc". +#> +function Get-CIPPUsers { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $false)] + [string]$UserID + ) + + if (-not $UserID) { + Write-Verbose "Getting all users for tenant $CustomerTenantID" + } else { + Write-Verbose "Getting user details for user $UserID" + } + $endpoint = "/api/Listusers" + $params = @{ + tenantfilter = $CustomerTenantID + userId = $UserID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Send-CIPPPush.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Send-CIPPPush.ps1 new file mode 100644 index 0000000..7e03a57 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Send-CIPPPush.ps1 @@ -0,0 +1,36 @@ +<# +.SYNOPSIS +Sends a push notification to a user. + +.DESCRIPTION +The Send-CIPPPush function sends a push notification to a user specified by their email address. + +.PARAMETER CustomerTenantID +The ID of the customer's tenant. + +.PARAMETER UserEmail +The email address of the user to send the push notification to. + +.EXAMPLE +Send-CIPPPush -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserEmail "user@example.com" +Sends a push notification to the user with the email address "user@example.com" in the tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +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 +} diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPClrImmID.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPClrImmID.ps1 new file mode 100644 index 0000000..51ba6bb --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPClrImmID.ps1 @@ -0,0 +1,38 @@ +<# +.SYNOPSIS +Clears the Immutable ID for a user. + +.DESCRIPTION +The Set-CIPPClrImmID function clears the Immutable ID for a user by invoking a REST API endpoint. + +.PARAMETER CustomerTenantID +The ID of the customer tenant. + +.PARAMETER UserID +The ID of the user. + +.EXAMPLE +Set-CIPPClrImmID -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" + +This example clears the Immutable ID for the user with the specified CustomerTenantID and UserID. + +#> + +function Set-CIPPClrImmID { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [guid]$UserID + ) + + Write-Verbose "Clearing Immutable ID for User: $userID" + + $endpoint = "/api/execclrimmid" + $params = @{ + tenantfilter = $CustomerTenantID + Id = $UserID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPCreateTap.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPCreateTap.ps1 new file mode 100644 index 0000000..5dbc6d7 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPCreateTap.ps1 @@ -0,0 +1,36 @@ +<# +.SYNOPSIS +Creates a TAP (Temporary Access Passcode) for a user. + +.DESCRIPTION +The Set-CIPPCreateTap function is used to create a TAP (Temporary Access Passcode) for a user in the CIPP system. + +.PARAMETER CustomerTenantID +Specifies the ID of the customer tenant for which the TAP is being created. This parameter is mandatory. + +.PARAMETER UserID +Specifies the ID of the user for whom the TAP is being created. This parameter is mandatory. + +.EXAMPLE +Set-CIPPCreateTap -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "user@domain.com" +Creates a TAP for the user with the ID "user@domain.com" in the customer tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +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 +} diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPResetPassword.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPResetPassword.ps1 new file mode 100644 index 0000000..b63db07 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPResetPassword.ps1 @@ -0,0 +1,46 @@ +<# +.SYNOPSIS +Resets the password for a user in the CIPP system. + +.DESCRIPTION +The Set-CIPPResetPassword function is used to reset the password for a user in the CIPP system. It sends a request to the CIPP API to reset the password for the specified user. + +.PARAMETER CustomerTenantID +The ID of the customer tenant in the CIPP system. + +.PARAMETER UserID +The ID of the user whose password needs to be reset. + +.PARAMETER MustChange +Specifies whether the user must change their password upon next login. The default value is "true". + +.EXAMPLE +Set-CIPPResetPassword -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "user@domain.com" -MustChange "false" +Resets the password for the user with ID "user@domain.com" in the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". The user will not be required to change their password upon next login. + +#> +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 +} diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPRestoreDeletedUser.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPRestoreDeletedUser.ps1 new file mode 100644 index 0000000..9c2eb26 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPRestoreDeletedUser.ps1 @@ -0,0 +1,37 @@ +<# +.SYNOPSIS +Restores a deleted user in the CIPP system. + +.DESCRIPTION +The Set-CIPPRestoreDeletedUser function restores a deleted user in the CIPP (Customer Identity and Privacy Platform) system. It sends a request to the CIPP API to restore the user with the specified ID. + +.PARAMETER CustomerTenantID +The ID of the customer tenant in which the user is being restored. + +.PARAMETER ID +The ID of the user to be restored. + +.EXAMPLE +Set-CIPPRestoreDeletedUser -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -ID "32a411a8-65ad-4358-ac14-5027d9abea9a" +Restores the user with the ID "32a411a8-65ad-4358-ac14-5027d9abea9a" in the customer tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> + +function Set-CIPPRestoreDeletedUser { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$ID + ) + + Write-Verbose "Restoring user: $ID" + + $endpoint = "/api/execrestoredeleted" + $params = @{ + tenantfilter = $CustomerTenantID + Id = $ID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPRevokeSessions.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPRevokeSessions.ps1 new file mode 100644 index 0000000..8edd888 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPRevokeSessions.ps1 @@ -0,0 +1,38 @@ +<# +.SYNOPSIS +Revokes sessions for a specified user in the CIPP system. + +.DESCRIPTION +The Set-CIPPRevokeSessions function revokes sessions for a specified user in the CIPP system. It sends a request to the CIPP API to revoke all active sessions for the specified user. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which the sessions need to be revoked. + +.PARAMETER UserID +The ID of the user for whom the sessions need to be revoked. + +.EXAMPLE +Set-CIPPRevokeSessions -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" +Revokes all sessions for the user with ID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" in the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> + +function Set-CIPPRevokeSessions { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$UserID + ) + + Write-Verbose "Revoking Sessions for user: $UserID" + + $endpoint = "/api/execrevokesessions" + $params = @{ + TenantFilter = $CustomerTenantID + ID = $UserID + + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPSignInStatus.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPSignInStatus.ps1 new file mode 100644 index 0000000..18f98e8 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPSignInStatus.ps1 @@ -0,0 +1,55 @@ +<# +.SYNOPSIS +Sets the sign-in status for a user in the CIPP system. + +.DESCRIPTION +The Set-CIPPSignInStatus function is used to enable or disable the sign-in status for a user in the CIPP system. +When the $Enable parameter is set to "true", the function enables sign-in for the specified user. +When the $Enable parameter is set to "false", the function disables sign-in for the specified user. + +.PARAMETER CustomerTenantID +Specifies the ID of the customer tenant. + +.PARAMETER UserID +Specifies the ID of the user. + +.PARAMETER Enable +Specifies whether to enable or disable sign-in for the user. +Valid values are "true" (to enable sign-in) or "false" (to disable sign-in). + +.EXAMPLE +Set-CIPPSignInStatus -CustomerTenantID "47b02ab5-376d-4c85-b82d-13996c023c93" -UserID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" -Enable "true" +Enables sign-in for the user with the ID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" in the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +.EXAMPLE +Set-CIPPSignInStatus -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" -Enable "false" +Disables sign-in for the user with the ID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" in the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". +#> +function Set-CIPPSignInStatus { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$UserID, + [Parameter(Mandatory = $true)] + [ValidateSet( + "true", + "false" + )] + [string]$Enable + ) + + if ($Enable -eq "true") { + Write-Verbose "Enabling signin for $UserID" + } else { + Write-Verbose "Disabling signin for $UserID" + } + $endpoint = "/api/execdisableuser" + $params = @{ + tenantfilter = $CustomerTenantID + Id = $UserID + Enable = $Enable + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/public/Identity/Administration/Users/Set-CIPPUser.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPUser.ps1 similarity index 67% rename from public/Identity/Administration/Users/Set-CIPPUser.ps1 rename to CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPUser.ps1 index 6bd37a8..d9f67bd 100644 --- a/public/Identity/Administration/Users/Set-CIPPUser.ps1 +++ b/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPUser.ps1 @@ -1,3 +1,81 @@ +<# +.SYNOPSIS +Sets the properties of a CIPP user. + +.DESCRIPTION +The Set-CIPPUser function is used to set the properties of a CIPP user. It allows you to modify various user attributes such as display name, username, first name, last name, domain, aliases, usage location, department, city, country, job title, mobile phone, street address, postal code, company name, and more. You can also add or remove the user from groups. + +.PARAMETER CustomerTenantID +The ID of the customer tenant to which the user belongs. This parameter is mandatory. + +.PARAMETER UserID +The ID of the user to be modified. This parameter is mandatory. + +.PARAMETER DisplayName +The display name of the user. + +.PARAMETER UserName +The username of the user. + +.PARAMETER FirstName +The first name of the user. + +.PARAMETER LastName +The last name of the user. + +.PARAMETER Domain +The domain of the user. + +.PARAMETER AddedAliases +Additional aliases for the user. + +.PARAMETER CopyFrom +The ID of another user from which to copy the properties. + +.PARAMETER UsageLocation +The usage location of the user. + +.PARAMETER Department +The department of the user. + +.PARAMETER City +The city of the user. + +.PARAMETER Country +The country of the user. + +.PARAMETER Jobtitle +The job title of the user. + +.PARAMETER MobilePhone +The mobile phone number of the user. + +.PARAMETER StreetAddress +The street address of the user. + +.PARAMETER PostalCode +The postal code of the user. + +.PARAMETER CompanyName +The company name of the user. + +.PARAMETER MustChangePass +Specifies whether the user must change their password. Default value is $false. + +.PARAMETER AddToGroups +An array of group IDs to which the user should be added. + +.PARAMETER RemoveFromGroups +An array of group IDs from which the user should be removed. + +.PARAMETER BusinessPhone +An array of business phone numbers for the user. + +.EXAMPLE +Set-CIPPUser -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "user1" -DisplayName "John Doe" -UserName "johndoe" -FirstName "John" -LastName "Doe" -Domain "example.com" -UsageLocation "US" -Department "IT" -City "New York" -Country "USA" -Jobtitle "Developer" -MobilePhone "1234567890" -StreetAddress "123 Main St" -PostalCode "12345" -CompanyName "Example Inc" -MustChangePass $true -AddToGroups "group1", "group2" -RemoveFromGroups "group3" -BusinessPhone "9876543210" + + +#> function Set-CIPPUser { [CmdletBinding()] Param( diff --git a/CIPPAPIModule/public/Identity/Reports/Get-CIPPBasicAuth.ps1 b/CIPPAPIModule/public/Identity/Reports/Get-CIPPBasicAuth.ps1 new file mode 100644 index 0000000..a34a8d1 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Reports/Get-CIPPBasicAuth.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Retrieves Basic Authentication information for a specific customer. + +.DESCRIPTION +The Get-CIPPBasicAuth function retrieves Basic Authentication information for a specific customer by making a REST API call to the "/api/listbasicauth" endpoint. + +.PARAMETER CustomerTenantID +The unique identifier of the customer's tenant. + +.EXAMPLE +Get-CIPPBasicAuth -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves Basic Authentication information for the customer with the tenant ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPBasicAuth { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting Basic Auth for customer: $CustomerTenantID" + $Endpoint = "/api/listbasicauth" + $Params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $Endpoint -Params $Params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Identity/Reports/Get-CIPPInactiveAccounts.ps1 b/CIPPAPIModule/public/Identity/Reports/Get-CIPPInactiveAccounts.ps1 new file mode 100644 index 0000000..233a24b --- /dev/null +++ b/CIPPAPIModule/public/Identity/Reports/Get-CIPPInactiveAccounts.ps1 @@ -0,0 +1,30 @@ +<# +.SYNOPSIS +Retrieves a list of inactive accounts for a specific customer. + +.DESCRIPTION +The Get-CIPPInactiveAccounts function retrieves a list of inactive accounts for a specific customer based on the provided CustomerTenantID. + +.PARAMETER CustomerTenantID +Specifies the ID of the customer's tenant for which to retrieve the inactive accounts. + +.EXAMPLE +Get-CIPPInactiveAccounts -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves the list of inactive accounts for the customer with the tenant ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + + +#> +function Get-CIPPInactiveAccounts { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting inactive accounts for customer: $CustomerTenantID" + $endpoint = "/api/listinactiveaccounts" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Identity/Reports/Get-CIPPMFAUsers.ps1 b/CIPPAPIModule/public/Identity/Reports/Get-CIPPMFAUsers.ps1 new file mode 100644 index 0000000..33b8428 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Reports/Get-CIPPMFAUsers.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Retrieves the MFA users for a specified customer tenant ID. + +.DESCRIPTION +The Get-CIPPMFAUsers function retrieves the MFA users for a specified customer tenant ID by making a REST API call to the "/api/listmfausers" endpoint. + +.PARAMETER CustomerTenantID +Specifies the customer tenant ID for which to retrieve the MFA users. + +.EXAMPLE +Get-CIPPMFAUsers -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves the MFA users for the customer tenant ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPMFAUsers { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting MFA users for $CustomerTenantID" + $endpoint = "/api/listmfausers" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Identity/Reports/Get-CIPPSignIns.ps1 b/CIPPAPIModule/public/Identity/Reports/Get-CIPPSignIns.ps1 new file mode 100644 index 0000000..ad83735 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Reports/Get-CIPPSignIns.ps1 @@ -0,0 +1,47 @@ +<# +.SYNOPSIS +Retrieves sign-in information for a specific customer tenant. + +.DESCRIPTION +The Get-CIPPSignIns function retrieves sign-in information for a specific customer tenant. It can filter the results based on various criteria such as failed logons. + +.PARAMETER CustomerTenantID +Specifies the ID of the customer tenant for which to retrieve sign-in information. This parameter is mandatory. + +.PARAMETER failedlogononly +Indicates whether to retrieve only failed logon sign-ins. This parameter is optional. + +.PARAMETER filter +Specifies an additional filter to apply to the sign-in results. This parameter is optional. + +.EXAMPLE +Get-CIPPSignIns -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -failedlogononly + +This example retrieves all failed logon sign-ins for the customer tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> + +function Get-CIPPSignIns { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $false)] + [switch]$failedlogononly, + [Parameter(Mandatory = $false)] + [string]$filter + ) + + Write-Verbose "Getting Signins for $CustomerTenantID" + $endpoint = "/api/listsignins" + $params = @{ + tenantfilter = $CustomerTenantID + filter = $filter + } + + if ($failedlogononly) { + $params.failedlogononly = "true" + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Intune/Device/Get-CIPPGetBitLockerKey.ps1 b/CIPPAPIModule/public/Intune/Device/Get-CIPPGetBitLockerKey.ps1 new file mode 100644 index 0000000..f0dadf4 --- /dev/null +++ b/CIPPAPIModule/public/Intune/Device/Get-CIPPGetBitLockerKey.ps1 @@ -0,0 +1,39 @@ +<# +.SYNOPSIS +Gets the BitLocker recovery key for a specified computer. + +.DESCRIPTION +The Get-CIPPGetBitLockerKey function retrieves the BitLocker recovery key for a specified computer in the CIPP project. + +.PARAMETER CustomerTenantID +Specifies the ID of the customer tenant. + +.PARAMETER guid +Specifies the GUID of the computer for which to retrieve the BitLocker recovery key. + +.EXAMPLE +Get-CIPPGetBitLockerKey -CustomerTenantID "12345678-1234-1234-1234-1234567890AB" -guid "01234567-89AB-CDEF-0123-456789ABCDEF" +Retrieves the BitLocker recovery key for the computer with the specified GUID in the CIPP project. + +#> +Function Get-CIPPGetBitLockerKey { + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [guid]$guid + ) + + Write-Verbose "Getting bitlocker key for computer: $guid" + + # Define the endpoint and parameters + $endpoint = "/api/execgetrecoverykey" + $params = @{ + tenantfilter = $CustomerTenantID + guid = $guid + } + + # Use the Invoke-CIPPRequest function to make the request + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Intune/Device/Get-CIPPIntuneIntents.ps1 b/CIPPAPIModule/public/Intune/Device/Get-CIPPIntuneIntents.ps1 new file mode 100644 index 0000000..ea5bdba --- /dev/null +++ b/CIPPAPIModule/public/Intune/Device/Get-CIPPIntuneIntents.ps1 @@ -0,0 +1,37 @@ +<# +.SYNOPSIS +Retrieves Intune Intents for a specific customer. + +.DESCRIPTION +The Get-CIPPIntuneIntents function retrieves Intune Intents for a specific customer based on the provided CustomerTenantID. + +.PARAMETER CustomerTenantID +Specifies the ID of the customer's tenant. + +.EXAMPLE +Get-CIPPIntuneIntents -CustomerTenantID "contoso.onmicrosoft.com" +This example retrieves Intune Intents for the customer with the tenant ID "contoso.onmicrosoft.com". + +.EXAMPLE +Get-CIPPIntuneIntents -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +This example retrieves Intune Intents for the customer with the tenant ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +Function Get-CIPPIntuneIntents { + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting Intune Intents for customer: $CustomerTenantID" + + # Define the endpoint and parameters + $endpoint = "/api/listintuneintents" + $params = @{ + tenantfilter = $CustomerTenantID + } + + # Use the Invoke-CIPPRequest function to make the request + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Intune/Device/Get-CIPPIntunePolicy.ps1 b/CIPPAPIModule/public/Intune/Device/Get-CIPPIntunePolicy.ps1 new file mode 100644 index 0000000..0ac425e --- /dev/null +++ b/CIPPAPIModule/public/Intune/Device/Get-CIPPIntunePolicy.ps1 @@ -0,0 +1,54 @@ +<# +.SYNOPSIS +Retrieves Intune policies for a specific customer. + +.DESCRIPTION +The Get-CIPPIntunePolicy function retrieves Intune policies for a specific customer based on the provided parameters. It uses the Invoke-CIPPRestMethod function to make the request to the API. + +.PARAMETER CustomerTenantID +The ID of the customer's tenant. + +.PARAMETER PolicyID +The ID of the policy. This parameter is optional. + +.PARAMETER Urlname +The URL name. This parameter is optional. + +.EXAMPLE +Get-CIPPIntunePolicy -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -PolicyID "policy123" -Urlname "example" +This example retrieves the Intune policies for the customer with the tenant ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778", using the policy ID "policy123" and the URL name "example". + +.EXAMPLE +Get-CIPPIntunePolicy -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +This example retrieves all Intune policies for the customer with the tenant ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +Function Get-CIPPIntunePolicy { + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $false)] + [string]$PolicyID, + [Parameter(Mandatory = $false)] + [string]$Urlname + ) + + Write-Verbose "Getting Intune policies for customer: $CustomerTenantID" + + # Validation to ensure both $PolicyID and $urlname are supplied together + if (($PolicyID -and -not $urlname) -or (-not $PolicyID -and $urlname)) { + throw "You must supply both -PolicyID and -Urlname parameters together or not at all." + } + + # Define the endpoint and parameters + $endpoint = "/api/listintunepolicy" + $params = @{ + tenantfilter = $CustomerTenantID + URLName = $urlname + id = $PolicyID + } + + # Use the Invoke-CIPPRequest function to make the request + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Intune/Device/Get-CIPPIntuneTemplates.ps1 b/CIPPAPIModule/public/Intune/Device/Get-CIPPIntuneTemplates.ps1 new file mode 100644 index 0000000..6429526 --- /dev/null +++ b/CIPPAPIModule/public/Intune/Device/Get-CIPPIntuneTemplates.ps1 @@ -0,0 +1,30 @@ +<# +.SYNOPSIS +Retrieves Intune templates. + +.DESCRIPTION +The Get-CIPPIntuneTemplates function retrieves Intune templates using the CIPPRestMethod cmdlet. + +.PARAMETER TemplateID +Specifies the ID of the template to retrieve. This parameter is optional. + +.EXAMPLE +Get-CIPPIntuneTemplates -TemplateID "12345" +Retrieves the Intune template with the ID "12345". + +#> +function Get-CIPPIntuneTemplates { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $false)] + [string]$TemplateID + ) + + Write-Verbose "Getting Intune Templates" + $endpoint = "/api/listintunetemplates" + $params = @{ + tenantfilter = $CustomerTenantID + id = $TemplateID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Intune/Device/Get-CIPPLocalAdminPassword.ps1 b/CIPPAPIModule/public/Intune/Device/Get-CIPPLocalAdminPassword.ps1 new file mode 100644 index 0000000..dab7515 --- /dev/null +++ b/CIPPAPIModule/public/Intune/Device/Get-CIPPLocalAdminPassword.ps1 @@ -0,0 +1,52 @@ +<# +.SYNOPSIS +Retrieves the local admin password for a specified computer. + +.DESCRIPTION +The Get-CIPPLocalAdminPassword function retrieves the local admin password for a specified computer in the CIPP project. It makes a REST API request to the CIPP API endpoint to fetch the password. + +.PARAMETER CustomerTenantID +The ID of the customer tenant. + +.PARAMETER guid +The GUID of the computer for which to retrieve the local admin password. + +.EXAMPLE +Get-CIPPLocalAdminPassword -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -guid "abcdefg" +This example retrieves the local admin password for the computer with the specified GUID in the CIPP project. + +.INPUTS +None. + +.OUTPUTS +None. + +.NOTES +Author: Your Name +Date: Current Date + +.LINK +https://cipp-project.com/documentation/get-cipplocaladminpassword + +#> +Function Get-CIPPLocalAdminPassword { + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [guid]$guid + ) + + Write-Verbose "Getting local admin password for computer: $guid" + + # Define the endpoint and parameters + $endpoint = "/api/execgetlocaladminpassword" + $params = @{ + tenantfilter = $CustomerTenantID + guid = $guid + } + + # Use the Invoke-CIPPRequest function to make the request + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/public/Invoke-CIPPRestMethod.ps1 b/CIPPAPIModule/public/Invoke-CIPPRestMethod.ps1 similarity index 94% rename from public/Invoke-CIPPRestMethod.ps1 rename to CIPPAPIModule/public/Invoke-CIPPRestMethod.ps1 index 101b666..c1a6303 100644 --- a/public/Invoke-CIPPRestMethod.ps1 +++ b/CIPPAPIModule/public/Invoke-CIPPRestMethod.ps1 @@ -27,21 +27,14 @@ Invoke-CIPPRestMethod -Endpoint '/api/Listusers' -Method 'GET' -Params @{ 'tenantfilter' = '11c11ab1-527a-1d29-l92e-76413h012s76' } This example sends a GET request to the '/api/Listusers' endpoint with a query parameter 'tenantfilter' set to '11c11ab1-527a-1d29-l92e-76413h012s76'. +.EXAMPLE Invoke-CIPPRestMethod -Endpoint '/api/ListMailboxPermissions' -Params @{ 'tenantfilter' = 'M365x72601982.onmicrosoft.com', 'userid' = '11c11ab1-527a-1d29-l92e-76413h012s76'} This example sends a GET request to the '/api/ListMailboxPermissions' endpoint with a query parameter 'tenantfilter' set to 'M365x72601982.onmicrosoft.com' and 'userid' set to '11c11ab1-527a-1d29-l92e-76413h012s76' +.EXAMPLE Invoke-CIPPRestMethod -Endpoint '/api/adduser' -method 'POST' -Body @{ 'tenantID' = '11c11ab1-527a-1d29-l92e-76413h012s76';'DisplayName' = 'Test User';'UserName' = 'testuser';'AutoPassword' = $true;'FirstName' = 'Test';'LastName' = 'User';'Domain' = 'M365x72601982.onmicrosoft.com';'CopyFrom' = "" } This example sends a POST request to the '/api/adduser' endpoint with a Body 'tenantID' set to '11c11ab1-527a-1d29-l92e-76413h012s76' and 'DisplayName' set to 'Test User', 'UserName' set to 'testuser', 'AutoPassword' set to $true, 'FirstName' set to 'Test', 'LastName' set to 'User', 'Domain' set to 'M365x72601982.onmicrosoft.com' -.OUTPUTS - The function returns the response received from the CIPP API. - -.NOTES - - -.LINK - https://docs.cipp.app/api-documentation/endpoints - The official documentation for the CIPP API. #> function Invoke-CIPPRestMethod { param ( diff --git a/CIPPAPIModule/public/Security/Defender/Get-CIPPDefenderState.ps1 b/CIPPAPIModule/public/Security/Defender/Get-CIPPDefenderState.ps1 new file mode 100644 index 0000000..eb0aae5 --- /dev/null +++ b/CIPPAPIModule/public/Security/Defender/Get-CIPPDefenderState.ps1 @@ -0,0 +1,30 @@ +<# +.SYNOPSIS +Retrieves the Defender state for a specific customer. + +.DESCRIPTION +The Get-CIPPDefenderState function retrieves the Defender state for a specific customer identified by their tenant ID. + +.PARAMETER CustomerTenantID +Specifies the tenant ID of the customer for whom the Defender state needs to be retrieved. + +.EXAMPLE +Get-CIPPDefenderState -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves the Defender state for the customer with the specified tenant ID. + +#> +function Get-CIPPDefenderState { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [Guid]$CustomerTenantID + ) + + Write-Verbose "Getting Defender State for customer: $CustomerTenantID" + $endpoint = "/api/listdefenderstate" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params + +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Security/Defender/Get-CIPPDefenderTVM.ps1 b/CIPPAPIModule/public/Security/Defender/Get-CIPPDefenderTVM.ps1 new file mode 100644 index 0000000..647ec50 --- /dev/null +++ b/CIPPAPIModule/public/Security/Defender/Get-CIPPDefenderTVM.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS + Retrieves Defender TVM for a specific customer. + +.DESCRIPTION + The Get-CIPPDefenderTVM function retrieves the Defender TVM (Threat and Vulnerability Management) for a specific customer based on the provided CustomerTenantID. + +.PARAMETER CustomerTenantID + Specifies the unique identifier of the customer's tenant. + +.EXAMPLE + Get-CIPPDefenderTVM -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" + Retrieves the Defender TVM for the customer with the tenant ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". +#> + +function Get-CIPPDefenderTVM { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting Defender TVM for customer: $CustomerTenantID" + $endpoint = "/api/listdefendertvm" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Security/Incidents/Get-CIPPAlertsList.ps1 b/CIPPAPIModule/public/Security/Incidents/Get-CIPPAlertsList.ps1 new file mode 100644 index 0000000..6a6fd08 --- /dev/null +++ b/CIPPAPIModule/public/Security/Incidents/Get-CIPPAlertsList.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Retrieves a list of alerts for a specific customer. + +.DESCRIPTION +The Get-CIPPAlertsList function retrieves a list of alerts for a specific customer identified by their tenant ID. + +.PARAMETER CustomerTenantID +The tenant ID of the customer for whom to retrieve the alerts. + +.EXAMPLE +Get-CIPPAlertsList -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves the alerts for the customer with the tenant ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPAlertsList { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting Alerts for customer: $CustomerTenantID" + $endpoint = "/api/execalertslist" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Security/Incidents/Get-CIPPIncidentList.ps1 b/CIPPAPIModule/public/Security/Incidents/Get-CIPPIncidentList.ps1 new file mode 100644 index 0000000..369b070 --- /dev/null +++ b/CIPPAPIModule/public/Security/Incidents/Get-CIPPIncidentList.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Retrieves a list of incidents for a specific customer. + +.DESCRIPTION +The Get-CIPPIncidentList function retrieves a list of incidents for a specific customer identified by their tenant ID. + +.PARAMETER CustomerTenantID +The tenant ID of the customer for whom to retrieve the incidents. + +.EXAMPLE +Get-CIPPIncidentList -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves the incidents for the customer with the tenant ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPIncidentList { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting Incidents for customer: $CustomerTenantID" + $endpoint = "/api/execincidentslist" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Security/Reports/Get-CIPPDeviceCompliance.ps1 b/CIPPAPIModule/public/Security/Reports/Get-CIPPDeviceCompliance.ps1 new file mode 100644 index 0000000..8670ffb --- /dev/null +++ b/CIPPAPIModule/public/Security/Reports/Get-CIPPDeviceCompliance.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Retrieves device compliance information for a specific customer tenant. + +.DESCRIPTION +The Get-CIPPDeviceCompliance function retrieves device compliance information for a specified customer tenant. It makes use of the Invoke-CIPPRestMethod function to send a request to the CIPP API and retrieve the device compliance data. + +.PARAMETER CustomerTenantID +The unique identifier of the customer tenant for which to retrieve device compliance information. + +.EXAMPLE +Get-CIPPDeviceCompliance -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves device compliance information for the customer tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPDeviceCompliance { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting Device Compliance for $CustomerTenantID" + $endpoint = "/api/listalltenantdevicecompliance" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Set-CIPPAPIDetails.ps1 b/CIPPAPIModule/public/Set-CIPPAPIDetails.ps1 new file mode 100644 index 0000000..bfe6730 --- /dev/null +++ b/CIPPAPIModule/public/Set-CIPPAPIDetails.ps1 @@ -0,0 +1,43 @@ +<# +.SYNOPSIS +Sets the CIPP API details. + +.DESCRIPTION +The Set-CIPPAPIDetails function is used to set the CIPP API details, including the client ID, client secret, API URL, and tenant ID. + +.PARAMETER CIPPClientID +Specifies the client ID for the CIPP API. + +.PARAMETER CIPPClientSecret +Specifies the client secret for the CIPP API. + +.PARAMETER CIPPAPIUrl +Specifies the URL for the CIPP API. + +.PARAMETER TenantID +Specifies the tenant ID for the CIPP API. + +.EXAMPLE +Set-CIPPAPIDetails -CIPPClientID "d8d41058-97df-4b80-8e1b-7083d756409f" -CIPPClientSecret "YourSecurePassword" -CIPPAPIUrl "https://api.cipp.com" -TenantID "7c2f78c0-554e-4f42-a663-c4df3ce7f51f" + +This example sets the CIPP API details with the specified values. + +#> +function Set-CIPPAPIDetails { + [CmdletBinding()] + Param( + [Parameter(ParameterSetName = 'CIPP', Mandatory = $true)] + [string]$CIPPClientID, + [Parameter(ParameterSetName = 'CIPP', Mandatory = $true)] + [String]$CIPPClientSecret, + [Parameter(ParameterSetName = 'CIPP', Mandatory = $true)] + [String]$CIPPAPIUrl, + [Parameter(ParameterSetName = 'CIPP', Mandatory = $true)] + [String]$TenantID + ) + write-Verbose "Setting CIPP API Keys" + $script:CIPPClientID = $CIPPClientID + $script:CIPPClientSecret = $CIPPClientSecret + $script:CIPPAPIUrl = $CIPPAPIUrl + $script:TenantID = $TenantID +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Teams-Sharepoint/Sharepoint/Get-CIPPSharePointQuota.ps1 b/CIPPAPIModule/public/Teams-Sharepoint/Sharepoint/Get-CIPPSharePointQuota.ps1 new file mode 100644 index 0000000..df4a030 --- /dev/null +++ b/CIPPAPIModule/public/Teams-Sharepoint/Sharepoint/Get-CIPPSharePointQuota.ps1 @@ -0,0 +1,33 @@ +<# +.SYNOPSIS +Retrieves the SharePoint quota for a specific customer tenant. + +.DESCRIPTION +The Get-CIPPSharePointQuota function retrieves the SharePoint quota for a specific customer tenant by making a REST API call to the "/api/listsharepointquota" endpoint. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which the SharePoint quota needs to be retrieved. + +.EXAMPLE +Get-CIPPSharePointQuota -CustomerTenantID "contoso.onmicrosoft.com" +This example retrieves the SharePoint quota for the customer tenant with the ID "contoso.onmicrosoft.com". + +.EXAMPLE +Get-CIPPSharePointQuota -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +This example retrieves the SharePoint quota for the customer tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPSharePointQuota { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting SharePoint quota for $CustomerTenantID" + $endpoint = "/api/listsharepointquota" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Teams-Sharepoint/Sharepoint/Get-CIPPSharePointSites.ps1 b/CIPPAPIModule/public/Teams-Sharepoint/Sharepoint/Get-CIPPSharePointSites.ps1 new file mode 100644 index 0000000..f70dc87 --- /dev/null +++ b/CIPPAPIModule/public/Teams-Sharepoint/Sharepoint/Get-CIPPSharePointSites.ps1 @@ -0,0 +1,54 @@ +<# +.SYNOPSIS +Retrieves SharePoint sites for a specified customer tenant. + +.DESCRIPTION +The Get-CIPPSharePointSites function retrieves SharePoint sites for a specified customer tenant. It uses the Invoke-CIPPRestMethod function to make a REST API call to retrieve the sites. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which to retrieve SharePoint sites. This parameter is mandatory. + +.PARAMETER urlonly +Specifies whether to retrieve only the URLs of the SharePoint sites. By default, this parameter is not specified. + +.PARAMETER UserUPN +The user's UPN (User Principal Name) for which to retrieve SharePoint sites. This parameter is optional. + +.EXAMPLE +Get-CIPPSharePointSites -CustomerTenantID "contoso.onmicrosoft.com" +Retrieves all SharePoint sites for the customer tenant "contoso.onmicrosoft.com". + +.EXAMPLE +Get-CIPPSharePointSites -CustomerTenantID "contoso.onmicrosoft.com" -urlonly +Retrieves only the URLs of the SharePoint sites for the customer tenant "contoso.onmicrosoft.com". + +.EXAMPLE +Get-CIPPSharePointSites -CustomerTenantID "contoso.onmicrosoft.com" -UserUPN "user@contoso.com" +Retrieves SharePoint sites for the user "user@contoso.com" in the customer tenant "contoso.onmicrosoft.com". +#> + +function Get-CIPPSharePointSites { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $false)] + [switch]$urlonly, + [Parameter(Mandatory = $false)] + [string]$UserUPN + ) + + Write-Verbose "Getting sites for $CustomerTenantID" + $endpoint = "/api/listsites" + $params = @{ + tenantfilter = $CustomerTenantID + type = "SharePointSiteUsage" + userupn = $UserUPN + } + + if ($urlonly) { + $params.URLOnly = "true" + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Teams-Sharepoint/Teams/Get-CIPPTeams.ps1 b/CIPPAPIModule/public/Teams-Sharepoint/Teams/Get-CIPPTeams.ps1 new file mode 100644 index 0000000..d0a67c6 --- /dev/null +++ b/CIPPAPIModule/public/Teams-Sharepoint/Teams/Get-CIPPTeams.ps1 @@ -0,0 +1,42 @@ +<# +.SYNOPSIS +Retrieves teams sites for a specified customer tenant ID. + +.DESCRIPTION +The Get-CIPPTeams function retrieves teams sites for a specified customer tenant ID. It uses the Invoke-CIPPRestMethod function to make a REST API call to retrieve the teams sites. + +.PARAMETER CustomerTenantID +The customer tenant ID for which to retrieve teams sites. This parameter is mandatory. + +.PARAMETER ID +The ID of the teams site to retrieve. This parameter is optional. + +.EXAMPLE +Get-CIPPTeams -CustomerTenantID "contoso.onmicrosoft.com" +Retrieves all teams sites for the "contoso.onmicrosoft.com" tenant. + +.EXAMPLE +Get-CIPPTeams -CustomerTenantID "contoso.onmicrosoft.com" -ID "12345" +Retrieves the teams site with the ID "12345" for the "contoso.onmicrosoft.com" tenant. +#> + + +function Get-CIPPTeams { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $false)] + [string]$ID + ) + + Write-Verbose "Getting teams sites for $CustomerTenantID" + $endpoint = "/api/listteams" + $params = @{ + tenantfilter = $CustomerTenantID + type = if ($ID) { "team" } else { "list" } + ID = $id + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Teams-Sharepoint/Teams/Get-CIPPTeamsActivity.ps1 b/CIPPAPIModule/public/Teams-Sharepoint/Teams/Get-CIPPTeamsActivity.ps1 new file mode 100644 index 0000000..ea4e046 --- /dev/null +++ b/CIPPAPIModule/public/Teams-Sharepoint/Teams/Get-CIPPTeamsActivity.ps1 @@ -0,0 +1,31 @@ +<# +.SYNOPSIS +Retrieves the activity of Teams users in a specified customer tenant. + +.DESCRIPTION +The Get-CIPPTeamsActivity function retrieves the activity of Teams users in a specified customer tenant. It makes use of the Invoke-CIPPRestMethod function to send a request to the "/api/listteamsactivity" endpoint with the provided parameters. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which to retrieve the Teams activity. + +.EXAMPLE +Get-CIPPTeamsActivity -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves the Teams activity for the customer tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPTeamsActivity { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting teams activity $CustomerTenantID" + $endpoint = "/api/listteamsactivity" + $params = @{ + tenantfilter = $CustomerTenantID + type = "TeamsUserActivityUser" + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Teams-Sharepoint/Teams/Get-CIPPTeamsVoice.ps1 b/CIPPAPIModule/public/Teams-Sharepoint/Teams/Get-CIPPTeamsVoice.ps1 new file mode 100644 index 0000000..9b0b7c2 --- /dev/null +++ b/CIPPAPIModule/public/Teams-Sharepoint/Teams/Get-CIPPTeamsVoice.ps1 @@ -0,0 +1,30 @@ +<# +.SYNOPSIS +Retrieves teams voice information for a specified customer tenant ID. + +.DESCRIPTION +The Get-CIPPTeamsVoice function retrieves teams voice information for a specified customer tenant ID. It makes use of the Invoke-CIPPRestMethod function to send a request to the "/api/listteamsvoice" endpoint with the provided tenant filter. + +.PARAMETER CustomerTenantID +The customer tenant ID for which to retrieve teams voice information. This parameter is mandatory. + +.EXAMPLE +Get-CIPPTeamsVoice -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves teams voice information for the customer tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPTeamsVoice { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting teams voice $CustomerTenantID" + $endpoint = "/api/listteamsvoice" + $params = @{ + tenantfilter = $CustomerTenantID + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Tenant/Administration/Alerts/Get-CIPPAlerts.ps1 b/CIPPAPIModule/public/Tenant/Administration/Alerts/Get-CIPPAlerts.ps1 new file mode 100644 index 0000000..d4f3624 --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Administration/Alerts/Get-CIPPAlerts.ps1 @@ -0,0 +1,27 @@ +<# +.SYNOPSIS +Retrieves CIPP alerts from the API. + +.DESCRIPTION +The Get-CIPPAlerts function retrieves CIPP alerts from the API by invoking the "/api/getcippalerts" endpoint. + +.PARAMETER None +This function does not accept any parameters. + +.EXAMPLE +Get-CIPPAlerts +Retrieves CIPP alerts from the API. + +#> + +function Get-CIPPAlerts { + [CmdletBinding()] + param () + + Write-Verbose "Getting CIPP Alerts" + + # Define the endpoint and parameters + $endpoint = "/api/getcippalerts" + + Invoke-CIPPRestMethod -Endpoint $endpoint +} diff --git a/CIPPAPIModule/public/Tenant/Administration/Get-CIPPAppConsentReqs.ps1 b/CIPPAPIModule/public/Tenant/Administration/Get-CIPPAppConsentReqs.ps1 new file mode 100644 index 0000000..c0bfab7 --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Administration/Get-CIPPAppConsentReqs.ps1 @@ -0,0 +1,31 @@ +<# +.SYNOPSIS +Retrieves app consent requests for a specific customer tenant. + +.DESCRIPTION +The Get-CIPPAppConsentReqs function retrieves app consent requests for a specific customer tenant by making a REST API call to the "/api/listappconsentrequests" endpoint. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which to retrieve app consent requests. This parameter is mandatory. + +.EXAMPLE +Get-CIPPAppConsentReqs -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves app consent requests for the customer tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPAppConsentReqs { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting app consent requests for customer: $CustomerTenantID" + $Endpoint = "/api/listappconsentrequests" + $Params = @{ + tenantfilter = $CustomerTenantID + } + + Invoke-CIPPRestMethod -Endpoint $Endpoint -Params $Params + +} \ No newline at end of file diff --git a/public/Tenant/Administration/Get-CIPPDomains.ps1 b/CIPPAPIModule/public/Tenant/Administration/Get-CIPPDomains.ps1 similarity index 51% rename from public/Tenant/Administration/Get-CIPPDomains.ps1 rename to CIPPAPIModule/public/Tenant/Administration/Get-CIPPDomains.ps1 index 83a477c..e21c345 100644 --- a/public/Tenant/Administration/Get-CIPPDomains.ps1 +++ b/CIPPAPIModule/public/Tenant/Administration/Get-CIPPDomains.ps1 @@ -1,3 +1,19 @@ +<# +.SYNOPSIS +Retrieves the domains for a specific customer. + +.DESCRIPTION +The Get-CIPPDomains function retrieves the domains associated with a specific customer in the CIPP system. + +.PARAMETER CustomerTenantID +The unique identifier of the customer's tenant. + +.EXAMPLE +Get-CIPPDomains -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +This example retrieves the domains for the customer with the tenant ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> + Function Get-CIPPDomains { [CmdletBinding()] param ( diff --git a/public/Tenant/Administration/Tenant/Get-CIPPADConnectStatus.ps1 b/CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPADConnectStatus.ps1 similarity index 77% rename from public/Tenant/Administration/Tenant/Get-CIPPADConnectStatus.ps1 rename to CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPADConnectStatus.ps1 index 5319051..4806711 100644 --- a/public/Tenant/Administration/Tenant/Get-CIPPADConnectStatus.ps1 +++ b/CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPADConnectStatus.ps1 @@ -15,13 +15,25 @@ Specifies the type of data to be returned. Valid values are "AzureADConnectSetti Get-CIPPADConnectStatus -CustomerTenantID "contoso.onmicrosoft.com" -dataToReturn "AzureADConnectSettings" Retrieves the AD Connect settings for the customer tenant "contoso.onmicrosoft.com". +.EXAMPLE +Get-CIPPADConnectStatus -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -dataToReturn "AzureADConnectSettings" +Retrieves the AD Connect settings for the customer tenant "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + .EXAMPLE Get-CIPPADConnectStatus -CustomerTenantID "contoso.onmicrosoft.com" -dataToReturn "AzureADObjectsInError" Retrieves the AD objects in error for the customer tenant "contoso.onmicrosoft.com". +.EXAMPLE +Get-CIPPADConnectStatus -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -dataToReturn "AzureADObjectsInError" +Retrieves the AD objects in error for the customer tenant "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + .EXAMPLE Get-CIPPADConnectStatus -CustomerTenantID "contoso.onmicrosoft.com" Retrieves the AD Connect status for the customer tenant "contoso.onmicrosoft.com". + +.EXAMPLE +Get-CIPPADConnectStatus -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves the AD Connect status for the customer tenant "7ced1621-b8f7-4231-868c-bc6b1a2f1778". #> function Get-CIPPADConnectStatus { diff --git a/CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPOrg.ps1 b/CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPOrg.ps1 new file mode 100644 index 0000000..f404eb0 --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPOrg.ps1 @@ -0,0 +1,33 @@ +<# +.SYNOPSIS +Retrieves information about a specific organization in the CIPP system. + +.DESCRIPTION +The Get-CIPPOrg function retrieves information about a specific organization in the CIPP system based on the provided CustomerTenantID. + +.PARAMETER CustomerTenantID +Specifies the unique identifier of the customer tenant. + +.EXAMPLE +Get-CIPPOrg -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +This example retrieves information about the organization with the CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +.EXAMPLE +Get-CIPPOrg -CustomerTenantID "contoso.onmicrosoft.com" +This example retrieves information about the organization with the CustomerTenantID "contoso.onmicrosoft.com". + +#> +function Get-CIPPOrg { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting org $CustomerTenantID" + $endpoint = "/api/listorg" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPPartnerRelationships.ps1 b/CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPPartnerRelationships.ps1 new file mode 100644 index 0000000..fce52ef --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPPartnerRelationships.ps1 @@ -0,0 +1,33 @@ +<# +.SYNOPSIS +Retrieves partner relationships for a specified customer tenant. + +.DESCRIPTION +The Get-CIPPPartnerRelationships function retrieves partner relationships for a specified customer tenant by making a REST API call to the "/api/listpartnerrelationships" endpoint. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which to retrieve partner relationships. + +.EXAMPLE +Get-CIPPPartnerRelationships -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves partner relationships for the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +.EXAMPLE +Get-CIPPPartnerRelationships -CustomerTenantID "contoso.onmicrosoft.com" +Retrieves partner relationships for the customer tenant with ID "contoso.onmicrosoft.com". + +#> +function Get-CIPPPartnerRelationships { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting org $CustomerTenantID" + $endpoint = "/api/listpartnerrelationships" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPTenantDetails.ps1 b/CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPTenantDetails.ps1 new file mode 100644 index 0000000..1bbfc5f --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPTenantDetails.ps1 @@ -0,0 +1,33 @@ +<# +.SYNOPSIS +Retrieves the details of a specific CIPP tenant. + +.DESCRIPTION +The Get-CIPPTenantDetails function retrieves the details of a specific CIPP (Customer Information Protection Platform) tenant using the provided CustomerTenantID. + +.PARAMETER CustomerTenantID +The unique identifier of the CIPP tenant. + +.EXAMPLE +Get-CIPPTenantDetails -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves the details of the CIPP tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +.EXAMPLE +Get-CIPPTenantDetails -CustomerTenantID "contoso.onmicrosoft.com" +Retrieves the details of the CIPP tenant with the ID "contoso.onmicrosoft.com". + +#> +function Get-CIPPTenantDetails { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting Tenant Details for $CustomerTenantID" + $endpoint = "/api/ListTenantDetails" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPTenants.ps1 b/CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPTenants.ps1 new file mode 100644 index 0000000..0c2c046 --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Administration/Tenant/Get-CIPPTenants.ps1 @@ -0,0 +1,48 @@ +<# +.SYNOPSIS +Retrieves a list of CIPP tenants. + +.DESCRIPTION +The Get-CIPPTenants function retrieves a list of CIPP tenants based on the specified parameters. It makes a REST API call to the "/api/listtenants" endpoint and returns the result. + +.PARAMETER CustomerTenantID +Specifies the ID of the customer tenant. This parameter is optional. + +.PARAMETER ClearCache +Indicates whether to clear the cache before retrieving the tenants. This parameter is optional. + +.PARAMETER TriggerRefresh +Indicates whether to trigger a refresh before retrieving the tenants. This parameter is optional. + +.EXAMPLE +Get-CIPPTenants -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -ClearCache +This example retrieves the list of CIPP tenants for the specified customer tenant ID and clears the cache before retrieving the tenants. + +#> +function Get-CIPPTenants { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $false)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $false)] + [switch]$ClearCache, + [Parameter(Mandatory = $false)] + [switch]$TriggerRefresh + ) + + Write-Verbose "Getting Tenants" + $endpoint = "/api/listtenants" + $params = @{ + tenantfilter = $CustomerTenantID + } + + if ($ClearCache) { + $params.ClearCache = "true" + } + + if ($TriggerRefresh) { + $params.TriggerRefresh = "true" + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Tenant/Conditional/Get-CIPPCAPolicies.ps1 b/CIPPAPIModule/public/Tenant/Conditional/Get-CIPPCAPolicies.ps1 new file mode 100644 index 0000000..a9dce13 --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Conditional/Get-CIPPCAPolicies.ps1 @@ -0,0 +1,35 @@ +<# +.SYNOPSIS +Retrieves Conditional Access Policies for a specific customer tenant. + +.DESCRIPTION +The Get-CIPPCAPolicies function retrieves the Conditional Access Policies for a specific customer tenant by making a REST API call to the "/api/listconditionalaccesspolicies" endpoint. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which to retrieve the Conditional Access Policies. + +.EXAMPLE +Get-CIPPCAPolicies -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves the Conditional Access Policies for the customer tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +.EXAMPLE +Get-CIPPCAPolicies -CustomerTenantID "contoso.onmicrosoft.com" +Retrieves the Conditional Access Policies for the customer tenant with the ID "contoso.onmicrosoft.com". + +#> +function Get-CIPPCAPolicies { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting Conditional Access Policies for customer: $CustomerTenantID" + $Endpoint = "/api/listconditionalaccesspolicies" + $Params = @{ + tenantfilter = $CustomerTenantID + } + + Invoke-CIPPRestMethod -Endpoint $Endpoint -Params $Params + +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Tenant/Conditional/Get-CIPPCATemplates.ps1 b/CIPPAPIModule/public/Tenant/Conditional/Get-CIPPCATemplates.ps1 new file mode 100644 index 0000000..7cb1e49 --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Conditional/Get-CIPPCATemplates.ps1 @@ -0,0 +1,25 @@ +<# +.SYNOPSIS +Retrieves Conditional Access Templates. + +.DESCRIPTION +The Get-CIPPCATemplates function retrieves the list of Conditional Access Templates from the specified endpoint. + +.PARAMETER None +This function does not accept any parameters. + +.EXAMPLE +Get-CIPPCATemplates +Retrieves the list of Conditional Access Templates. + +#> + +function Get-CIPPCATemplates { + [CmdletBinding()] + Param() + Write-Verbose "Getting Conditional Access Templates" + $endpoint = "/api/listcatemplates" + + Invoke-CIPPRestMethod -Endpoint $endpoint + +} diff --git a/CIPPAPIModule/public/Tenant/Conditional/Get-CIPPNamedLocations.ps1 b/CIPPAPIModule/public/Tenant/Conditional/Get-CIPPNamedLocations.ps1 new file mode 100644 index 0000000..38ebeaa --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Conditional/Get-CIPPNamedLocations.ps1 @@ -0,0 +1,33 @@ +<# +.SYNOPSIS +Retrieves named locations for a specific customer tenant. + +.DESCRIPTION +The Get-CIPPNamedLocations function retrieves named locations for a specific customer tenant by making a REST API call to the "/api/listnamedlocations" endpoint. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which to retrieve named locations. + +.EXAMPLE +Get-CIPPNamedLocations -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves named locations for the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +.EXAMPLE +Get-CIPPNamedLocations -CustomerTenantID "contoso.onmicrosoft.com" +Retrieves named locations for the customer tenant with ID "contoso.onmicrosoft.com". + +#> +function Get-CIPPNamedLocations { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting named locations for $CustomerTenantID" + $endpoint = "/api/listnamedlocations" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Tenant/Conditional/Set-CIPPCAPolicy.ps1 b/CIPPAPIModule/public/Tenant/Conditional/Set-CIPPCAPolicy.ps1 new file mode 100644 index 0000000..e044cf0 --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Conditional/Set-CIPPCAPolicy.ps1 @@ -0,0 +1,47 @@ +<# +.SYNOPSIS +Sets the Conditional Access (CA) Policy for a specific customer tenant. + +.DESCRIPTION +The Set-CIPPCAPolicy function is used to set the Conditional Access (CA) Policy for a specific customer tenant. It allows you to enable or disable the CA Policy for the tenant. + +.PARAMETER CustomerTenantID +Specifies the ID of the customer tenant for which the CA Policy needs to be set. + +.PARAMETER State +Specifies the state of the CA Policy. Valid values are "Enabled" and "Disabled". + +.PARAMETER Guid +Specifies the GUID of the CA Policy. + +.EXAMPLE +Set-CIPPCAPolicy -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -State "Enabled" -Guid "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6" +Sets the CA Policy for the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" to "Enabled" using the GUID "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6". + +.EXAMPLE +Set-CIPPCAPolicy -CustomerTenantID "contoso.onmicrosoft.com" -State "Enabled" -Guid "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6" +Sets the CA Policy for the customer tenant with ID "contoso.onmicrosoft.com" to "Enabled" using the GUID "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6". + + +#> +function Set-CIPPCAPolicy { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [ValidateSet("Enabled", "Disabled")] + [string]$State, + [Parameter(Mandatory = $true)] + [guid]$Guid + ) + + Write-Verbose "Editing CA Policy for tenant $CustomerTenantID" + $endpoint = "/api/editcapolicy" + $params = @{ + tenantfilter = $CustomerTenantID + state = $State + guid = $Guid + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Tenant/GDAP/Remove-CIPPGDAPRelationship.ps1 b/CIPPAPIModule/public/Tenant/GDAP/Remove-CIPPGDAPRelationship.ps1 new file mode 100644 index 0000000..56d5ebf --- /dev/null +++ b/CIPPAPIModule/public/Tenant/GDAP/Remove-CIPPGDAPRelationship.ps1 @@ -0,0 +1,31 @@ +<# +.SYNOPSIS +Removes a GDAP (Global Data Access Point) relationship. + +.DESCRIPTION +The Remove-CIPPGDAPRelationship function terminates a GDAP relationship by invoking a REST API endpoint. + +.PARAMETER GDAPID +Specifies the ID of the GDAP relationship to be terminated. + +.EXAMPLE +Remove-CIPPGDAPRelationship -GDAPID "59a6b837-2c8d-4f91-93e1-746cd82b1e37-a9d8b5e2-73cf-41a5-8de7-134f62b0c6e9" +Terminates the GDAP relationship with the ID "59a6b837-2c8d-4f91-93e1-746cd82b1e37-a9d8b5e2-73cf-41a5-8de7-134f62b0c6e9". + +#> +function Remove-CIPPGDAPRelationship { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$GDAPID + ) + + Write-Verbose "Terminating GDAP Relationship: $GDAPID" + $Endpoint = "/api/execdeletegdaprelationship" + $Params = @{ + gdapid = $GDAPID + } + + Invoke-CIPPRestMethod -Endpoint $Endpoint -Params $Params + +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Tenant/Reports/Get-CIPPLicenses.ps1 b/CIPPAPIModule/public/Tenant/Reports/Get-CIPPLicenses.ps1 new file mode 100644 index 0000000..37df03f --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Reports/Get-CIPPLicenses.ps1 @@ -0,0 +1,33 @@ +<# +.SYNOPSIS +Retrieves licenses for a specific customer tenant. + +.DESCRIPTION +The Get-CIPPLicenses function retrieves licenses for a specific customer tenant by making a REST API call to the "/api/ListLicenses" endpoint. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which licenses need to be retrieved. + +.EXAMPLE +Get-CIPPLicenses -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves licenses for the customer tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +.EXAMPLE +Get-CIPPLicenses -CustomerTenantID "contoso.onmicrosoft.com" +Retrieves licenses for the customer tenant with the ID "contoso.onmicrosoft.com". + +#> +function Get-CIPPLicenses { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting Licenses for $CustomerTenantID" + $endpoint = "/api/ListLicenses" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Tenant/Reports/Get-CIPPOAuthApps.ps1 b/CIPPAPIModule/public/Tenant/Reports/Get-CIPPOAuthApps.ps1 new file mode 100644 index 0000000..18c2e60 --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Reports/Get-CIPPOAuthApps.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Retrieves OAuth apps for a specific customer tenant. + +.DESCRIPTION +The Get-CIPPOAuthApps function retrieves OAuth apps for a specific customer tenant by making a REST API call to the "/api/listoauthapps" endpoint. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which to retrieve OAuth apps. + +.EXAMPLE +Get-CIPPOAuthApps -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves OAuth apps for the customer tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPOAuthApps { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting OAuth apps for $CustomerTenantID" + $endpoint = "/api/listoauthapps" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Tenant/Standards/Get-CIPPBPA.ps1 b/CIPPAPIModule/public/Tenant/Standards/Get-CIPPBPA.ps1 new file mode 100644 index 0000000..09adbbb --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Standards/Get-CIPPBPA.ps1 @@ -0,0 +1,38 @@ +<# +.SYNOPSIS + Retrieves the BPA (Best Practices Analyzer) report for a specific customer tenant. + +.DESCRIPTION + The Get-CIPPBPA function retrieves the BPA report for a customer tenant based on the provided CustomerTenantID. + Optionally, you can specify a ReportName to filter the report. + +.PARAMETER CustomerTenantID + Specifies the ID of the customer tenant for which to retrieve the BPA report. This parameter is optional. + +.PARAMETER ReportName + Specifies the name of the report to filter the BPA report. This parameter is optional. + +.EXAMPLE + Get-CIPPBPA -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -ReportName "CIPP Best Practices V1.0 - Tenant View" + + This example retrieves the BPA report for the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" and filters it by the report name "CIPP Best Practices V1.0 - Tenant View". + +#> +function Get-CIPPBPA { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $false)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $false)] + [string]$ReportName + ) + + Write-Verbose "Getting BPA Report for customer: $CustomerTenantID" + $Endpoint = "/api/listbpa" + $Params = @{ + tenantfilter = $CustomerTenantID + Report = $ReportName + } + + Invoke-CIPPRestMethod -Endpoint $Endpoint -Params $Params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Tenant/Standards/Get-CIPPBPATemplates.ps1 b/CIPPAPIModule/public/Tenant/Standards/Get-CIPPBPATemplates.ps1 new file mode 100644 index 0000000..f7328b1 --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Standards/Get-CIPPBPATemplates.ps1 @@ -0,0 +1,26 @@ +<# +.SYNOPSIS +Retrieves the CIPP BPA Templates. + +.DESCRIPTION +The Get-CIPPBPATemplates function retrieves the CIPP (Continuous Improvement and Performance Program) BPA (Best Practice Assessment) Templates from the specified API endpoint. + +.PARAMETER None +This function does not accept any parameters. + +.EXAMPLE +Get-CIPPBPATemplates +Retrieves the CIPP BPA Templates. + +#> + +function Get-CIPPBPATemplates { + [CmdletBinding()] + Param() + + Write-Verbose "Getting BPA Templates" + $Endpoint = "/api/listbpatemplates" + + Invoke-CIPPRestMethod -Endpoint $Endpoint + +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Tenant/Standards/Get-CIPPDomainAnalyser.ps1 b/CIPPAPIModule/public/Tenant/Standards/Get-CIPPDomainAnalyser.ps1 new file mode 100644 index 0000000..11faf31 --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Standards/Get-CIPPDomainAnalyser.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Retrieves the list of domain analyzers for a specific customer tenant. + +.DESCRIPTION +The Get-CIPPDomainAnalyser function retrieves the list of domain analyzers associated with a specific customer tenant. It makes a REST API call to retrieve the list of domain analyzers based on the provided customer tenant ID. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which to retrieve the domain analyzers. + +.EXAMPLE +Get-CIPPDomainAnalyser -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves the list of domain analyzers for the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +#> +function Get-CIPPDomainAnalyser { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting Domain Analyser List for customer: $CustomerTenantID" + $endpoint = "/api/ListDomainAnalyser" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Tenant/Standards/Get-CIPPDomainHealth.ps1 b/CIPPAPIModule/public/Tenant/Standards/Get-CIPPDomainHealth.ps1 new file mode 100644 index 0000000..7fa45f0 --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Standards/Get-CIPPDomainHealth.ps1 @@ -0,0 +1,51 @@ +<# +.SYNOPSIS +Gets the domain health information for a specified domain. + +.DESCRIPTION +The Get-CIPPDomainHealth function retrieves domain health information for a specified domain using the CIPP API. It supports various actions such as reading WHOIS records, NS records, MX records, SPF records, DMARC policies, DKIM records, testing DNSSEC, and testing MTA-STS. + +.PARAMETER DomainName +Specifies the name of the domain for which to retrieve the health information. + +.PARAMETER Action +Specifies the action to perform for retrieving the domain health information. Valid values are: +- ReadWhoisRecord: Retrieves the WHOIS record for the domain. +- ReadNSRecord: Retrieves the NS record for the domain. +- ReadMXRecord: Retrieves the MX record for the domain. +- ReadSpfRecord: Retrieves the SPF record for the domain. +- ReadDmarcPolicy: Retrieves the DMARC policy for the domain. +- ReadDkimRecord: Retrieves the DKIM record for the domain. +- TestDNSSEC: Tests DNSSEC for the domain. +- TestMtaSts: Tests MTA-STS for the domain. + +.EXAMPLE +PS> Get-CIPPDomainHealth -DomainName "contoso.onmicrosoft.com" -Action "ReadWhoisRecord" +Retrieves the WHOIS record for the domain "contoso.onmicrosoft.com". + +.EXAMPLE +PS> Get-CIPPDomainHealth -DomainName "contoso.onmicrosoft.com" -Action "TestDNSSEC" +Tests DNSSEC for the domain "contoso.onmicrosoft.com". + +#> + +function Get-CIPPDomainHealth { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$DomainName, + [Parameter(Mandatory = $true)] + [ValidateSet("ReadWhoisRecord", "ReadNSRecord", "ReadMXRecord", "ReadSpfRecord", "ReadDmarcPolicy", "ReadDkimRecord", "TestDNSSEC", "TestMtaSts")] + [string]$Action + ) + + Write-Verbose "Getting Domain Health for $DomainName with action $Action" + + $endpoint = "/api/listdomainhealth" + $params = @{ + Domain = $DomainName + Action = $action + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Tenant/Standards/Get-CIPPStandards.ps1 b/CIPPAPIModule/public/Tenant/Standards/Get-CIPPStandards.ps1 new file mode 100644 index 0000000..82c4448 --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Standards/Get-CIPPStandards.ps1 @@ -0,0 +1,33 @@ +<# +.SYNOPSIS +Retrieves the CIPP standards for a specific customer tenant. + +.DESCRIPTION +The Get-CIPPStandards function retrieves the CIPP standards for a specific customer tenant by making a REST API call to the "/api/liststandards" endpoint. + +.PARAMETER CustomerTenantID +The ID of the customer tenant for which to retrieve the standards. + +.EXAMPLE +Get-CIPPStandards -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +Retrieves the CIPP standards for the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +.EXAMPLE +Get-CIPPStandards -CustomerTenantID "test.onmicrosoft.com" +Retrieves the CIPP standards for the customer tenant with ID "test.onmicrosoft.com". + +#> +function Get-CIPPStandards { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID + ) + + Write-Verbose "Getting standards for $CustomerTenantID" + $endpoint = "/api/liststandards" + $params = @{ + tenantfilter = $CustomerTenantID + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} diff --git a/CIPPAPIModule/public/Tenant/Tools/Get-CIPPAuditLogTest.ps1 b/CIPPAPIModule/public/Tenant/Tools/Get-CIPPAuditLogTest.ps1 new file mode 100644 index 0000000..61ad228 --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Tools/Get-CIPPAuditLogTest.ps1 @@ -0,0 +1,45 @@ +<# +.SYNOPSIS +Retrieves audit logs for a specified customer tenant. + +.DESCRIPTION +The Get-CIPPAuditLogTest function retrieves audit logs for a specified customer tenant based on the log type. + +.PARAMETER CustomerTenantId +Specifies the ID of the customer tenant for which to retrieve audit logs. + +.PARAMETER LogType +Specifies the type of audit logs to retrieve. Valid values are 'Audit.Exchange' and 'Audit.AzureActiveDirectory'. + +.EXAMPLE +Get-CIPPAuditLogTest -CustomerTenantId "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -LogType "Audit.Exchange" +Retrieves Exchange audit logs for the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +.EXAMPLE +Get-CIPPAuditLogTest -CustomerTenantId "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -LogType "Audit.AzureActiveDirectory" +Retrieves Azure Active Directory audit logs for the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". + +.EXAMPLE +Get-CIPPAuditLogTest -CustomerTenantId "test.onmicrosoft.com" -LogType "Audit.Exchange" +Retrieves Azure Active Directory audit logs for the customer tenant "test.onmicrosoft.com". +#> + +function Get-CIPPAuditLogTest { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantId, + [Parameter(Mandatory = $true)] + [validateset('Audit.Exchange','Audit.AzureActiveDirectory')] + [string]$LogType + ) + + Write-Verbose "Looking up $LogType logs for tenant $CustomerTenantId" + $endpoint = "/api/ListAuditLogTest" + $params = @{ + TenantFilter = $CustomerTenantId + LogType = $LogType + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Tenant/Tools/Get-CIPPExternalGEOIPLookup.ps1 b/CIPPAPIModule/public/Tenant/Tools/Get-CIPPExternalGEOIPLookup.ps1 new file mode 100644 index 0000000..2f62008 --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Tools/Get-CIPPExternalGEOIPLookup.ps1 @@ -0,0 +1,46 @@ +<# +.SYNOPSIS +Performs a Geo IP lookup for a given IP address. + +.DESCRIPTION +The Get-CIPPExternalGEOIPLookup function performs a Geo IP lookup for a given IP address using a REST API. It retrieves information about the geographical location of the IP address. + +.PARAMETER IP +Specifies the IP address for which the Geo IP lookup needs to be performed. The IP address can be in IPv4 or IPv6 format. + +.EXAMPLE +Get-CIPPExternalGEOIPLookup -IP "8.8.8.8" +Performs a Geo IP lookup for the IP address "8.8.8.8". + +.EXAMPLE +Get-CIPPExternalGEOIPLookup -IP "2001:0db8:85a3:0000:0000:8a2e:0370:7334" +Performs a Geo IP lookup for the IP address "2001:0db8:85a3:0000:0000:8a2e:0370:7334". + +.INPUTS +None. You cannot pipe input to this function. + +.OUTPUTS +System.Object. The function returns the result of the Geo IP lookup as an object. + +.NOTES +This function requires the Invoke-CIPPRestMethod function to be available in the current session. + +.LINK +Invoke-CIPPRestMethod +#> +function Get-CIPPExternalGEOIPLookup { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [ValidatePattern('^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$|^((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){1,7}:)|(([0-9A-Fa-f]{1,4}:){1,6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,5}(:[0-9A-Fa-f]{1,4}){1,2})|(([0-9A-Fa-f]{1,4}:){1,4}(:[0-9A-Fa-f]{1,4}){1,3})|(([0-9A-Fa-f]{1,4}:){1,3}(:[0-9A-Fa-f]{1,4}){1,4})|(([0-9A-Fa-f]{1,4}:){1,2}(:[0-9A-Fa-f]{1,4}){1,5})|(([0-9A-Fa-f]{1,4}:):(:[0-9A-Fa-f]{1,4}){1,6})|(::([0-9A-Fa-f]{1,4}:){1,7}))$')] + [string]$IP + ) + + Write-Verbose "Looking up $ip in Geo DB" + $endpoint = "/api/execgeoiplookup" + $params = @{ + ip = $IP + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/CIPPAPIModule/public/Tenant/Tools/Get-CIPPExternalTenantInfo.ps1 b/CIPPAPIModule/public/Tenant/Tools/Get-CIPPExternalTenantInfo.ps1 new file mode 100644 index 0000000..0770ee1 --- /dev/null +++ b/CIPPAPIModule/public/Tenant/Tools/Get-CIPPExternalTenantInfo.ps1 @@ -0,0 +1,30 @@ +<# +.SYNOPSIS +Retrieves external tenant information for a specified tenant. + +.DESCRIPTION +The Get-CIPPExternalTenantInfo function retrieves external tenant information for a specified tenant by making a REST API call to the "/api/ListExternalTenantInfo" endpoint. + +.PARAMETER Tenant +Specifies the name of the tenant for which to retrieve the external tenant information. + +.EXAMPLE +Get-CIPPExternalTenantInfo -Tenant "Contoso.com" +Retrieves the external tenant information for the "Contoso" tenant. + +#> +function Get-CIPPExternalTenantInfo { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$Tenant + ) + + Write-Verbose "Getting Tenant info for $Tenant" + $endpoint = "/api/ListExternalTenantInfo" + $params = @{ + tenant = $Tenant + } + + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params +} \ No newline at end of file diff --git a/Docs/Add-CIPPContact.md b/Docs/Add-CIPPContact.md new file mode 100644 index 0000000..6eb3b82 --- /dev/null +++ b/Docs/Add-CIPPContact.md @@ -0,0 +1,32 @@ +# Add-CIPPContact +## SYNOPSIS +Adds a contact to a customer's tenant. +## DESCRIPTION +The Add-CIPPContact function adds a contact to a customer's tenant using the CIPP API. It requires the customer's tenant ID, display name, external email address, first name, and last name as mandatory parameters. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer's tenant. + + ## **-DisplayName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The display name of the contact. + + ## **-ExternalEmailAddress** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The external email address of the contact. + + ## **-FirstName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The first name of the contact. + + ## **-LastName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The last name of the contact. + + #### EXAMPLE 1 +```powershell +PS > Add-CIPPContact -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -DisplayName "John Doe" -ExternalEmailAddress "john.doe@example.com" -FirstName "John" -LastName "Doe" +``` + diff --git a/Docs/Add-CIPPUser.md b/Docs/Add-CIPPUser.md new file mode 100644 index 0000000..873bd00 --- /dev/null +++ b/Docs/Add-CIPPUser.md @@ -0,0 +1,90 @@ +# Add-CIPPUser +## SYNOPSIS +Adds a user to the specified customer tenant. +## DESCRIPTION +The Add-CIPPUser function adds a user to the specified customer tenant in the CIPP system. It sends a request to the "/api/adduser" endpoint with the provided user details. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant to which the user will be added. + + ## **-DisplayName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The display name of the user. + + ## **-UserName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The username of the user. + + ## **-AutoPassword** +> ![Foo](https://img.shields.io/badge/Type-Boolean-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-True-Blue?color=5547a8)\ +Specifies whether to automatically generate a password for the user. Default value is $true. + + ## **-FirstName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The first name of the user. + + ## **-LastName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The last name of the user. + + ## **-Domain** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The domain of the user. + + ## **-AddedAliases** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Additional aliases for the user. + + ## **-CopyFrom** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the user to copy settings from. + + ## **-UsageLocation** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The usage location of the user. + + ## **-Department** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The department of the user. + + ## **-City** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The city of the user. + + ## **-Country** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The country of the user. + + ## **-Jobtitle** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The job title of the user. + + ## **-MobilePhone** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The mobile phone number of the user. + + ## **-StreetAddress** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The street address of the user. + + ## **-PostalCode** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The postal code of the user. + + ## **-CompanyName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The company name of the user. + + ## **-MustChangePass** +> ![Foo](https://img.shields.io/badge/Type-Boolean-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-True-Blue?color=5547a8)\ +Specifies whether the user must change their password on first login. Default value is $true. + + #### EXAMPLE 1 +```powershell +PS > Add-CIPPUser -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -DisplayName "John Doe" -UserName "johndoe" -FirstName "John" -LastName "Doe" -Domain "example.com" -UsageLocation "US" + +Adds a user with the specified details to the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". The user's display name is "John Doe", username is "johndoe", first name is "John", last name is "Doe", domain is "example.com", and usage location is "US". +``` + diff --git a/Docs/Connect-CIPP.md b/Docs/Connect-CIPP.md new file mode 100644 index 0000000..53fc1fe --- /dev/null +++ b/Docs/Connect-CIPP.md @@ -0,0 +1,28 @@ +# Connect-CIPP +## SYNOPSIS +Connects to the CIPP API using the provided credentials. +## DESCRIPTION +The Connect-CIPP function establishes a connection to the CIPP API by obtaining an access token using the client credentials flow. It requires the CIPP API URL, client ID, client secret, and tenant ID as input parameters. +# PARAMETERS + +## **-CIPPAPIUrl** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The URL of the CIPP API. + + ## **-CIPPClientID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The client ID used to authenticate with the CIPP API. + + ## **-CIPPClientSecret** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The client secret used to authenticate with the CIPP API. + + ## **-TenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The ID of the tenant associated with the CIPP API. + + #### EXAMPLE 1 +```powershell +PS > Connect-CIPP -CIPPAPIUrl "https://api.cipp.com" -CIPPClientID "12345678-1234-1234-1234-1234567890ab" -CIPPClientSecret "MyClientSecret" -TenantID "98765432-4321-4321-4321-0987654321ba" +``` + diff --git a/Docs/Get-CIPPADConnectStatus.md b/Docs/Get-CIPPADConnectStatus.md new file mode 100644 index 0000000..d69431f --- /dev/null +++ b/Docs/Get-CIPPADConnectStatus.md @@ -0,0 +1,40 @@ +# Get-CIPPADConnectStatus +## SYNOPSIS +Retrieves the AD Connect status, AD Connect settings, or AD objects in error for a specified customer tenant. +## DESCRIPTION +The Get-CIPPADConnectStatus function retrieves information about the AD Connect status, AD Connect settings, or AD objects in error for a specified customer tenant. It makes a REST API call to retrieve the data from the CIPP API. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer tenant for which the AD Connect information is to be retrieved. + + ## **-dataToReturn** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the type of data to be returned. Valid values are "AzureADConnectSettings" to retrieve AD Connect settings, "AzureADObjectsInError" to retrieve AD objects in error, or leave empty to retrieve the AD Connect status. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPADConnectStatus -CustomerTenantID "contoso.onmicrosoft.com" -dataToReturn "AzureADConnectSettings" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPADConnectStatus -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -dataToReturn "AzureADConnectSettings" +``` + #### EXAMPLE 3 +```powershell +PS > Get-CIPPADConnectStatus -CustomerTenantID "contoso.onmicrosoft.com" -dataToReturn "AzureADObjectsInError" +``` + #### EXAMPLE 4 +```powershell +PS > Get-CIPPADConnectStatus -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -dataToReturn "AzureADObjectsInError" +``` + #### EXAMPLE 5 +```powershell +PS > Get-CIPPADConnectStatus -CustomerTenantID "contoso.onmicrosoft.com" +``` + #### EXAMPLE 6 +```powershell +PS > Get-CIPPADConnectStatus -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPAPDevices.md b/Docs/Get-CIPPAPDevices.md new file mode 100644 index 0000000..e07f705 --- /dev/null +++ b/Docs/Get-CIPPAPDevices.md @@ -0,0 +1,16 @@ +# Get-CIPPAPDevices +## SYNOPSIS +Retrieves AutoPilot devices for a specific customer tenant. +## DESCRIPTION +The Get-CIPPAPDevices function retrieves AutoPilot devices for a specific customer tenant by making a REST API call to the "/api/listapdevices" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer tenant for which to retrieve AutoPilot devices. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPAPDevices -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPAccessCheck.md b/Docs/Get-CIPPAccessCheck.md new file mode 100644 index 0000000..1551f6a --- /dev/null +++ b/Docs/Get-CIPPAccessCheck.md @@ -0,0 +1,16 @@ +# Get-CIPPAccessCheck +## SYNOPSIS +Performs a tenant access check for the specified customer tenant ID. +## DESCRIPTION +The Get-CIPPAccessCheck function performs a tenant access check for the specified customer tenant ID. It sends a POST request to the "/api/execaccesschecks" endpoint with the provided tenant ID. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String[]-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the customer tenant ID for which the access check needs to be performed. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPAccessCheck -CustomerTenantID "12345678" +``` + diff --git a/Docs/Get-CIPPAlerts.md b/Docs/Get-CIPPAlerts.md new file mode 100644 index 0000000..2430ed1 --- /dev/null +++ b/Docs/Get-CIPPAlerts.md @@ -0,0 +1,12 @@ +# Get-CIPPAlerts +## SYNOPSIS +Retrieves CIPP alerts from the API. +## DESCRIPTION +The Get-CIPPAlerts function retrieves CIPP alerts from the API by invoking the "/api/getcippalerts" endpoint. +# PARAMETERS + +#### EXAMPLE 1 +```powershell +PS > Get-CIPPAlerts +``` + diff --git a/Docs/Get-CIPPAlertsList.md b/Docs/Get-CIPPAlertsList.md new file mode 100644 index 0000000..d7450d1 --- /dev/null +++ b/Docs/Get-CIPPAlertsList.md @@ -0,0 +1,16 @@ +# Get-CIPPAlertsList +## SYNOPSIS +Retrieves a list of alerts for a specific customer. +## DESCRIPTION +The Get-CIPPAlertsList function retrieves a list of alerts for a specific customer identified by their tenant ID. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The tenant ID of the customer for whom to retrieve the alerts. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPAlertsList -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPAppConsentReqs.md b/Docs/Get-CIPPAppConsentReqs.md new file mode 100644 index 0000000..a72f9a0 --- /dev/null +++ b/Docs/Get-CIPPAppConsentReqs.md @@ -0,0 +1,16 @@ +# Get-CIPPAppConsentReqs +## SYNOPSIS +Retrieves app consent requests for a specific customer tenant. +## DESCRIPTION +The Get-CIPPAppConsentReqs function retrieves app consent requests for a specific customer tenant by making a REST API call to the "/api/listappconsentrequests" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which to retrieve app consent requests. This parameter is mandatory. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPAppConsentReqs -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPApps.md b/Docs/Get-CIPPApps.md new file mode 100644 index 0000000..6f48136 --- /dev/null +++ b/Docs/Get-CIPPApps.md @@ -0,0 +1,16 @@ +# Get-CIPPApps +## SYNOPSIS +Retrieves a list of apps for a specific customer tenant ID. +## DESCRIPTION +The Get-CIPPApps function retrieves a list of apps for a specific customer tenant ID by making a REST API call to the "/api/listapps" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the customer tenant ID for which to retrieve the apps. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPApps -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPAuditLogTest.md b/Docs/Get-CIPPAuditLogTest.md new file mode 100644 index 0000000..595b31a --- /dev/null +++ b/Docs/Get-CIPPAuditLogTest.md @@ -0,0 +1,28 @@ +# Get-CIPPAuditLogTest +## SYNOPSIS +Retrieves audit logs for a specified customer tenant. +## DESCRIPTION +The Get-CIPPAuditLogTest function retrieves audit logs for a specified customer tenant based on the log type. +# PARAMETERS + +## **-CustomerTenantId** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer tenant for which to retrieve audit logs. + + ## **-LogType** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the type of audit logs to retrieve. Valid values are 'Audit.Exchange' and 'Audit.AzureActiveDirectory'. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPAuditLogTest -CustomerTenantId "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -LogType "Audit.Exchange" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPAuditLogTest -CustomerTenantId "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -LogType "Audit.AzureActiveDirectory" +``` + #### EXAMPLE 3 +```powershell +PS > Get-CIPPAuditLogTest -CustomerTenantId "test.onmicrosoft.com" -LogType "Audit.Exchange" +``` + diff --git a/Docs/Get-CIPPAutoPilotConfig.md b/Docs/Get-CIPPAutoPilotConfig.md new file mode 100644 index 0000000..d6c056c --- /dev/null +++ b/Docs/Get-CIPPAutoPilotConfig.md @@ -0,0 +1,25 @@ +# Get-CIPPAutoPilotConfig +## SYNOPSIS +Retrieves AutoPilot configuration information for a specified customer tenant ID and type. +## DESCRIPTION +The Get-CIPPAutoPilotConfig function retrieves AutoPilot configuration information for a specified customer tenant ID and type. +It makes a REST API call to retrieve the configuration data. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the customer tenant ID for which to retrieve the AutoPilot configuration. + + ## **-Type** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the type of AutoPilot configuration to retrieve. Valid values are "ESP" and "ApProfile". + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPAutoPilotConfig -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -Type "ESP" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPAutoPilotConfig -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -Type "ApProfile" +``` + diff --git a/Docs/Get-CIPPBECCheck.md b/Docs/Get-CIPPBECCheck.md new file mode 100644 index 0000000..7a8b7ae --- /dev/null +++ b/Docs/Get-CIPPBECCheck.md @@ -0,0 +1,25 @@ +# Get-CIPPBECCheck +## SYNOPSIS +Performs a BEC (Business Email Compromise) check for a user. +## DESCRIPTION +The Get-CIPPBECCheck function performs a BEC check for a user by making a REST API call to the specified endpoint. +It waits for the check to complete and returns the response. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer's tenant. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the user. + + ## **-UserName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The name of the user. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPBECCheck -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" -UserName "JohnDoe" +``` + diff --git a/Docs/Get-CIPPBPA.md b/Docs/Get-CIPPBPA.md new file mode 100644 index 0000000..116012a --- /dev/null +++ b/Docs/Get-CIPPBPA.md @@ -0,0 +1,23 @@ +# Get-CIPPBPA +## SYNOPSIS +Retrieves the BPA (Best Practices Analyzer) report for a specific customer tenant. +## DESCRIPTION +The Get-CIPPBPA function retrieves the BPA report for a customer tenant based on the provided CustomerTenantID. +Optionally, you can specify a ReportName to filter the report. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the ID of the customer tenant for which to retrieve the BPA report. This parameter is optional. + + ## **-ReportName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the name of the report to filter the BPA report. This parameter is optional. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPBPA -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -ReportName "CIPP Best Practices V1.0 - Tenant View" + +This example retrieves the BPA report for the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" and filters it by the report name "CIPP Best Practices V1.0 - Tenant View". +``` + diff --git a/Docs/Get-CIPPBPATemplates.md b/Docs/Get-CIPPBPATemplates.md new file mode 100644 index 0000000..b6df35e --- /dev/null +++ b/Docs/Get-CIPPBPATemplates.md @@ -0,0 +1,12 @@ +# Get-CIPPBPATemplates +## SYNOPSIS +Retrieves the CIPP BPA Templates. +## DESCRIPTION +The Get-CIPPBPATemplates function retrieves the CIPP (Continuous Improvement and Performance Program) BPA (Best Practice Assessment) Templates from the specified API endpoint. +# PARAMETERS + +#### EXAMPLE 1 +```powershell +PS > Get-CIPPBPATemplates +``` + diff --git a/Docs/Get-CIPPBasicAuth.md b/Docs/Get-CIPPBasicAuth.md new file mode 100644 index 0000000..ef9a20e --- /dev/null +++ b/Docs/Get-CIPPBasicAuth.md @@ -0,0 +1,16 @@ +# Get-CIPPBasicAuth +## SYNOPSIS +Retrieves Basic Authentication information for a specific customer. +## DESCRIPTION +The Get-CIPPBasicAuth function retrieves Basic Authentication information for a specific customer by making a REST API call to the "/api/listbasicauth" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The unique identifier of the customer's tenant. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPBasicAuth -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPCAPolicies.md b/Docs/Get-CIPPCAPolicies.md new file mode 100644 index 0000000..2b190ef --- /dev/null +++ b/Docs/Get-CIPPCAPolicies.md @@ -0,0 +1,20 @@ +# Get-CIPPCAPolicies +## SYNOPSIS +Retrieves Conditional Access Policies for a specific customer tenant. +## DESCRIPTION +The Get-CIPPCAPolicies function retrieves the Conditional Access Policies for a specific customer tenant by making a REST API call to the "/api/listconditionalaccesspolicies" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which to retrieve the Conditional Access Policies. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPCAPolicies -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPCAPolicies -CustomerTenantID "contoso.onmicrosoft.com" +``` + diff --git a/Docs/Get-CIPPCATemplates.md b/Docs/Get-CIPPCATemplates.md new file mode 100644 index 0000000..a254caa --- /dev/null +++ b/Docs/Get-CIPPCATemplates.md @@ -0,0 +1,12 @@ +# Get-CIPPCATemplates +## SYNOPSIS +Retrieves Conditional Access Templates. +## DESCRIPTION +The Get-CIPPCATemplates function retrieves the list of Conditional Access Templates from the specified endpoint. +# PARAMETERS + +#### EXAMPLE 1 +```powershell +PS > Get-CIPPCATemplates +``` + diff --git a/Docs/Get-CIPPCalendarPerms.md b/Docs/Get-CIPPCalendarPerms.md new file mode 100644 index 0000000..26d2222 --- /dev/null +++ b/Docs/Get-CIPPCalendarPerms.md @@ -0,0 +1,20 @@ +# Get-CIPPCalendarPerms +## SYNOPSIS +Retrieves calendar permissions for a user in a specified customer tenant. +## DESCRIPTION +The Get-CIPPCalendarPerms function retrieves the calendar permissions for a user in a specified customer tenant using the CIPP API. It sends a request to the "/api/listcalendarpermissions" endpoint with the provided customer tenant ID and user ID. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the user. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPCalendarPerms -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "john.doe@example.com" +``` + diff --git a/Docs/Get-CIPPContacts.md b/Docs/Get-CIPPContacts.md new file mode 100644 index 0000000..bcc38a1 --- /dev/null +++ b/Docs/Get-CIPPContacts.md @@ -0,0 +1,24 @@ +# Get-CIPPContacts +## SYNOPSIS +Retrieves contact details for a specific contact or all contacts for a given tenant. +## DESCRIPTION +The Get-CIPPContacts function retrieves contact details for a specific contact or all contacts for a given tenant in the CIPP system. It makes use of the Invoke-CIPPRestMethod function to send a request to the CIPP API. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer tenant for which to retrieve the contacts. This parameter is mandatory. + + ## **-ContactID** +> ![Foo](https://img.shields.io/badge/Type-Guid-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the ID of the contact to retrieve details for. If not provided, details for all contacts in the specified tenant will be retrieved. This parameter is optional. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPContacts -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -ContactID "65be49bb-85cb-4d92-9e34-9e855d0c830c" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPContacts -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPDefenderState.md b/Docs/Get-CIPPDefenderState.md new file mode 100644 index 0000000..b599cb2 --- /dev/null +++ b/Docs/Get-CIPPDefenderState.md @@ -0,0 +1,16 @@ +# Get-CIPPDefenderState +## SYNOPSIS +Retrieves the Defender state for a specific customer. +## DESCRIPTION +The Get-CIPPDefenderState function retrieves the Defender state for a specific customer identified by their tenant ID. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-Guid-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the tenant ID of the customer for whom the Defender state needs to be retrieved. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPDefenderState -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPDefenderTVM.md b/Docs/Get-CIPPDefenderTVM.md new file mode 100644 index 0000000..3c012b2 --- /dev/null +++ b/Docs/Get-CIPPDefenderTVM.md @@ -0,0 +1,16 @@ +# Get-CIPPDefenderTVM +## SYNOPSIS +Retrieves Defender TVM for a specific customer. +## DESCRIPTION +The Get-CIPPDefenderTVM function retrieves the Defender TVM (Threat and Vulnerability Management) for a specific customer based on the provided CustomerTenantID. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the unique identifier of the customer's tenant. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPDefenderTVM -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPDeletedItems.md b/Docs/Get-CIPPDeletedItems.md new file mode 100644 index 0000000..3499a18 --- /dev/null +++ b/Docs/Get-CIPPDeletedItems.md @@ -0,0 +1,16 @@ +# Get-CIPPDeletedItems +## SYNOPSIS +Retrieves the deleted items for a specific customer tenant. +## DESCRIPTION +The Get-CIPPDeletedItems function retrieves the deleted items for a specific customer tenant by making a REST API call to the "/api/listdeleteditems" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which to retrieve the deleted items. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPDeletedItems -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPDeviceCompliance.md b/Docs/Get-CIPPDeviceCompliance.md new file mode 100644 index 0000000..dcb2628 --- /dev/null +++ b/Docs/Get-CIPPDeviceCompliance.md @@ -0,0 +1,16 @@ +# Get-CIPPDeviceCompliance +## SYNOPSIS +Retrieves device compliance information for a specific customer tenant. +## DESCRIPTION +The Get-CIPPDeviceCompliance function retrieves device compliance information for a specified customer tenant. It makes use of the Invoke-CIPPRestMethod function to send a request to the CIPP API and retrieve the device compliance data. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The unique identifier of the customer tenant for which to retrieve device compliance information. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPDeviceCompliance -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPDevices.md b/Docs/Get-CIPPDevices.md new file mode 100644 index 0000000..9f627a3 --- /dev/null +++ b/Docs/Get-CIPPDevices.md @@ -0,0 +1,16 @@ +# Get-CIPPDevices +## SYNOPSIS +Retrieves a list of devices for a specific customer. +## DESCRIPTION +The Get-CIPPDevices function retrieves a list of devices associated with a specific customer in the CIPP system. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The unique identifier of the customer's tenant. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPDevices -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPDomainAnalyser.md b/Docs/Get-CIPPDomainAnalyser.md new file mode 100644 index 0000000..b3c1bb6 --- /dev/null +++ b/Docs/Get-CIPPDomainAnalyser.md @@ -0,0 +1,16 @@ +# Get-CIPPDomainAnalyser +## SYNOPSIS +Retrieves the list of domain analyzers for a specific customer tenant. +## DESCRIPTION +The Get-CIPPDomainAnalyser function retrieves the list of domain analyzers associated with a specific customer tenant. It makes a REST API call to retrieve the list of domain analyzers based on the provided customer tenant ID. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which to retrieve the domain analyzers. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPDomainAnalyser -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPDomainHealth.md b/Docs/Get-CIPPDomainHealth.md new file mode 100644 index 0000000..f3811ee --- /dev/null +++ b/Docs/Get-CIPPDomainHealth.md @@ -0,0 +1,24 @@ +# Get-CIPPDomainHealth +## SYNOPSIS +Gets the domain health information for a specified domain. +## DESCRIPTION +The Get-CIPPDomainHealth function retrieves domain health information for a specified domain using the CIPP API. It supports various actions such as reading WHOIS records, NS records, MX records, SPF records, DMARC policies, DKIM records, testing DNSSEC, and testing MTA-STS. +# PARAMETERS + +## **-DomainName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the name of the domain for which to retrieve the health information. + + ## **-Action** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the action to perform for retrieving the domain health information. Valid values are: - ReadWhoisRecord: Retrieves the WHOIS record for the domain. - ReadNSRecord: Retrieves the NS record for the domain. - ReadMXRecord: Retrieves the MX record for the domain. - ReadSpfRecord: Retrieves the SPF record for the domain. - ReadDmarcPolicy: Retrieves the DMARC policy for the domain. - ReadDkimRecord: Retrieves the DKIM record for the domain. - TestDNSSEC: Tests DNSSEC for the domain. - TestMtaSts: Tests MTA-STS for the domain. + + #### EXAMPLE 1 +```powershell +PS>Get-CIPPDomainHealth -DomainName "contoso.onmicrosoft.com" -Action "ReadWhoisRecord" +``` + #### EXAMPLE 2 +```powershell +PS>Get-CIPPDomainHealth -DomainName "contoso.onmicrosoft.com" -Action "TestDNSSEC" +``` + diff --git a/Docs/Get-CIPPDomains.md b/Docs/Get-CIPPDomains.md new file mode 100644 index 0000000..bc10b4a --- /dev/null +++ b/Docs/Get-CIPPDomains.md @@ -0,0 +1,16 @@ +# Get-CIPPDomains +## SYNOPSIS +Retrieves the domains for a specific customer. +## DESCRIPTION +The Get-CIPPDomains function retrieves the domains associated with a specific customer in the CIPP system. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The unique identifier of the customer's tenant. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPDomains -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPEnabledSharedMailboxes.md b/Docs/Get-CIPPEnabledSharedMailboxes.md new file mode 100644 index 0000000..e685c88 --- /dev/null +++ b/Docs/Get-CIPPEnabledSharedMailboxes.md @@ -0,0 +1,16 @@ +# Get-CIPPEnabledSharedMailboxes +## SYNOPSIS +Retrieves shared mailboxes with account enabled for a specific customer tenant ID. +## DESCRIPTION +The Get-CIPPEnabledSharedMailboxes function retrieves shared mailboxes with account enabled for a specific customer tenant ID. It makes use of the Invoke-CIPPRestMethod function to send a request to the CIPP API and retrieve the shared mailboxes. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the customer tenant ID for which to retrieve the shared mailboxes. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPEnabledSharedMailboxes -CustomerTenantID "contoso.onmicrosoft.com" +``` + diff --git a/Docs/Get-CIPPExchangeConnectorTemplates.md b/Docs/Get-CIPPExchangeConnectorTemplates.md new file mode 100644 index 0000000..0330031 --- /dev/null +++ b/Docs/Get-CIPPExchangeConnectorTemplates.md @@ -0,0 +1,12 @@ +# Get-CIPPExchangeConnectorTemplates +## SYNOPSIS +Retrieves the Exchange Connector Templates. +## DESCRIPTION +The Get-CIPPExchangeConnectorTemplates function retrieves the Exchange Connector Templates by making a REST API call to the specified endpoint. +# PARAMETERS + +#### EXAMPLE 1 +```powershell +PS > Get-CIPPExchangeConnectorTemplates +``` + diff --git a/Docs/Get-CIPPExchangeConnectors.md b/Docs/Get-CIPPExchangeConnectors.md new file mode 100644 index 0000000..4d1fb17 --- /dev/null +++ b/Docs/Get-CIPPExchangeConnectors.md @@ -0,0 +1,16 @@ +# Get-CIPPExchangeConnectors +## SYNOPSIS +Retrieves Exchange Connectors for a specific customer. +## DESCRIPTION +The Get-CIPPExchangeConnectors function retrieves Exchange Connectors for a specific customer based on the provided CustomerTenantID. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the unique identifier of the customer's tenant. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPExchangeConnectors -CustomerTenantID "Get-CIPPEnabledSharedMailboxes" +``` + diff --git a/Docs/Get-CIPPExecAPIPermissionsList.md b/Docs/Get-CIPPExecAPIPermissionsList.md new file mode 100644 index 0000000..125fb92 --- /dev/null +++ b/Docs/Get-CIPPExecAPIPermissionsList.md @@ -0,0 +1,12 @@ +# Get-CIPPExecAPIPermissionsList +## SYNOPSIS +Retrieves the list of CIPP execution API permissions. +## DESCRIPTION +The Get-CIPPExecAPIPermissionsList function retrieves the list of CIPP execution API permissions by making a REST API call to the specified endpoint. +# PARAMETERS + +#### EXAMPLE 1 +```powershell +PS > Get-CIPPExecAPIPermissionsList +``` + diff --git a/Docs/Get-CIPPExternalGEOIPLookup.md b/Docs/Get-CIPPExternalGEOIPLookup.md new file mode 100644 index 0000000..302e195 --- /dev/null +++ b/Docs/Get-CIPPExternalGEOIPLookup.md @@ -0,0 +1,20 @@ +# Get-CIPPExternalGEOIPLookup +## SYNOPSIS +Performs a Geo IP lookup for a given IP address. +## DESCRIPTION +The Get-CIPPExternalGEOIPLookup function performs a Geo IP lookup for a given IP address using a REST API. It retrieves information about the geographical location of the IP address. +# PARAMETERS + +## **-IP** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the IP address for which the Geo IP lookup needs to be performed. The IP address can be in IPv4 or IPv6 format. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPExternalGEOIPLookup -IP "8.8.8.8" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPExternalGEOIPLookup -IP "2001:0db8:85a3:0000:0000:8a2e:0370:7334" +``` + diff --git a/Docs/Get-CIPPExternalTenantInfo.md b/Docs/Get-CIPPExternalTenantInfo.md new file mode 100644 index 0000000..54de150 --- /dev/null +++ b/Docs/Get-CIPPExternalTenantInfo.md @@ -0,0 +1,16 @@ +# Get-CIPPExternalTenantInfo +## SYNOPSIS +Retrieves external tenant information for a specified tenant. +## DESCRIPTION +The Get-CIPPExternalTenantInfo function retrieves external tenant information for a specified tenant by making a REST API call to the "/api/ListExternalTenantInfo" endpoint. +# PARAMETERS + +## **-Tenant** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the name of the tenant for which to retrieve the external tenant information. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPExternalTenantInfo -Tenant "Contoso.com" +``` + diff --git a/Docs/Get-CIPPGetBitLockerKey.md b/Docs/Get-CIPPGetBitLockerKey.md new file mode 100644 index 0000000..458b747 --- /dev/null +++ b/Docs/Get-CIPPGetBitLockerKey.md @@ -0,0 +1,20 @@ +# Get-CIPPGetBitLockerKey +## SYNOPSIS +Gets the BitLocker recovery key for a specified computer. +## DESCRIPTION +The Get-CIPPGetBitLockerKey function retrieves the BitLocker recovery key for a specified computer in the CIPP project. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer tenant. + + ## **-guid** +> ![Foo](https://img.shields.io/badge/Type-Guid-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the GUID of the computer for which to retrieve the BitLocker recovery key. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPGetBitLockerKey -CustomerTenantID "12345678-1234-1234-1234-1234567890AB" -guid "01234567-89AB-CDEF-0123-456789ABCDEF" +``` + diff --git a/Docs/Get-CIPPGroupTemplates.md b/Docs/Get-CIPPGroupTemplates.md new file mode 100644 index 0000000..9bc4fce --- /dev/null +++ b/Docs/Get-CIPPGroupTemplates.md @@ -0,0 +1,20 @@ +# Get-CIPPGroupTemplates +## SYNOPSIS +Retrieves group templates from the CIPP API. +## DESCRIPTION +The Get-CIPPGroupTemplates function retrieves group templates from the CIPP API. It can retrieve all group templates or a specific template based on the provided TemplateID. +# PARAMETERS + +## **-TemplateID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the ID of the group template to retrieve. If not provided, all group templates will be retrieved. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPGroupTemplates -TemplateID "12345" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPGroupTemplates +``` + diff --git a/Docs/Get-CIPPGroups.md b/Docs/Get-CIPPGroups.md new file mode 100644 index 0000000..fcbdebd --- /dev/null +++ b/Docs/Get-CIPPGroups.md @@ -0,0 +1,40 @@ +# Get-CIPPGroups +## SYNOPSIS +Retrieves information about CIPP groups. +## DESCRIPTION +The Get-CIPPGroups function retrieves information about CIPP groups based on the provided parameters. It can retrieve all groups for a specific tenant, group details for a specific group, group members for a specific group, or group owners for a specific group. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer tenant for which to retrieve the groups. + + ## **-GroupID** +> ![Foo](https://img.shields.io/badge/Type-Guid-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the ID of the group for which to retrieve the information. If not provided, all groups for the specified tenant will be retrieved. + + ## **-Members** +> ![Foo](https://img.shields.io/badge/Type-SwitchParameter-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-False-Blue?color=5547a8)\ +Switch parameter. If specified, retrieves the members of the specified group. + + ## **-Owners** +> ![Foo](https://img.shields.io/badge/Type-SwitchParameter-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-False-Blue?color=5547a8)\ +Switch parameter. If specified, retrieves the owners of the specified group. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPGroups -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPGroups -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -GroupID "abcdefg" +``` + #### EXAMPLE 3 +```powershell +PS > Get-CIPPGroups -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -GroupID "abcdefg" -Members +``` + #### EXAMPLE 4 +```powershell +PS > Get-CIPPGroups -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -GroupID "abcdefg" -Owners +``` + diff --git a/Docs/Get-CIPPInactiveAccounts.md b/Docs/Get-CIPPInactiveAccounts.md new file mode 100644 index 0000000..3038e44 --- /dev/null +++ b/Docs/Get-CIPPInactiveAccounts.md @@ -0,0 +1,16 @@ +# Get-CIPPInactiveAccounts +## SYNOPSIS +Retrieves a list of inactive accounts for a specific customer. +## DESCRIPTION +The Get-CIPPInactiveAccounts function retrieves a list of inactive accounts for a specific customer based on the provided CustomerTenantID. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer's tenant for which to retrieve the inactive accounts. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPInactiveAccounts -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPIncidentList.md b/Docs/Get-CIPPIncidentList.md new file mode 100644 index 0000000..3359fbf --- /dev/null +++ b/Docs/Get-CIPPIncidentList.md @@ -0,0 +1,16 @@ +# Get-CIPPIncidentList +## SYNOPSIS +Retrieves a list of incidents for a specific customer. +## DESCRIPTION +The Get-CIPPIncidentList function retrieves a list of incidents for a specific customer identified by their tenant ID. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The tenant ID of the customer for whom to retrieve the incidents. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPIncidentList -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPIntuneIntents.md b/Docs/Get-CIPPIntuneIntents.md new file mode 100644 index 0000000..6f4e83d --- /dev/null +++ b/Docs/Get-CIPPIntuneIntents.md @@ -0,0 +1,20 @@ +# Get-CIPPIntuneIntents +## SYNOPSIS +Retrieves Intune Intents for a specific customer. +## DESCRIPTION +The Get-CIPPIntuneIntents function retrieves Intune Intents for a specific customer based on the provided CustomerTenantID. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer's tenant. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPIntuneIntents -CustomerTenantID "contoso.onmicrosoft.com" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPIntuneIntents -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPIntunePolicy.md b/Docs/Get-CIPPIntunePolicy.md new file mode 100644 index 0000000..1570ccf --- /dev/null +++ b/Docs/Get-CIPPIntunePolicy.md @@ -0,0 +1,28 @@ +# Get-CIPPIntunePolicy +## SYNOPSIS +Retrieves Intune policies for a specific customer. +## DESCRIPTION +The Get-CIPPIntunePolicy function retrieves Intune policies for a specific customer based on the provided parameters. It uses the Invoke-CIPPRestMethod function to make the request to the API. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer's tenant. + + ## **-PolicyID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The ID of the policy. This parameter is optional. + + ## **-Urlname** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The URL name. This parameter is optional. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPIntunePolicy -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -PolicyID "policy123" -Urlname "example" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPIntunePolicy -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPIntuneTemplates.md b/Docs/Get-CIPPIntuneTemplates.md new file mode 100644 index 0000000..2c8624c --- /dev/null +++ b/Docs/Get-CIPPIntuneTemplates.md @@ -0,0 +1,16 @@ +# Get-CIPPIntuneTemplates +## SYNOPSIS +Retrieves Intune templates. +## DESCRIPTION +The Get-CIPPIntuneTemplates function retrieves Intune templates using the CIPPRestMethod cmdlet. +# PARAMETERS + +## **-TemplateID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the ID of the template to retrieve. This parameter is optional. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPIntuneTemplates -TemplateID "12345" +``` + diff --git a/Docs/Get-CIPPKnownIPDB.md b/Docs/Get-CIPPKnownIPDB.md new file mode 100644 index 0000000..1368f80 --- /dev/null +++ b/Docs/Get-CIPPKnownIPDB.md @@ -0,0 +1,16 @@ +# Get-CIPPKnownIPDB +## SYNOPSIS +Retrieves the Known IP Database for a specific customer tenant. +## DESCRIPTION +The Get-CIPPKnownIPDB function retrieves the Known IP Database for a specific customer tenant by making a REST API call to the "/api/listknownipdb" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the ID of the customer tenant for which to retrieve the Known IP Database. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPKnownIPDB -CustomerTenantID "12345678" +``` + diff --git a/Docs/Get-CIPPLicenses.md b/Docs/Get-CIPPLicenses.md new file mode 100644 index 0000000..79a1f9e --- /dev/null +++ b/Docs/Get-CIPPLicenses.md @@ -0,0 +1,20 @@ +# Get-CIPPLicenses +## SYNOPSIS +Retrieves licenses for a specific customer tenant. +## DESCRIPTION +The Get-CIPPLicenses function retrieves licenses for a specific customer tenant by making a REST API call to the "/api/ListLicenses" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which licenses need to be retrieved. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPLicenses -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPLicenses -CustomerTenantID "contoso.onmicrosoft.com" +``` + diff --git a/Docs/Get-CIPPLocalAdminPassword.md b/Docs/Get-CIPPLocalAdminPassword.md new file mode 100644 index 0000000..37b8ea3 --- /dev/null +++ b/Docs/Get-CIPPLocalAdminPassword.md @@ -0,0 +1,20 @@ +# Get-CIPPLocalAdminPassword +## SYNOPSIS +Retrieves the local admin password for a specified computer. +## DESCRIPTION +The Get-CIPPLocalAdminPassword function retrieves the local admin password for a specified computer in the CIPP project. It makes a REST API request to the CIPP API endpoint to fetch the password. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant. + + ## **-guid** +> ![Foo](https://img.shields.io/badge/Type-Guid-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The GUID of the computer for which to retrieve the local admin password. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPLocalAdminPassword -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -guid "abcdefg" +``` + diff --git a/Docs/Get-CIPPLogs.md b/Docs/Get-CIPPLogs.md new file mode 100644 index 0000000..f4a9962 --- /dev/null +++ b/Docs/Get-CIPPLogs.md @@ -0,0 +1,12 @@ +# Get-CIPPLogs +## SYNOPSIS +Retrieves CIPP logs from the API. +## DESCRIPTION +The Get-CIPPLogs function retrieves logs from the CIPP API by invoking the "/api/ListLogs" endpoint. +# PARAMETERS + +#### EXAMPLE 1 +```powershell +PS > Get-CIPPLogs +``` + diff --git a/Docs/Get-CIPPMFAUsers.md b/Docs/Get-CIPPMFAUsers.md new file mode 100644 index 0000000..94871ef --- /dev/null +++ b/Docs/Get-CIPPMFAUsers.md @@ -0,0 +1,16 @@ +# Get-CIPPMFAUsers +## SYNOPSIS +Retrieves the MFA users for a specified customer tenant ID. +## DESCRIPTION +The Get-CIPPMFAUsers function retrieves the MFA users for a specified customer tenant ID by making a REST API call to the "/api/listmfausers" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the customer tenant ID for which to retrieve the MFA users. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPMFAUsers -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPMailQuarantine.md b/Docs/Get-CIPPMailQuarantine.md new file mode 100644 index 0000000..e8ea7ef --- /dev/null +++ b/Docs/Get-CIPPMailQuarantine.md @@ -0,0 +1,16 @@ +# Get-CIPPMailQuarantine +## SYNOPSIS +Retrieves the mail quarantine for a specific customer tenant. +## DESCRIPTION +The Get-CIPPMailQuarantine function retrieves the mail quarantine for a specific customer tenant by making a REST API call to the "/api/listmailquarantine" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which to retrieve the mail quarantine. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPMailQuarantine -CustomerTenantID "contoso.onmicrosoft.com" +``` + diff --git a/Docs/Get-CIPPMailboxMobileDevices.md b/Docs/Get-CIPPMailboxMobileDevices.md new file mode 100644 index 0000000..a07b47d --- /dev/null +++ b/Docs/Get-CIPPMailboxMobileDevices.md @@ -0,0 +1,20 @@ +# Get-CIPPMailboxMobileDevices +## SYNOPSIS +Retrieves the mobile devices associated with a mailbox. +## DESCRIPTION +The Get-CIPPMailboxMobileDevices function retrieves the mobile devices associated with a mailbox in the CIPP system. It makes use of the Invoke-CIPPRestMethod function to send a request to the CIPP API and retrieve the mobile devices. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer tenant. + + ## **-Mailbox** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the mailbox for which to retrieve the mobile devices. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPMailboxMobileDevices -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -Mailbox "user@example.com" +``` + diff --git a/Docs/Get-CIPPMailboxPermissions.md b/Docs/Get-CIPPMailboxPermissions.md new file mode 100644 index 0000000..0ddf58e --- /dev/null +++ b/Docs/Get-CIPPMailboxPermissions.md @@ -0,0 +1,22 @@ +# Get-CIPPMailboxPermissions +## SYNOPSIS +Retrieves mailbox permissions for a specified customer tenant and user ID. +## DESCRIPTION +The Get-CIPPMailboxPermissions function retrieves mailbox permissions for a specified customer tenant and user ID. It makes an API call to the "/api/listmailboxpermissions" endpoint with the provided parameters. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which mailbox permissions are to be retrieved. This parameter is mandatory. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the user for which mailbox permissions are to be retrieved. This parameter is mandatory. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPMailboxPermissions -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "user1@domain.com" + +This example retrieves mailbox permissions for the customer tenant with ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" and the user with ID "user1@domain.com". +``` + diff --git a/Docs/Get-CIPPMailboxRestores.md b/Docs/Get-CIPPMailboxRestores.md new file mode 100644 index 0000000..0f0c9ea --- /dev/null +++ b/Docs/Get-CIPPMailboxRestores.md @@ -0,0 +1,28 @@ +# Get-CIPPMailboxRestores +## SYNOPSIS +Retrieves mailbox restores for a specified customer tenant. +## DESCRIPTION +The Get-CIPPMailboxRestores function retrieves mailbox restores for a specified customer tenant in the CIPP project. It uses the Invoke-CIPPRestMethod function to make a REST API call to the "/api/listmailboxrestores" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer tenant for which mailbox restores should be retrieved. This parameter is mandatory. + + ## **-Identity** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the identity of the mailbox for which restores should be retrieved. This parameter is optional. + + ## **-Includereport** +> ![Foo](https://img.shields.io/badge/Type-SwitchParameter-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-False-Blue?color=5547a8)\ +Indicates whether to include the restore report in the results. This parameter is optional. + + ## **-Statistics** +> ![Foo](https://img.shields.io/badge/Type-SwitchParameter-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-False-Blue?color=5547a8)\ +Indicates whether to include statistics about the restores in the results. This parameter is optional. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPMailboxRestores -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -Identity "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" -Includereport -Statistics +``` + diff --git a/Docs/Get-CIPPMailboxRules.md b/Docs/Get-CIPPMailboxRules.md new file mode 100644 index 0000000..8f6a7a6 --- /dev/null +++ b/Docs/Get-CIPPMailboxRules.md @@ -0,0 +1,18 @@ +# Get-CIPPMailboxRules +## SYNOPSIS +Retrieves mailbox rules for a specified customer tenant ID. +## DESCRIPTION +The Get-CIPPMailboxRules function retrieves mailbox rules for a specified customer tenant ID by making a REST API call to the "/api/listmailboxrules" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The customer tenant ID for which to retrieve mailbox rules. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPMailboxRules -CustomerTenantID "contoso.onmicrosoft.com" + +This example retrieves mailbox rules for the customer tenant with the ID "contoso.onmicrosoft.com". +``` + diff --git a/Docs/Get-CIPPMailboxStatistics.md b/Docs/Get-CIPPMailboxStatistics.md new file mode 100644 index 0000000..c8c6cd5 --- /dev/null +++ b/Docs/Get-CIPPMailboxStatistics.md @@ -0,0 +1,16 @@ +# Get-CIPPMailboxStatistics +## SYNOPSIS +Retrieves mailbox statistics for a specified customer tenant ID. +## DESCRIPTION +The Get-CIPPMailboxStatistics function retrieves mailbox statistics for a specified customer tenant ID by making a REST API call to the "/api/listmailboxstatistics" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the customer tenant ID for which mailbox statistics need to be retrieved. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPMailboxStatistics -CustomerTenantID "contoso.onmicrosoft.com" +``` + diff --git a/Docs/Get-CIPPMailboxes.md b/Docs/Get-CIPPMailboxes.md new file mode 100644 index 0000000..92d725c --- /dev/null +++ b/Docs/Get-CIPPMailboxes.md @@ -0,0 +1,16 @@ +# Get-CIPPMailboxes +## SYNOPSIS +Retrieves a list of mailboxes for a specific customer tenant. +## DESCRIPTION +The Get-CIPPMailboxes function retrieves a list of mailboxes for a specific customer tenant by making a REST API call to the "/api/ListMailboxes" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which to retrieve the mailbox list. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPMailboxes -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPMessageTrace.md b/Docs/Get-CIPPMessageTrace.md new file mode 100644 index 0000000..6713ae7 --- /dev/null +++ b/Docs/Get-CIPPMessageTrace.md @@ -0,0 +1,37 @@ +# Get-CIPPMessageTrace +## SYNOPSIS +Retrieves the message trace for a specific customer tenant ID. +## DESCRIPTION +The Get-CIPPMessageTrace function retrieves the message trace for a specific customer tenant ID within a specified number of days. +It can also filter the results based on the sender and recipient email addresses. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the customer tenant ID for which the message trace needs to be retrieved. This parameter is mandatory. + + ## **-Days** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the number of days within which the message trace needs to be retrieved. This parameter is mandatory. + + ## **-Sender** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the sender email address to filter the message trace results. This parameter is optional. + + ## **-Recipient** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the recipient email address to filter the message trace results. This parameter is optional. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPMessageTrace -CustomerTenantID "contoso.onmicrosoft.com" -Days 7 +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPMessageTrace -CustomerTenantID "contoso.onmicrosoft.com" -Days 30 -Sender "john.doe@contoso.com" +``` + #### EXAMPLE 3 +```powershell +PS > Get-CIPPMessageTrace -CustomerTenantID "contoso.onmicrosoft.com" -Days 14 -Recipient "jane.smith@contoso.com" +``` + diff --git a/Docs/Get-CIPPNamedLocations.md b/Docs/Get-CIPPNamedLocations.md new file mode 100644 index 0000000..20d7623 --- /dev/null +++ b/Docs/Get-CIPPNamedLocations.md @@ -0,0 +1,20 @@ +# Get-CIPPNamedLocations +## SYNOPSIS +Retrieves named locations for a specific customer tenant. +## DESCRIPTION +The Get-CIPPNamedLocations function retrieves named locations for a specific customer tenant by making a REST API call to the "/api/listnamedlocations" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which to retrieve named locations. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPNamedLocations -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPNamedLocations -CustomerTenantID "contoso.onmicrosoft.com" +``` + diff --git a/Docs/Get-CIPPOAuthApps.md b/Docs/Get-CIPPOAuthApps.md new file mode 100644 index 0000000..1ed612e --- /dev/null +++ b/Docs/Get-CIPPOAuthApps.md @@ -0,0 +1,16 @@ +# Get-CIPPOAuthApps +## SYNOPSIS +Retrieves OAuth apps for a specific customer tenant. +## DESCRIPTION +The Get-CIPPOAuthApps function retrieves OAuth apps for a specific customer tenant by making a REST API call to the "/api/listoauthapps" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which to retrieve OAuth apps. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPOAuthApps -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPOrg.md b/Docs/Get-CIPPOrg.md new file mode 100644 index 0000000..e41be2b --- /dev/null +++ b/Docs/Get-CIPPOrg.md @@ -0,0 +1,20 @@ +# Get-CIPPOrg +## SYNOPSIS +Retrieves information about a specific organization in the CIPP system. +## DESCRIPTION +The Get-CIPPOrg function retrieves information about a specific organization in the CIPP system based on the provided CustomerTenantID. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the unique identifier of the customer tenant. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPOrg -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPOrg -CustomerTenantID "contoso.onmicrosoft.com" +``` + diff --git a/Docs/Get-CIPPOutOfOffice.md b/Docs/Get-CIPPOutOfOffice.md new file mode 100644 index 0000000..009bccf --- /dev/null +++ b/Docs/Get-CIPPOutOfOffice.md @@ -0,0 +1,20 @@ +# Get-CIPPOutOfOffice +## SYNOPSIS +Retrieves the out of office status for a specified user. +## DESCRIPTION +The Get-CIPPOutOfOffice function retrieves the out of office status for a specified user in a customer's tenant. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer's tenant. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the user. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPOutOfOffice -CustomerTenantID "contoso.onmicrosoft.com" -UserID "john.doe@domain.com" +``` + diff --git a/Docs/Get-CIPPPartnerRelationships.md b/Docs/Get-CIPPPartnerRelationships.md new file mode 100644 index 0000000..57e0e12 --- /dev/null +++ b/Docs/Get-CIPPPartnerRelationships.md @@ -0,0 +1,20 @@ +# Get-CIPPPartnerRelationships +## SYNOPSIS +Retrieves partner relationships for a specified customer tenant. +## DESCRIPTION +The Get-CIPPPartnerRelationships function retrieves partner relationships for a specified customer tenant by making a REST API call to the "/api/listpartnerrelationships" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which to retrieve partner relationships. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPPartnerRelationships -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPPartnerRelationships -CustomerTenantID "contoso.onmicrosoft.com" +``` + diff --git a/Docs/Get-CIPPPhishPolicies.md b/Docs/Get-CIPPPhishPolicies.md new file mode 100644 index 0000000..d593f5a --- /dev/null +++ b/Docs/Get-CIPPPhishPolicies.md @@ -0,0 +1,16 @@ +# Get-CIPPPhishPolicies +## SYNOPSIS +Retrieves the phishing policies for a specific customer tenant. +## DESCRIPTION +The Get-CIPPPhishPolicies function retrieves the phishing policies for a specific customer tenant by making a REST API call to the "/api/listphishpolicies" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which to retrieve the phishing policies. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPPhishPolicies -CustomerTenantID "contoso.onmicrosoft.com" +``` + diff --git a/Docs/Get-CIPPPublicPhishingCheck.md b/Docs/Get-CIPPPublicPhishingCheck.md new file mode 100644 index 0000000..a006185 --- /dev/null +++ b/Docs/Get-CIPPPublicPhishingCheck.md @@ -0,0 +1,16 @@ +# Get-CIPPPublicPhishingCheck +## SYNOPSIS +Retrieves public phishing check for a specific customer tenant. +## DESCRIPTION +The Get-CIPPPublicPhishingCheck function retrieves the public phishing check for a specific customer tenant. It makes an API call to the "/api/publicphishingcheck" endpoint with the provided tenant ID. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which to retrieve the public phishing check. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPPublicPhishingCheck -CustomerTenantID "12345" +``` + diff --git a/Docs/Get-CIPPRecipients.md b/Docs/Get-CIPPRecipients.md new file mode 100644 index 0000000..df0fc01 --- /dev/null +++ b/Docs/Get-CIPPRecipients.md @@ -0,0 +1,16 @@ +# Get-CIPPRecipients +## SYNOPSIS +Retrieves recipients for a specified customer tenant ID. +## DESCRIPTION +The Get-CIPPRecipients function retrieves recipients for a specified customer tenant ID by making a REST API call to the "/api/listrecipients" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the customer tenant ID for which to retrieve recipients. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPRecipients -CustomerTenantID "contoso.onmicrosoft.com" +``` + diff --git a/Docs/Get-CIPPRoles.md b/Docs/Get-CIPPRoles.md new file mode 100644 index 0000000..79b0618 --- /dev/null +++ b/Docs/Get-CIPPRoles.md @@ -0,0 +1,16 @@ +# Get-CIPPRoles +## SYNOPSIS +Retrieves the roles for a specific customer tenant ID. +## DESCRIPTION +The Get-CIPPRoles function retrieves the roles associated with a specific customer tenant ID by making a REST API call to the "/api/listroles" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The customer tenant ID for which to retrieve the roles. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPRoles -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPSharePointQuota.md b/Docs/Get-CIPPSharePointQuota.md new file mode 100644 index 0000000..9ab2eee --- /dev/null +++ b/Docs/Get-CIPPSharePointQuota.md @@ -0,0 +1,20 @@ +# Get-CIPPSharePointQuota +## SYNOPSIS +Retrieves the SharePoint quota for a specific customer tenant. +## DESCRIPTION +The Get-CIPPSharePointQuota function retrieves the SharePoint quota for a specific customer tenant by making a REST API call to the "/api/listsharepointquota" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which the SharePoint quota needs to be retrieved. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPSharePointQuota -CustomerTenantID "contoso.onmicrosoft.com" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPSharePointQuota -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPSharePointSites.md b/Docs/Get-CIPPSharePointSites.md new file mode 100644 index 0000000..fe204a6 --- /dev/null +++ b/Docs/Get-CIPPSharePointSites.md @@ -0,0 +1,32 @@ +# Get-CIPPSharePointSites +## SYNOPSIS +Retrieves SharePoint sites for a specified customer tenant. +## DESCRIPTION +The Get-CIPPSharePointSites function retrieves SharePoint sites for a specified customer tenant. It uses the Invoke-CIPPRestMethod function to make a REST API call to retrieve the sites. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which to retrieve SharePoint sites. This parameter is mandatory. + + ## **-urlonly** +> ![Foo](https://img.shields.io/badge/Type-SwitchParameter-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-False-Blue?color=5547a8)\ +Specifies whether to retrieve only the URLs of the SharePoint sites. By default, this parameter is not specified. + + ## **-UserUPN** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The user's UPN (User Principal Name) for which to retrieve SharePoint sites. This parameter is optional. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPSharePointSites -CustomerTenantID "contoso.onmicrosoft.com" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPSharePointSites -CustomerTenantID "contoso.onmicrosoft.com" -urlonly +``` + #### EXAMPLE 3 +```powershell +PS > Get-CIPPSharePointSites -CustomerTenantID "contoso.onmicrosoft.com" -UserUPN "user@contoso.com" +``` + diff --git a/Docs/Get-CIPPSignIns.md b/Docs/Get-CIPPSignIns.md new file mode 100644 index 0000000..a807e78 --- /dev/null +++ b/Docs/Get-CIPPSignIns.md @@ -0,0 +1,26 @@ +# Get-CIPPSignIns +## SYNOPSIS +Retrieves sign-in information for a specific customer tenant. +## DESCRIPTION +The Get-CIPPSignIns function retrieves sign-in information for a specific customer tenant. It can filter the results based on various criteria such as failed logons. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer tenant for which to retrieve sign-in information. This parameter is mandatory. + + ## **-failedlogononly** +> ![Foo](https://img.shields.io/badge/Type-SwitchParameter-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-False-Blue?color=5547a8)\ +Indicates whether to retrieve only failed logon sign-ins. This parameter is optional. + + ## **-filter** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies an additional filter to apply to the sign-in results. This parameter is optional. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPSignIns -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -failedlogononly + +This example retrieves all failed logon sign-ins for the customer tenant with the ID "7ced1621-b8f7-4231-868c-bc6b1a2f1778". +``` + diff --git a/Docs/Get-CIPPSpamFilter.md b/Docs/Get-CIPPSpamFilter.md new file mode 100644 index 0000000..77eed38 --- /dev/null +++ b/Docs/Get-CIPPSpamFilter.md @@ -0,0 +1,16 @@ +# Get-CIPPSpamFilter +## SYNOPSIS +Retrieves the spam filter settings for a specified customer tenant ID. +## DESCRIPTION +The Get-CIPPSpamFilter function retrieves the spam filter settings for a specified customer tenant ID using the CIPP API. It sends a request to the "/api/listspamfilter" endpoint with the provided tenant ID as a filter parameter. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The customer tenant ID for which to retrieve the spam filter settings. This parameter is mandatory. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPSpamFilter -CustomerTenantID "contoso.onmicrosoft.com" +``` + diff --git a/Docs/Get-CIPPSpamFilterTemplates.md b/Docs/Get-CIPPSpamFilterTemplates.md new file mode 100644 index 0000000..62d0855 --- /dev/null +++ b/Docs/Get-CIPPSpamFilterTemplates.md @@ -0,0 +1,16 @@ +# Get-CIPPSpamFilterTemplates +## SYNOPSIS +Retrieves spam filter templates from the CIPP API. +## DESCRIPTION +The Get-CIPPSpamFilterTemplates function retrieves spam filter templates from the CIPP API. It makes a REST API call to the "/api/listspamfiltertemplates" endpoint and returns the templates. +# PARAMETERS + +## **-TemplateID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the ID of the template to retrieve. This parameter is optional. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPSpamFilterTemplates -TemplateID "12345" +``` + diff --git a/Docs/Get-CIPPStandards.md b/Docs/Get-CIPPStandards.md new file mode 100644 index 0000000..6ceaf22 --- /dev/null +++ b/Docs/Get-CIPPStandards.md @@ -0,0 +1,20 @@ +# Get-CIPPStandards +## SYNOPSIS +Retrieves the CIPP standards for a specific customer tenant. +## DESCRIPTION +The Get-CIPPStandards function retrieves the CIPP standards for a specific customer tenant by making a REST API call to the "/api/liststandards" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which to retrieve the standards. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPStandards -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPStandards -CustomerTenantID "test.onmicrosoft.com" +``` + diff --git a/Docs/Get-CIPPTeams.md b/Docs/Get-CIPPTeams.md new file mode 100644 index 0000000..799cab9 --- /dev/null +++ b/Docs/Get-CIPPTeams.md @@ -0,0 +1,18 @@ +# Get-CIPPTeams +## SYNOPSIS + +Get-CIPPTeams [-CustomerTenantID] [[-ID] ] [] + +## DESCRIPTION + +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-string-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ + + + ## **-ID** +> ![Foo](https://img.shields.io/badge/Type-string-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ + + + diff --git a/Docs/Get-CIPPTeamsActivity.md b/Docs/Get-CIPPTeamsActivity.md new file mode 100644 index 0000000..e07c563 --- /dev/null +++ b/Docs/Get-CIPPTeamsActivity.md @@ -0,0 +1,16 @@ +# Get-CIPPTeamsActivity +## SYNOPSIS +Retrieves the activity of Teams users in a specified customer tenant. +## DESCRIPTION +The Get-CIPPTeamsActivity function retrieves the activity of Teams users in a specified customer tenant. It makes use of the Invoke-CIPPRestMethod function to send a request to the "/api/listteamsactivity" endpoint with the provided parameters. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which to retrieve the Teams activity. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPTeamsActivity -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPTeamsVoice.md b/Docs/Get-CIPPTeamsVoice.md new file mode 100644 index 0000000..cb09301 --- /dev/null +++ b/Docs/Get-CIPPTeamsVoice.md @@ -0,0 +1,16 @@ +# Get-CIPPTeamsVoice +## SYNOPSIS +Retrieves teams voice information for a specified customer tenant ID. +## DESCRIPTION +The Get-CIPPTeamsVoice function retrieves teams voice information for a specified customer tenant ID. It makes use of the Invoke-CIPPRestMethod function to send a request to the "/api/listteamsvoice" endpoint with the provided tenant filter. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The customer tenant ID for which to retrieve teams voice information. This parameter is mandatory. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPTeamsVoice -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPTenantDetails.md b/Docs/Get-CIPPTenantDetails.md new file mode 100644 index 0000000..816c7b7 --- /dev/null +++ b/Docs/Get-CIPPTenantDetails.md @@ -0,0 +1,20 @@ +# Get-CIPPTenantDetails +## SYNOPSIS +Retrieves the details of a specific CIPP tenant. +## DESCRIPTION +The Get-CIPPTenantDetails function retrieves the details of a specific CIPP (Customer Information Protection Platform) tenant using the provided CustomerTenantID. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The unique identifier of the CIPP tenant. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPTenantDetails -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPTenantDetails -CustomerTenantID "contoso.onmicrosoft.com" +``` + diff --git a/Docs/Get-CIPPTenants.md b/Docs/Get-CIPPTenants.md new file mode 100644 index 0000000..7553b91 --- /dev/null +++ b/Docs/Get-CIPPTenants.md @@ -0,0 +1,24 @@ +# Get-CIPPTenants +## SYNOPSIS +Retrieves a list of CIPP tenants. +## DESCRIPTION +The Get-CIPPTenants function retrieves a list of CIPP tenants based on the specified parameters. It makes a REST API call to the "/api/listtenants" endpoint and returns the result. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the ID of the customer tenant. This parameter is optional. + + ## **-ClearCache** +> ![Foo](https://img.shields.io/badge/Type-SwitchParameter-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-False-Blue?color=5547a8)\ +Indicates whether to clear the cache before retrieving the tenants. This parameter is optional. + + ## **-TriggerRefresh** +> ![Foo](https://img.shields.io/badge/Type-SwitchParameter-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-False-Blue?color=5547a8)\ +Indicates whether to trigger a refresh before retrieving the tenants. This parameter is optional. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPTenants -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -ClearCache +``` + diff --git a/Docs/Get-CIPPTransportRules.md b/Docs/Get-CIPPTransportRules.md new file mode 100644 index 0000000..e72be3e --- /dev/null +++ b/Docs/Get-CIPPTransportRules.md @@ -0,0 +1,16 @@ +# Get-CIPPTransportRules +## SYNOPSIS +Retrieves transport rules for a specified customer tenant ID. +## DESCRIPTION +The Get-CIPPTransportRules function retrieves transport rules for a specified customer tenant ID using the CIPP API. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The unique identifier of the customer tenant for which to retrieve the transport rules. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPTransportRules -CustomerTenantID "contoso.onmicrosoft.com" +``` + diff --git a/Docs/Get-CIPPUniversalSearch.md b/Docs/Get-CIPPUniversalSearch.md new file mode 100644 index 0000000..0ea61b9 --- /dev/null +++ b/Docs/Get-CIPPUniversalSearch.md @@ -0,0 +1,16 @@ +# Get-CIPPUniversalSearch +## SYNOPSIS +Performs a universal search for a specified name. +## DESCRIPTION +The Get-CIPPUniversalSearch function performs a universal search for a specified name by making a REST API call to the /api/execuniversalsearch endpoint. +# PARAMETERS + +## **-Name** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The name to search for. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPUniversalSearch -Name "John Doe" +``` + diff --git a/Docs/Get-CIPPUserCAPolicies.md b/Docs/Get-CIPPUserCAPolicies.md new file mode 100644 index 0000000..72f4c18 --- /dev/null +++ b/Docs/Get-CIPPUserCAPolicies.md @@ -0,0 +1,20 @@ +# Get-CIPPUserCAPolicies +## SYNOPSIS +Retrieves the Conditional Access (CA) policies for a specific user in a customer's tenant. +## DESCRIPTION +The Get-CIPPUserCAPolicies function retrieves the Conditional Access (CA) policies for a specific user in a customer's tenant. It makes use of the Invoke-CIPPRestMethod function to send a request to the API endpoint "/api/listuserconditionalaccesspolicies" and returns the response. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer's tenant. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the user for whom the CA policies are to be retrieved. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPUserCAPolicies -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "user1@dom.com" +``` + diff --git a/Docs/Get-CIPPUserCounts.md b/Docs/Get-CIPPUserCounts.md new file mode 100644 index 0000000..a9f2c2a --- /dev/null +++ b/Docs/Get-CIPPUserCounts.md @@ -0,0 +1,16 @@ +# Get-CIPPUserCounts +## SYNOPSIS +Retrieves user counts for a specific customer tenant ID. +## DESCRIPTION +The Get-CIPPUserCounts function retrieves user counts for a specific customer tenant ID by making a REST API call to the "/api/listusercounts" endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The customer tenant ID for which to retrieve user counts. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPUserCounts -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" +``` + diff --git a/Docs/Get-CIPPUserDevices.md b/Docs/Get-CIPPUserDevices.md new file mode 100644 index 0000000..051098a --- /dev/null +++ b/Docs/Get-CIPPUserDevices.md @@ -0,0 +1,20 @@ +# Get-CIPPUserDevices +## SYNOPSIS +Retrieves the devices associated with a specific user. +## DESCRIPTION +The Get-CIPPUserDevices function retrieves the devices associated with a specific user in the CIPP system. It makes a REST API call to the "/api/listuserdevices" endpoint, passing the customer tenant ID and user ID as parameters. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the user. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPUserDevices -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "user1@domain.com" +``` + diff --git a/Docs/Get-CIPPUserGroups.md b/Docs/Get-CIPPUserGroups.md new file mode 100644 index 0000000..62c83df --- /dev/null +++ b/Docs/Get-CIPPUserGroups.md @@ -0,0 +1,20 @@ +# Get-CIPPUserGroups +## SYNOPSIS +Retrieves the groups that a user belongs to. +## DESCRIPTION +The Get-CIPPUserGroups function retrieves the groups that a user belongs to based on the provided CustomerTenantID and UserID. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the user. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPUserGroups -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "user@domain.com" +``` + diff --git a/Docs/Get-CIPPUserMailboxDetails.md b/Docs/Get-CIPPUserMailboxDetails.md new file mode 100644 index 0000000..07dee6f --- /dev/null +++ b/Docs/Get-CIPPUserMailboxDetails.md @@ -0,0 +1,20 @@ +# Get-CIPPUserMailboxDetails +## SYNOPSIS +Retrieves the mailbox details for a specific user in the CIPP system. +## DESCRIPTION +The Get-CIPPUserMailboxDetails function retrieves the mailbox details for a specific user in the CIPP system. It makes an API call to the "/api/listusermailboxdetails" endpoint, passing the customer tenant ID and user ID as parameters. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which to retrieve the mailbox details. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the user for which to retrieve the mailbox details. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPUserMailboxDetails -CustomerTenantID "contoso.onmicrosoft.com" -UserID "user@domain.com" +``` + diff --git a/Docs/Get-CIPPUserMailboxRules.md b/Docs/Get-CIPPUserMailboxRules.md new file mode 100644 index 0000000..39334c4 --- /dev/null +++ b/Docs/Get-CIPPUserMailboxRules.md @@ -0,0 +1,20 @@ +# Get-CIPPUserMailboxRules +## SYNOPSIS +Retrieves the mailbox rules for a specific user in the CIPP system. +## DESCRIPTION +The Get-CIPPUserMailboxRules function retrieves the mailbox rules for a specific user in the CIPP system. It makes an API call to the "/api/listusermailboxrules" endpoint, passing the customer tenant ID and user ID as parameters. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the user. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPUserMailboxRules -CustomerTenantID "contoso.onmicrosoft.com" -UserID "user@domain.com" +``` + diff --git a/Docs/Get-CIPPUserPhoto.md b/Docs/Get-CIPPUserPhoto.md new file mode 100644 index 0000000..255e4fd --- /dev/null +++ b/Docs/Get-CIPPUserPhoto.md @@ -0,0 +1,22 @@ +# Get-CIPPUserPhoto +## SYNOPSIS +Retrieves the photo of a user from the CIPP API. +## DESCRIPTION +The Get-CIPPUserPhoto function is used to retrieve the photo of a user from the CIPP API. It sends a request to the API endpoint "/api/listuserphoto" with the specified customer tenant ID and user ID. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The customer tenant ID associated with the user. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the user whose photo needs to be retrieved. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPUserPhoto -CustomerTenantID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" -UserID "user@domain.com" + +This example retrieves the photo of the user with the ID "user@domain.com" from the customer tenant with the ID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc". +``` + diff --git a/Docs/Get-CIPPUserSignIns.md b/Docs/Get-CIPPUserSignIns.md new file mode 100644 index 0000000..8886f1d --- /dev/null +++ b/Docs/Get-CIPPUserSignIns.md @@ -0,0 +1,20 @@ +# Get-CIPPUserSignIns +## SYNOPSIS +Retrieves sign-in logs for a specific user in the CIPP system. +## DESCRIPTION +The Get-CIPPUserSignIns function retrieves the sign-in logs for a specific user in the CIPP system. It requires the customer tenant ID and the user ID as mandatory parameters. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The customer tenant ID associated with the user. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-Guid-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The unique identifier of the user. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPUserSignIns -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" +``` + diff --git a/Docs/Get-CIPPUsers.md b/Docs/Get-CIPPUsers.md new file mode 100644 index 0000000..d4b6b56 --- /dev/null +++ b/Docs/Get-CIPPUsers.md @@ -0,0 +1,24 @@ +# Get-CIPPUsers +## SYNOPSIS +Retrieves user information from the CIPP API. +## DESCRIPTION +The Get-CIPPUsers function is used to retrieve user information from the CIPP API. It can retrieve all users for a specific tenant or retrieve details for a specific user. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer tenant for which to retrieve user information. This parameter is mandatory. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the ID of the user for which to retrieve details. This parameter is optional. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPUsers -CustomerTenantID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPUsers -CustomerTenantID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" -UserID "user@domain.com" +``` + diff --git a/Docs/Get-CIPPVersion.md b/Docs/Get-CIPPVersion.md new file mode 100644 index 0000000..2bc3766 --- /dev/null +++ b/Docs/Get-CIPPVersion.md @@ -0,0 +1,12 @@ +# Get-CIPPVersion +## SYNOPSIS +Retrieves the version of the CIPP application. +## DESCRIPTION +The Get-CIPPVersion function retrieves the version of the CIPP application by making a REST API call to the "/api/Getversion" endpoint. +# PARAMETERS + +#### EXAMPLE 1 +```powershell +PS > Get-CIPPVersion +``` + diff --git a/Docs/Get-TokenExpiry.md b/Docs/Get-TokenExpiry.md new file mode 100644 index 0000000..bb8df9f --- /dev/null +++ b/Docs/Get-TokenExpiry.md @@ -0,0 +1,16 @@ +# Get-TokenExpiry +## SYNOPSIS +Calculates the expiry date and time for a token. +## DESCRIPTION +The Get-TokenExpiry function calculates the expiry date and time for a token based on the token's expiration time in seconds. +# PARAMETERS + +## **-ExpiresIn** +> ![Foo](https://img.shields.io/badge/Type-Int64-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-$script:ExpiresIn-Blue?color=5547a8)\ +Specifies the expiration time of the token in seconds. If not provided, the function uses the default expiration time stored in the $script:ExpiresIn variable. + + #### EXAMPLE 1 +```powershell +PS > Get-TokenExpiry -ExpiresIn 3600 +``` + diff --git a/Docs/Invoke-CIPPPreFlightCheck.md b/Docs/Invoke-CIPPPreFlightCheck.md new file mode 100644 index 0000000..6325967 --- /dev/null +++ b/Docs/Invoke-CIPPPreFlightCheck.md @@ -0,0 +1,39 @@ +# Invoke-CIPPPreFlightCheck +## SYNOPSIS +Invokes the pre-flight check before connecting to the CIPP API. +## DESCRIPTION +This function performs a pre-flight check before connecting to the CIPP API. It checks if the required CIPP API information is available and if the token has expired. If the information is not found or the token has expired, it connects to the CIPP API using the provided credentials. +# PARAMETERS + +#### EXAMPLE 1 +```powershell +P +> + +I +n +v +o +k +e +- +C +I +P +P +P +r +e +F +l +i +g +h +t +C +h +e +c +k +``` + diff --git a/Docs/Invoke-CIPPRestMethod.md b/Docs/Invoke-CIPPRestMethod.md new file mode 100644 index 0000000..16980b6 --- /dev/null +++ b/Docs/Invoke-CIPPRestMethod.md @@ -0,0 +1,44 @@ +# Invoke-CIPPRestMethod +## SYNOPSIS +Invokes a REST method using the CIPP API. +## DESCRIPTION +The Invoke-CIPPRestMethod function is used to send HTTP requests to the CIPP API. It supports various HTTP methods such as GET, POST, PUT, DELETE, etc. The function assembles the request parameters, including the endpoint, query parameters, request body, headers, and authorization token. It then sends the request using the Invoke-RestMethod cmdlet and returns the response. +# PARAMETERS + +## **-Endpoint** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The endpoint of the API to send the request to. + + ## **-Params** +> ![Foo](https://img.shields.io/badge/Type-Hashtable-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-@{}-Blue?color=5547a8)\ +Optional. A hashtable of query parameters to include in the request URL. + + ## **-Method** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-GET-Blue?color=5547a8)\ +Optional. The HTTP method to use for the request. The default value is 'GET'. + + ## **-Body** +> ![Foo](https://img.shields.io/badge/Type-Hashtable-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-@{}-Blue?color=5547a8)\ +Optional. A hashtable representing the request body. It will be converted to JSON before sending the request. + + ## **-ContentType** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-application/json-Blue?color=5547a8)\ +Optional. The content type of the request body. The default value is 'application/json'. + + ## **-Authorization** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Optional. The authorization token to include in the request headers. + + #### EXAMPLE 1 +```powershell +PS > Invoke-CIPPRestMethod -Endpoint '/api/Listusers' -Method 'GET' -Params @{ 'tenantfilter' = '11c11ab1-527a-1d29-l92e-76413h012s76' } +``` + #### EXAMPLE 2 +```powershell +PS > Invoke-CIPPRestMethod -Endpoint '/api/ListMailboxPermissions' -Params @{ 'tenantfilter' = 'M365x72601982.onmicrosoft.com', 'userid' = '11c11ab1-527a-1d29-l92e-76413h012s76'} +``` + #### EXAMPLE 3 +```powershell +PS > Invoke-CIPPRestMethod -Endpoint '/api/adduser' -method 'POST' -Body @{ 'tenantID' = '11c11ab1-527a-1d29-l92e-76413h012s76';'DisplayName' = 'Test User';'UserName' = 'testuser';'AutoPassword' = $true;'FirstName' = 'Test';'LastName' = 'User';'Domain' = 'M365x72601982.onmicrosoft.com';'CopyFrom' = "" } +``` + diff --git a/Docs/Remove-CIPPGDAPRelationship.md b/Docs/Remove-CIPPGDAPRelationship.md new file mode 100644 index 0000000..f579323 --- /dev/null +++ b/Docs/Remove-CIPPGDAPRelationship.md @@ -0,0 +1,16 @@ +# Remove-CIPPGDAPRelationship +## SYNOPSIS +Removes a GDAP (Global Data Access Point) relationship. +## DESCRIPTION +The Remove-CIPPGDAPRelationship function terminates a GDAP relationship by invoking a REST API endpoint. +# PARAMETERS + +## **-GDAPID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the GDAP relationship to be terminated. + + #### EXAMPLE 1 +```powershell +PS > Remove-CIPPGDAPRelationship -GDAPID "59a6b837-2c8d-4f91-93e1-746cd82b1e37-a9d8b5e2-73cf-41a5-8de7-134f62b0c6e9" +``` + diff --git a/Docs/Remove-CIPPGroup.md b/Docs/Remove-CIPPGroup.md new file mode 100644 index 0000000..07f86b8 --- /dev/null +++ b/Docs/Remove-CIPPGroup.md @@ -0,0 +1,28 @@ +# Remove-CIPPGroup +## SYNOPSIS +Removes a CIPP group. +## DESCRIPTION +The Remove-CIPPGroup function is used to remove a CIPP group from the specified customer tenant. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant. + + ## **-GroupID** +> ![Foo](https://img.shields.io/badge/Type-Guid-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the group to be removed. + + ## **-Grouptype** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The type of the group. + + ## **-DisplayName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The display name of the group. + + #### EXAMPLE 1 +```powershell +PS > Remove-CIPPGroup -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -GroupID "98765432-1234-5678-9012-34567890ABCD" -Grouptype "Security" -DisplayName "Admins" +``` + diff --git a/Docs/Send-CIPPPush.md b/Docs/Send-CIPPPush.md new file mode 100644 index 0000000..3842e22 --- /dev/null +++ b/Docs/Send-CIPPPush.md @@ -0,0 +1,20 @@ +# Send-CIPPPush +## SYNOPSIS +Sends a push notification to a user. +## DESCRIPTION +The Send-CIPPPush function sends a push notification to a user specified by their email address. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer's tenant. + + ## **-UserEmail** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The email address of the user to send the push notification to. + + #### EXAMPLE 1 +```powershell +PS > Send-CIPPPush -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserEmail "user@example.com" +``` + diff --git a/Docs/Set-CIPPAPIDetails.md b/Docs/Set-CIPPAPIDetails.md new file mode 100644 index 0000000..3e87396 --- /dev/null +++ b/Docs/Set-CIPPAPIDetails.md @@ -0,0 +1,30 @@ +# Set-CIPPAPIDetails +## SYNOPSIS +Sets the CIPP API details. +## DESCRIPTION +The Set-CIPPAPIDetails function is used to set the CIPP API details, including the client ID, client secret, API URL, and tenant ID. +# PARAMETERS + +## **-CIPPClientID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the client ID for the CIPP API. + + ## **-CIPPClientSecret** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the client secret for the CIPP API. + + ## **-CIPPAPIUrl** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the URL for the CIPP API. + + ## **-TenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the tenant ID for the CIPP API. + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPAPIDetails -CIPPClientID "d8d41058-97df-4b80-8e1b-7083d756409f" -CIPPClientSecret "YourSecurePassword" -CIPPAPIUrl "https://api.cipp.com" -TenantID "7c2f78c0-554e-4f42-a663-c4df3ce7f51f" + +This example sets the CIPP API details with the specified values. +``` + diff --git a/Docs/Set-CIPPCAPolicy.md b/Docs/Set-CIPPCAPolicy.md new file mode 100644 index 0000000..ead3132 --- /dev/null +++ b/Docs/Set-CIPPCAPolicy.md @@ -0,0 +1,28 @@ +# Set-CIPPCAPolicy +## SYNOPSIS +Sets the Conditional Access (CA) Policy for a specific customer tenant. +## DESCRIPTION +The Set-CIPPCAPolicy function is used to set the Conditional Access (CA) Policy for a specific customer tenant. It allows you to enable or disable the CA Policy for the tenant. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer tenant for which the CA Policy needs to be set. + + ## **-State** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the state of the CA Policy. Valid values are "Enabled" and "Disabled". + + ## **-Guid** +> ![Foo](https://img.shields.io/badge/Type-Guid-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the GUID of the CA Policy. + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPCAPolicy -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -State "Enabled" -Guid "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6" +``` + #### EXAMPLE 2 +```powershell +PS > Set-CIPPCAPolicy -CustomerTenantID "contoso.onmicrosoft.com" -State "Enabled" -Guid "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6" +``` + diff --git a/Docs/Set-CIPPCalendarPermissions.md b/Docs/Set-CIPPCalendarPermissions.md new file mode 100644 index 0000000..c1d7c66 --- /dev/null +++ b/Docs/Set-CIPPCalendarPermissions.md @@ -0,0 +1,38 @@ +# Set-CIPPCalendarPermissions +## SYNOPSIS +Sets calendar permissions for a user in a customer's tenant. +## DESCRIPTION +The Set-CIPPCalendarPermissions function is used to edit calendar permissions for a specified user in a customer's tenant. It allows you to set different levels of permissions for the user on the calendar folder. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer's tenant. + + ## **-Permissions** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the level of permissions to be set for the user on the calendar folder. Valid values are: - Author - Contributor - Editor - Owner - Non Editing Author - Publishing Author - Publishing Editor - Reviewer - LimitedDetails - AvailabilityOnly + + ## **-Userid** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the user for whom the calendar permissions are being set. + + ## **-RemoveAccess** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies whether to remove the user's access to the calendar folder. This parameter is optional. + + ## **-usertogetpermissions** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the ID of the user for whom you are giving permission to. This parameter is optional. + + ## **-FolderName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-Calendar-Blue?color=5547a8)\ +Specifies the name of the calendar folder. The default value is "Calendar". + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPCalendarPermissions -CustomerTenantID "contoso.onmicrosoft.com" -Permissions "Editor" -Userid "user@example.com" + +This example sets the calendar permissions for the user with the ID "user@example.com" in the customer's tenant with the ID "contoso.onmicrosoft.com" to "Editor" level. +``` + diff --git a/Docs/Set-CIPPClrImmID.md b/Docs/Set-CIPPClrImmID.md new file mode 100644 index 0000000..09f6fdf --- /dev/null +++ b/Docs/Set-CIPPClrImmID.md @@ -0,0 +1,22 @@ +# Set-CIPPClrImmID +## SYNOPSIS +Clears the Immutable ID for a user. +## DESCRIPTION +The Set-CIPPClrImmID function clears the Immutable ID for a user by invoking a REST API endpoint. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-Guid-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the user. + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPClrImmID -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" + +This example clears the Immutable ID for the user with the specified CustomerTenantID and UserID. +``` + diff --git a/Docs/Set-CIPPConvertMailbox.md b/Docs/Set-CIPPConvertMailbox.md new file mode 100644 index 0000000..80ac8ae --- /dev/null +++ b/Docs/Set-CIPPConvertMailbox.md @@ -0,0 +1,28 @@ +# Set-CIPPConvertMailbox +## SYNOPSIS +Converts a mailbox to a shared mailbox or user mailbox in the CIPP system. +## DESCRIPTION +The Set-CIPPConvertMailbox function is used to convert a mailbox in the CIPP system to either a shared mailbox or a user mailbox. It sends a request to the CIPP API to perform the conversion. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant where the mailbox belongs. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the user whose mailbox needs to be converted. + + ## **-ConvertToUserMailbox** +> ![Foo](https://img.shields.io/badge/Type-SwitchParameter-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-False-Blue?color=5547a8)\ +Specifies whether the mailbox should be converted to a user mailbox. If this switch is provided, the mailbox will be converted to a user mailbox. If not provided, the mailbox will be converted to a shared mailbox. + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPConvertMailbox -CustomerTenantID "contoso.onmicrosoft.com" -UserID "user@domain.com" -ConvertToUserMailbox +``` + #### EXAMPLE 2 +```powershell +PS > Set-CIPPConvertMailbox -CustomerTenantID "contoso.onmicrosoft.com" -UserID "user@domain.com" +``` + diff --git a/Docs/Set-CIPPCopyToSent.md b/Docs/Set-CIPPCopyToSent.md new file mode 100644 index 0000000..d0b6072 --- /dev/null +++ b/Docs/Set-CIPPCopyToSent.md @@ -0,0 +1,26 @@ +# Set-CIPPCopyToSent +## SYNOPSIS +Sets the option to copy sent items to a shared mailbox for a specific user. +## DESCRIPTION +The Set-CIPPCopyToSent function sets the option to copy sent items to a shared mailbox for a specific user in the CIPP system. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer's tenant. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the user. + + ## **-MessageCopyForSentAsEnabled** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-true-Blue?color=5547a8)\ +Specifies whether to enable or disable the option to copy sent items for the user. Valid values are "true" or "false". The default value is "true". + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPCopyToSent -CustomerTenantID "contoso.onmicrosoft.com" -UserID "john.doe@domain.com" -MessageCopyForSentAsEnabled "true" + +This example sets the option to copy sent items to a shared mailbox for the user "john.doe@domain.com" in the customer's tenant with ID "contoso.onmicrosoft.com". +``` + diff --git a/Docs/Set-CIPPCreateTap.md b/Docs/Set-CIPPCreateTap.md new file mode 100644 index 0000000..16d7c4f --- /dev/null +++ b/Docs/Set-CIPPCreateTap.md @@ -0,0 +1,20 @@ +# Set-CIPPCreateTap +## SYNOPSIS +Creates a TAP (Temporary Access Passcode) for a user. +## DESCRIPTION +The Set-CIPPCreateTap function is used to create a TAP (Temporary Access Passcode) for a user in the CIPP system. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer tenant for which the TAP is being created. This parameter is mandatory. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the user for whom the TAP is being created. This parameter is mandatory. + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPCreateTap -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "user@domain.com" +``` + diff --git a/Docs/Set-CIPPEnableArchive.md b/Docs/Set-CIPPEnableArchive.md new file mode 100644 index 0000000..eed6d21 --- /dev/null +++ b/Docs/Set-CIPPEnableArchive.md @@ -0,0 +1,20 @@ +# Set-CIPPEnableArchive +## SYNOPSIS +Enables email archiving for a specified user in the CIPP system. +## DESCRIPTION +The Set-CIPPEnableArchive function enables email archiving for a specified user in the CIPP system. It sends a request to the CIPP API to enable email archiving for the user identified by the provided CustomerTenantID and UserID. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The unique identifier of the customer tenant. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The unique identifier of the user. + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPEnableArchive -CustomerTenantID "contoso.onmicrosoft.com" -UserID "user@domain.com" +``` + diff --git a/Docs/Set-CIPPExchConnector.md b/Docs/Set-CIPPExchConnector.md new file mode 100644 index 0000000..2ec74b4 --- /dev/null +++ b/Docs/Set-CIPPExchConnector.md @@ -0,0 +1,30 @@ +# Set-CIPPExchConnector +## SYNOPSIS +Sets the state and type of an Exchange Connector for a specific customer tenant. +## DESCRIPTION +The Set-CIPPExchConnector function is used to edit the state and type of an Exchange Connector for a specific customer tenant. It sends a REST API request to update the connector settings. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which the Exchange Connector needs to be edited. + + ## **-State** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The state of the Exchange Connector. Valid values are "Enable" and "Disabled". + + ## **-Guid** +> ![Foo](https://img.shields.io/badge/Type-Guid-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The GUID of the Exchange Connector. + + ## **-Type** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The type of the Exchange Connector. + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPExchConnector -CustomerTenantID "contoso.onmicrosoft.com" -State "Enable" -Guid "abcdefg" -Type "Inbound" + +This example sets the state of the Exchange Connector for the customer tenant with ID "contoso.onmicrosoft.com" to "Enable", using the GUID "abcdefg" and the type "Inbound". +``` + diff --git a/Docs/Set-CIPPExecCPVPerms.md b/Docs/Set-CIPPExecCPVPerms.md new file mode 100644 index 0000000..f50550e --- /dev/null +++ b/Docs/Set-CIPPExecCPVPerms.md @@ -0,0 +1,24 @@ +# Set-CIPPExecCPVPerms +## SYNOPSIS +Sets the CPV (Customer Provided Values) permissions for a specific customer tenant. +## DESCRIPTION +The Set-CIPPExecCPVPerms function is used to refresh the CPV permissions for a specified customer tenant. It calls the Invoke-CIPPRestMethod function internally to make the REST API call. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-Guid-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer tenant for which the CPV permissions need to be refreshed. This parameter is mandatory. + + ## **-resetsp** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-false-Blue?color=5547a8)\ +Specifies whether to reset the Stored Procedure (SP) associated with the CPV permissions. The valid values are "true" and "false". This parameter is optional and defaults to "false". + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPExecCPVPerms -CustomerTenantID "12345678-1234-1234-1234-1234567890AB" -resetsp "true" +``` + #### EXAMPLE 2 +```powershell +PS > Set-CIPPExecCPVPerms -CustomerTenantID "87654321-4321-4321-4321-0987654321BA" +``` + diff --git a/Docs/Set-CIPPGroupDeliveryManagement.md b/Docs/Set-CIPPGroupDeliveryManagement.md new file mode 100644 index 0000000..d2588a0 --- /dev/null +++ b/Docs/Set-CIPPGroupDeliveryManagement.md @@ -0,0 +1,28 @@ +# Set-CIPPGroupDeliveryManagement +## SYNOPSIS +Sets the delivery management settings for a group. +## DESCRIPTION +The Set-CIPPGroupDeliveryManagement function is used to set the delivery management settings for a group in the CIPP project. It allows you to specify the customer tenant ID, group ID, group type, and whether to only allow internal delivery. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant. + + ## **-GroupID** +> ![Foo](https://img.shields.io/badge/Type-Guid-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the group. + + ## **-Grouptype** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The type of the group. Valid values are 'Distribution List', 'Mail-Enabled Security', and 'Microsoft 365'. + + ## **-onlyallowinternal** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies whether to only allow internal delivery. Valid values are 'true' and 'false'. + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPGroupDeliveryManagement -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -GroupID "67890" -GroupType "Distribution List" -OnlyAllowInternal "true" +``` + diff --git a/Docs/Set-CIPPGroupHideFromGAL.md b/Docs/Set-CIPPGroupHideFromGAL.md new file mode 100644 index 0000000..1731170 --- /dev/null +++ b/Docs/Set-CIPPGroupHideFromGAL.md @@ -0,0 +1,32 @@ +# Set-CIPPGroupHideFromGAL +## SYNOPSIS +Sets the "hide from GAL" property for a specified group. +## DESCRIPTION +The Set-CIPPGroupHideFromGAL function is used to set the "hide from GAL" property for a specified group in the CIPP (Cloud Identity and Privacy Protection) system. This function requires the customer tenant ID, group ID, group type, and the hide from GAL value as input parameters. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer tenant. This parameter is mandatory. + + ## **-GroupID** +> ![Foo](https://img.shields.io/badge/Type-Guid-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the group. This parameter is mandatory. + + ## **-Grouptype** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the type of the group. Valid values are 'Distribution List', 'Mail-Enabled Security', 'Microsoft 365', and 'Security'. This parameter is mandatory. + + ## **-hidefromgal** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies whether the group should be hidden from the Global Address List (GAL). Valid values are 'true' and 'false'. This parameter is mandatory. + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPGroupHideFromGAL -CustomerTenantID "12345678-1234-1234-1234-1234567890AB" -GroupID "98765432-4321-4321-4321-0987654321BA" -GroupType "Distribution List" -HideFromGAL "true" +``` + #### EXAMPLE 2 +```powershell +PS > Set-CIPPGroupHideFromGAL -CustomerTenantID "12345678-1234-1234-1234-1234567890AB" -GroupID "98765432-4321-4321-4321-0987654321BA" -GroupType "Security" -HideFromGAL "false" +``` + diff --git a/Docs/Set-CIPPHideFromGAL.md b/Docs/Set-CIPPHideFromGAL.md new file mode 100644 index 0000000..4867cce --- /dev/null +++ b/Docs/Set-CIPPHideFromGAL.md @@ -0,0 +1,28 @@ +# Set-CIPPHideFromGAL +## SYNOPSIS +Sets the "hide from Global Address List (GAL)" property for a user in a customer's tenant. +## DESCRIPTION +The Set-CIPPHideFromGAL function is used to set the "hide from GAL" property for a specified user in a customer's tenant. This property determines whether the user's email address is visible in the Global Address List (GAL) or not. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer's tenant. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the user for whom the "hide from GAL" property needs to be set. + + ## **-hidefromgal** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies whether the user's email address should be hidden from the GAL or not. Valid values are 'true' and 'false'. + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPHideFromGAL -CustomerTenantID "contoso.onmicrosoft.com" -UserID "user1@example.com" -hidefromgal "true" +``` + #### EXAMPLE 2 +```powershell +PS > Set-CIPPHideFromGAL -CustomerTenantID "contoso.onmicrosoft.com" -UserID "user2@example.com" -hidefromgal "false" +``` + diff --git a/Docs/Set-CIPPMEMPolicy.md b/Docs/Set-CIPPMEMPolicy.md new file mode 100644 index 0000000..d977363 --- /dev/null +++ b/Docs/Set-CIPPMEMPolicy.md @@ -0,0 +1,34 @@ +# Set-CIPPMEMPolicy +## SYNOPSIS +Sets the CIPP MEM policy for a customer. +## DESCRIPTION +The Set-CIPPMEMPolicy function is used to set the CIPP (Customer Identity and Protection Platform) MEM (Mobile Endpoint Management) policy for a customer. It allows you to specify the customer tenant ID, policy ID, display name, description, and assignment type. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The unique identifier of the customer tenant. + + ## **-ID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The unique identifier of the policy. + + ## **-DisplayName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The display name of the policy. + + ## **-Description** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The description of the policy. + + ## **-AssignTo** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The assignment type for the policy. Valid values are "allLicensedUsers", "AllDevices", and "AllDevicesAndUsers". + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPMEMPolicy -CustomerTenantID "12345678-1234-1234-1234-1234567890ab" -ID "Policy001" -DisplayName "Policy 1" -Description "This is policy 1" -AssignTo "AllDevices" + +This example sets the CIPP MEM policy for a customer with the specified parameters. +``` + diff --git a/Docs/Set-CIPPMailboxMobileDevices.md b/Docs/Set-CIPPMailboxMobileDevices.md new file mode 100644 index 0000000..ceadde1 --- /dev/null +++ b/Docs/Set-CIPPMailboxMobileDevices.md @@ -0,0 +1,45 @@ +# Set-CIPPMailboxMobileDevices +## SYNOPSIS +Edits the mobile device settings for a specified user in a customer's tenant. +## DESCRIPTION +The Set-CIPPMailboxMobileDevices function allows you to edit the mobile device settings for a specified user in a customer's tenant. +You can set the device ID, user ID, quarantine status, delete status, and device GUID. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer's tenant. + + ## **-DeviceID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the ID of the mobile device. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the user. + + ## **-Quarantine** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies whether the mobile device should be quarantined. Valid values are "true" or "False". + + ## **-Delete** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-False-Blue?color=5547a8)\ +Specifies whether the mobile device should be deleted. Valid values are "true" or "False". The default value is "False". + + ## **-DeviceGUID** +> ![Foo](https://img.shields.io/badge/Type-Guid-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies the GUID of the mobile device. + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPMailboxMobileDevices -CustomerTenantID "contoso.onmicrosoft.com" -DeviceID "ABCD1234" -UserID "user1@domain.com" -Quarantine "true" + +This example sets the mobile device with the ID "ABCD1234" for the user "user1@domain.com" in the customer's tenant with the ID "contoso.onmicrosoft.com" to be quarantined. +``` + #### EXAMPLE 2 +```powershell +PS > Set-CIPPMailboxMobileDevices -CustomerTenantID "contoso.onmicrosoft.com" -UserID "user1@domain.com" -Delete "true" -DeviceGUID "EFGH5678" + +This example deletes the mobile device with the GUID "EFGH5678" for the user "user1@domain.com" in the customer's tenant with the ID "contoso.onmicrosoft.com". +``` + diff --git a/Docs/Set-CIPPMailboxPermissions.md b/Docs/Set-CIPPMailboxPermissions.md new file mode 100644 index 0000000..987ba6c --- /dev/null +++ b/Docs/Set-CIPPMailboxPermissions.md @@ -0,0 +1,50 @@ +# Set-CIPPMailboxPermissions +## SYNOPSIS +Sets mailbox permissions for a user in the CIPP system. +## DESCRIPTION +The Set-CIPPMailboxPermissions function is used to edit mailbox permissions for a specified user in the CIPP system. It allows you to add or remove full access, send as, and send on behalf permissions for the user's mailbox. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer's tenant in the CIPP system. + + ## **-Userid** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the user whose mailbox permissions need to be edited. + + ## **-RemoveFullAccess** +> ![Foo](https://img.shields.io/badge/Type-Array-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-@()-Blue?color=5547a8)\ +An optional array of mailboxes from which to remove full access permissions for the user. + + ## **-AddFullAccessAutoMap** +> ![Foo](https://img.shields.io/badge/Type-Array-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-@()-Blue?color=5547a8)\ +An optional array of mailboxes to which to add full access permissions with automapping enabled for the user. + + ## **-AddFullAccessNoAutoMap** +> ![Foo](https://img.shields.io/badge/Type-Array-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-@()-Blue?color=5547a8)\ +An optional array of mailboxes to which to add full access permissions with automapping disabled for the user. + + ## **-AddSendAs** +> ![Foo](https://img.shields.io/badge/Type-Array-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-@()-Blue?color=5547a8)\ +An optional array of mailboxes to which to add send as permissions for the user. + + ## **-RemoveSendAs** +> ![Foo](https://img.shields.io/badge/Type-Array-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-@()-Blue?color=5547a8)\ +An optional array of mailboxes from which to remove send as permissions for the user. + + ## **-AddSendOnBehalf** +> ![Foo](https://img.shields.io/badge/Type-Array-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-@()-Blue?color=5547a8)\ +An optional array of mailboxes to which to add send on behalf permissions for the user. + + ## **-RemoveSendOnBehalf** +> ![Foo](https://img.shields.io/badge/Type-Array-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-@()-Blue?color=5547a8)\ +An optional array of mailboxes from which to remove send on behalf permissions for the user. + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPMailboxPermissions -CustomerTenantID "contoso.onmicrosoft.com" -Userid "john.doe@example.com" -AddFullAccessAutoMap "mailbox1@example.com", "mailbox2@example.com" -AddSendAs "mailbox3@example.com" + +This example sets mailbox permissions for the user "john.doe@example.com" in the CIPP system. It adds full access permissions with automapping enabled to "mailbox1@example.com" and "mailbox2@example.com", and adds send as permissions to "mailbox3@example.com". +``` + diff --git a/Docs/Set-CIPPQuarantineManagement.md b/Docs/Set-CIPPQuarantineManagement.md new file mode 100644 index 0000000..b5c4607 --- /dev/null +++ b/Docs/Set-CIPPQuarantineManagement.md @@ -0,0 +1,30 @@ +# Set-CIPPQuarantineManagement +## SYNOPSIS +Manages quarantine for a specific customer tenant ID. +## DESCRIPTION +The Set-CIPPQuarantineManagement function is used to manage quarantine for a specific customer tenant ID. It allows you to set various parameters such as the ID, AllowSender, and Type. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the customer tenant ID for which the quarantine management is performed. This parameter is mandatory. + + ## **-ID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the quarantine management. This parameter is mandatory. + + ## **-AllowSender** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Specifies whether to allow the sender. Valid values are 'true' or 'false'. This parameter is optional. + + ## **-Type** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the type of quarantine management. Valid values are 'Deny' or 'Release'. This parameter is mandatory. + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPQuarantineManagement -CustomerTenantID "contoso.onmicrosoft.com" -ID "67890" -AllowSender "true" -Type "Deny" + +This example sets the quarantine management for the customer tenant ID "contoso.onmicrosoft.com" with the ID "67890". It allows the sender and sets the type to "Deny". +``` + diff --git a/Docs/Set-CIPPResetPassword.md b/Docs/Set-CIPPResetPassword.md new file mode 100644 index 0000000..888469c --- /dev/null +++ b/Docs/Set-CIPPResetPassword.md @@ -0,0 +1,24 @@ +# Set-CIPPResetPassword +## SYNOPSIS +Resets the password for a user in the CIPP system. +## DESCRIPTION +The Set-CIPPResetPassword function is used to reset the password for a user in the CIPP system. It sends a request to the CIPP API to reset the password for the specified user. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant in the CIPP system. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the user whose password needs to be reset. + + ## **-MustChange** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-true-Blue?color=5547a8)\ +Specifies whether the user must change their password upon next login. The default value is "true". + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPResetPassword -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "user@domain.com" -MustChange "false" +``` + diff --git a/Docs/Set-CIPPRestoreDeletedUser.md b/Docs/Set-CIPPRestoreDeletedUser.md new file mode 100644 index 0000000..46eae4e --- /dev/null +++ b/Docs/Set-CIPPRestoreDeletedUser.md @@ -0,0 +1,20 @@ +# Set-CIPPRestoreDeletedUser +## SYNOPSIS +Restores a deleted user in the CIPP system. +## DESCRIPTION +The Set-CIPPRestoreDeletedUser function restores a deleted user in the CIPP (Customer Identity and Privacy Platform) system. It sends a request to the CIPP API to restore the user with the specified ID. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant in which the user is being restored. + + ## **-ID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the user to be restored. + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPRestoreDeletedUser -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -ID "32a411a8-65ad-4358-ac14-5027d9abea9a" +``` + diff --git a/Docs/Set-CIPPRevokeSessions.md b/Docs/Set-CIPPRevokeSessions.md new file mode 100644 index 0000000..0c1d792 --- /dev/null +++ b/Docs/Set-CIPPRevokeSessions.md @@ -0,0 +1,20 @@ +# Set-CIPPRevokeSessions +## SYNOPSIS +Revokes sessions for a specified user in the CIPP system. +## DESCRIPTION +The Set-CIPPRevokeSessions function revokes sessions for a specified user in the CIPP system. It sends a request to the CIPP API to revoke all active sessions for the specified user. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which the sessions need to be revoked. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the user for whom the sessions need to be revoked. + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPRevokeSessions -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" +``` + diff --git a/Docs/Set-CIPPSignInStatus.md b/Docs/Set-CIPPSignInStatus.md new file mode 100644 index 0000000..bdb71e6 --- /dev/null +++ b/Docs/Set-CIPPSignInStatus.md @@ -0,0 +1,30 @@ +# Set-CIPPSignInStatus +## SYNOPSIS +Sets the sign-in status for a user in the CIPP system. +## DESCRIPTION +The Set-CIPPSignInStatus function is used to enable or disable the sign-in status for a user in the CIPP system. +When the $Enable parameter is set to "true", the function enables sign-in for the specified user. +When the $Enable parameter is set to "false", the function disables sign-in for the specified user. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the customer tenant. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies the ID of the user. + + ## **-Enable** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +Specifies whether to enable or disable sign-in for the user. Valid values are "true" (to enable sign-in) or "false" (to disable sign-in). + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPSignInStatus -CustomerTenantID "47b02ab5-376d-4c85-b82d-13996c023c93" -UserID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" -Enable "true" +``` + #### EXAMPLE 2 +```powershell +PS > Set-CIPPSignInStatus -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" -Enable "false" +``` + diff --git a/Docs/Set-CIPPSpamFilter.md b/Docs/Set-CIPPSpamFilter.md new file mode 100644 index 0000000..ffe2792 --- /dev/null +++ b/Docs/Set-CIPPSpamFilter.md @@ -0,0 +1,32 @@ +# Set-CIPPSpamFilter +## SYNOPSIS +Sets the state of a spam filter for a customer's tenant. +## DESCRIPTION +The Set-CIPPSpamFilter function is used to edit the state of a spam filter for a customer's tenant. It takes the customer's tenant ID, a unique identifier (optional), the name of the spam filter, and the desired state (Enable or Disable) as parameters. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer's tenant. + + ## **-Guid** +> ![Foo](https://img.shields.io/badge/Type-Guid-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +A unique identifier for the spam filter. This parameter is optional. + + ## **-Name** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The name of the spam filter. + + ## **-State** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The desired state of the spam filter. Valid values are "Enable" or "Disable". + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPSpamFilter -CustomerTenantID "contoso.onmicrosoft.com" -Name "SpamFilter1" -State "Enable" +``` + #### EXAMPLE 2 +```powershell +PS > Set-CIPPSpamFilter -CustomerTenantID "contoso.onmicrosoft.com" -Guid "abcdefg" -Name "SpamFilter2" -State "Disable" +``` + diff --git a/Docs/Set-CIPPTransportRule.md b/Docs/Set-CIPPTransportRule.md new file mode 100644 index 0000000..fb957c0 --- /dev/null +++ b/Docs/Set-CIPPTransportRule.md @@ -0,0 +1,28 @@ +# Set-CIPPTransportRule +## SYNOPSIS +Sets the state of a transport rule for a specific customer tenant. +## DESCRIPTION +The Set-CIPPTransportRule function is used to set the state of a transport rule for a specific customer tenant in the CIPP API. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which the transport rule needs to be edited. + + ## **-State** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The state to set for the transport rule. Valid values are "Enable" and "Disable". + + ## **-Guid** +> ![Foo](https://img.shields.io/badge/Type-Guid-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The GUID of the transport rule to be edited. + + #### EXAMPLE 1 +```powershell +PS > Set-CIPPTransportRule -CustomerTenantID "contoso.onmicrosoft.com" -State "Enable" -Guid "abcdefg" +``` + #### EXAMPLE 2 +```powershell +PS > Set-CIPPTransportRule -CustomerTenantID "contoso.onmicrosoft.com" -State "Disable" -Guid "hijklmn" +``` + diff --git a/Docs/Set-CIPPUser.md b/Docs/Set-CIPPUser.md new file mode 100644 index 0000000..9c3761f --- /dev/null +++ b/Docs/Set-CIPPUser.md @@ -0,0 +1,589 @@ +# Set-CIPPUser +## SYNOPSIS +Sets the properties of a CIPP user. +## DESCRIPTION +The Set-CIPPUser function is used to set the properties of a CIPP user. It allows you to modify various user attributes such as display name, username, first name, last name, domain, aliases, usage location, department, city, country, job title, mobile phone, street address, postal code, company name, and more. You can also add or remove the user from groups. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant to which the user belongs. This parameter is mandatory. + + ## **-UserID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the user to be modified. This parameter is mandatory. + + ## **-DisplayName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The display name of the user. + + ## **-UserName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The username of the user. + + ## **-FirstName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The first name of the user. + + ## **-LastName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The last name of the user. + + ## **-Domain** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The domain of the user. + + ## **-AddedAliases** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +Additional aliases for the user. + + ## **-CopyFrom** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The ID of another user from which to copy the properties. + + ## **-UsageLocation** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The usage location of the user. + + ## **-Department** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The department of the user. + + ## **-City** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The city of the user. + + ## **-Country** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The country of the user. + + ## **-Jobtitle** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The job title of the user. + + ## **-MobilePhone** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The mobile phone number of the user. + + ## **-StreetAddress** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The street address of the user. + + ## **-PostalCode** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The postal code of the user. + + ## **-CompanyName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The company name of the user. + + ## **-MustChangePass** +> ![Foo](https://img.shields.io/badge/Type-Boolean-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-False-Blue?color=5547a8)\ +Specifies whether the user must change their password. Default value is $false. + + ## **-AddToGroups** +> ![Foo](https://img.shields.io/badge/Type-Array-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-@()-Blue?color=5547a8)\ +An array of group IDs to which the user should be added. + + ## **-RemoveFromGroups** +> ![Foo](https://img.shields.io/badge/Type-Array-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-@()-Blue?color=5547a8)\ +An array of group IDs from which the user should be removed. + + ## **-BusinessPhone** +> ![Foo](https://img.shields.io/badge/Type-Array-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-@()-Blue?color=5547a8)\ +An array of business phone numbers for the user. + + #### EXAMPLE 1 +```powershell +P +> + +S +e +t +- +C +I +P +P +U +s +e +r + +- +C +u +s +t +o +m +e +r +T +e +n +a +n +t +I +D + +" +7 +c +e +d +1 +6 +2 +1 +- +b +8 +f +7 +- +4 +2 +3 +1 +- +8 +6 +8 +c +- +b +c +6 +b +1 +a +2 +f +1 +7 +7 +8 +" + +- +U +s +e +r +I +D + +" +u +s +e +r +1 +" + +- +D +i +s +p +l +a +y +N +a +m +e + +" +J +o +h +n + +D +o +e +" + +- +U +s +e +r +N +a +m +e + +" +j +o +h +n +d +o +e +" + +- +F +i +r +s +t +N +a +m +e + +" +J +o +h +n +" + +- +L +a +s +t +N +a +m +e + +" +D +o +e +" + +- +D +o +m +a +i +n + +" +e +x +a +m +p +l +e +. +c +o +m +" + +- +U +s +a +g +e +L +o +c +a +t +i +o +n + +" +U +S +" + +- +D +e +p +a +r +t +m +e +n +t + +" +I +T +" + +- +C +i +t +y + +" +N +e +w + +Y +o +r +k +" + +- +C +o +u +n +t +r +y + +" +U +S +A +" + +- +J +o +b +t +i +t +l +e + +" +D +e +v +e +l +o +p +e +r +" + +- +M +o +b +i +l +e +P +h +o +n +e + +" +1 +2 +3 +4 +5 +6 +7 +8 +9 +0 +" + +- +S +t +r +e +e +t +A +d +d +r +e +s +s + +" +1 +2 +3 + +M +a +i +n + +S +t +" + +- +P +o +s +t +a +l +C +o +d +e + +" +1 +2 +3 +4 +5 +" + +- +C +o +m +p +a +n +y +N +a +m +e + +" +E +x +a +m +p +l +e + +I +n +c +" + +- +M +u +s +t +C +h +a +n +g +e +P +a +s +s + +$ +t +r +u +e + +- +A +d +d +T +o +G +r +o +u +p +s + +" +g +r +o +u +p +1 +" +, + +" +g +r +o +u +p +2 +" + +- +R +e +m +o +v +e +F +r +o +m +G +r +o +u +p +s + +" +g +r +o +u +p +3 +" + +- +B +u +s +i +n +e +s +s +P +h +o +n +e + +" +9 +8 +7 +6 +5 +4 +3 +2 +1 +0 +" +``` + diff --git a/README.md b/README.md index eece3c4..fe8d83d 100644 --- a/README.md +++ b/README.md @@ -57,4 +57,245 @@ This example sends a POST request to the '/api/adduser' endpoint with a Body 'te ## Special Thanks -Special thanks to [@KelvinTegelaar](https://github.com/KelvinTegelaar/), [@JohnDuprey](https://github.com/JohnDuprey/), [@rvdwegen](https://github.com/rvdwegen) and [@Jr7468](https://github.com/Jr7468/). I Could not have got this far without you! \ No newline at end of file +Special thanks to [@KelvinTegelaar](https://github.com/KelvinTegelaar/), [@JohnDuprey](https://github.com/JohnDuprey/), [@rvdwegen](https://github.com/rvdwegen) and [@Jr7468](https://github.com/Jr7468/). I Could not have got this far without you! + + + +# Cmdlet Help +## CIPP +- Core + - [Get-CIPPAccessCheck](./Docs/Get-CIPPAccessCheck.md) + - [Get-CIPPExecAPIPermissionsList](./Docs/Get-CIPPExecAPIPermissionsList.md) + - [Get-CIPPKnownIPDB](./Docs/Get-CIPPKnownIPDB.md) + - [Get-CIPPLogs](./Docs/Get-CIPPLogs.md) + - [Get-CIPPPublicPhishingCheck](./Docs/Get-CIPPPublicPhishingCheck.md) + - [Set-CIPPExecCPVPerms](./Docs/Set-CIPPExecCPVPerms.md) +- Scheduler +- Settings + - [Get-CIPPVersion](./Docs/Get-CIPPVersion.md) +- Setup +- [Get-CIPPAccessCheck](./Docs/Get-CIPPAccessCheck.md) +- [Get-CIPPExecAPIPermissionsList](./Docs/Get-CIPPExecAPIPermissionsList.md) +- [Get-CIPPKnownIPDB](./Docs/Get-CIPPKnownIPDB.md) +- [Get-CIPPLogs](./Docs/Get-CIPPLogs.md) +- [Get-CIPPPublicPhishingCheck](./Docs/Get-CIPPPublicPhishingCheck.md) +- [Set-CIPPExecCPVPerms](./Docs/Set-CIPPExecCPVPerms.md) +- [Get-CIPPVersion](./Docs/Get-CIPPVersion.md) +## Email-Exchange +- [Add-CIPPContact](./Docs/Add-CIPPContact.md) +- [Get-CIPPCalendarPerms](./Docs/Get-CIPPCalendarPerms.md) +- [Get-CIPPContacts](./Docs/Get-CIPPContacts.md) +- [Get-CIPPEnabledSharedMailboxes](./Docs/Get-CIPPEnabledSharedMailboxes.md) +- [Get-CIPPExchangeConnectors](./Docs/Get-CIPPExchangeConnectors.md) +- [Get-CIPPExchangeConnectorTemplates](./Docs/Get-CIPPExchangeConnectorTemplates.md) +- [Get-CIPPMailboxes](./Docs/Get-CIPPMailboxes.md) +- [Get-CIPPMailboxMobileDevices](./Docs/Get-CIPPMailboxMobileDevices.md) +- [Get-CIPPMailboxPermissions](./Docs/Get-CIPPMailboxPermissions.md) +- [Get-CIPPMailboxRestores](./Docs/Get-CIPPMailboxRestores.md) +- [Get-CIPPMailboxRules](./Docs/Get-CIPPMailboxRules.md) +- [Get-CIPPMailboxStatistics](./Docs/Get-CIPPMailboxStatistics.md) +- [Get-CIPPMailQuarantine](./Docs/Get-CIPPMailQuarantine.md) +- [Get-CIPPMessageTrace](./Docs/Get-CIPPMessageTrace.md) +- [Get-CIPPOutOfOffice](./Docs/Get-CIPPOutOfOffice.md) +- [Get-CIPPPhishPolicies](./Docs/Get-CIPPPhishPolicies.md) +- [Get-CIPPRecipients](./Docs/Get-CIPPRecipients.md) +- [Get-CIPPSpamFilter](./Docs/Get-CIPPSpamFilter.md) +- [Get-CIPPSpamFilterTemplates](./Docs/Get-CIPPSpamFilterTemplates.md) +- [Get-CIPPTransportRules](./Docs/Get-CIPPTransportRules.md) +- [Get-CIPPUserMailboxDetails](./Docs/Get-CIPPUserMailboxDetails.md) +- [Get-CIPPUserMailboxRules](./Docs/Get-CIPPUserMailboxRules.md) +- [Set-CIPPCalendarPermissions](./Docs/Set-CIPPCalendarPermissions.md) +- [Set-CIPPConvertMailbox](./Docs/Set-CIPPConvertMailbox.md) +- [Set-CIPPCopyToSent](./Docs/Set-CIPPCopyToSent.md) +- [Set-CIPPEnableArchive](./Docs/Set-CIPPEnableArchive.md) +- [Set-CIPPExchConnector](./Docs/Set-CIPPExchConnector.md) +- [Set-CIPPHideFromGAL](./Docs/Set-CIPPHideFromGAL.md) +- [Set-CIPPMailboxMobileDevices](./Docs/Set-CIPPMailboxMobileDevices.md) +- [Set-CIPPMailboxPermissions](./Docs/Set-CIPPMailboxPermissions.md) +- [Set-CIPPQuarantineManagement](./Docs/Set-CIPPQuarantineManagement.md) +- [Set-CIPPSpamFilter](./Docs/Set-CIPPSpamFilter.md) +- [Set-CIPPTransportRule](./Docs/Set-CIPPTransportRule.md) +## Endpoint +- Applications + - [Get-CIPPApps](./Docs/Get-CIPPApps.md) +- Autopilot + - [Get-CIPPAPDevices](./Docs/Get-CIPPAPDevices.md) + - [Get-CIPPAutoPilotConfig](./Docs/Get-CIPPAutoPilotConfig.md) +- MEM + - [Set-CIPPMEMPolicy](./Docs/Set-CIPPMEMPolicy.md) +- Reports + - [Get-CIPPDevices](./Docs/Get-CIPPDevices.md) +- [Get-CIPPApps](./Docs/Get-CIPPApps.md) +- [Get-CIPPAPDevices](./Docs/Get-CIPPAPDevices.md) +- [Get-CIPPAutoPilotConfig](./Docs/Get-CIPPAutoPilotConfig.md) +- [Set-CIPPMEMPolicy](./Docs/Set-CIPPMEMPolicy.md) +- [Get-CIPPDevices](./Docs/Get-CIPPDevices.md) +## Identity +- Administration + - [Devices](./Docs/Devices.md) + - [Groups](./Docs/Groups.md) + - [Users](./Docs/Users.md) + - [Get-CIPPRoles](./Docs/Get-CIPPRoles.md) +- Reports + - [Get-CIPPBasicAuth](./Docs/Get-CIPPBasicAuth.md) + - [Get-CIPPInactiveAccounts](./Docs/Get-CIPPInactiveAccounts.md) + - [Get-CIPPMFAUsers](./Docs/Get-CIPPMFAUsers.md) + - [Get-CIPPSignIns](./Docs/Get-CIPPSignIns.md) +- Devices +- Groups + - [Get-CIPPGroups](./Docs/Get-CIPPGroups.md) + - [Get-CIPPGroupTemplates](./Docs/Get-CIPPGroupTemplates.md) + - [Remove-CIPPGroup](./Docs/Remove-CIPPGroup.md) + - [Set-CIPPGroupDeliveryManagement](./Docs/Set-CIPPGroupDeliveryManagement.md) + - [Set-CIPPGroupHideFromGAL](./Docs/Set-CIPPGroupHideFromGAL.md) +- Users + - [Add-CIPPUser](./Docs/Add-CIPPUser.md) + - [Get-CIPPBECCheck](./Docs/Get-CIPPBECCheck.md) + - [Get-CIPPDeletedItems](./Docs/Get-CIPPDeletedItems.md) + - [Get-CIPPUniversalSearch](./Docs/Get-CIPPUniversalSearch.md) + - [Get-CIPPUserCAPolicies](./Docs/Get-CIPPUserCAPolicies.md) + - [Get-CIPPUserCounts](./Docs/Get-CIPPUserCounts.md) + - [Get-CIPPUserDevices](./Docs/Get-CIPPUserDevices.md) + - [Get-CIPPUserGroups](./Docs/Get-CIPPUserGroups.md) + - [Get-CIPPUserPhoto](./Docs/Get-CIPPUserPhoto.md) + - [Get-CIPPUsers](./Docs/Get-CIPPUsers.md) + - [Get-CIPPUserSignIns](./Docs/Get-CIPPUserSignIns.md) + - [Send-CIPPPush](./Docs/Send-CIPPPush.md) + - [Set-CIPPClrImmID](./Docs/Set-CIPPClrImmID.md) + - [Set-CIPPCreateTap](./Docs/Set-CIPPCreateTap.md) + - [Set-CIPPResetPassword](./Docs/Set-CIPPResetPassword.md) + - [Set-CIPPRestoreDeletedUser](./Docs/Set-CIPPRestoreDeletedUser.md) + - [Set-CIPPRevokeSessions](./Docs/Set-CIPPRevokeSessions.md) + - [Set-CIPPSignInStatus](./Docs/Set-CIPPSignInStatus.md) + - [Set-CIPPUser](./Docs/Set-CIPPUser.md) +- [Get-CIPPRoles](./Docs/Get-CIPPRoles.md) +- [Get-CIPPGroups](./Docs/Get-CIPPGroups.md) +- [Get-CIPPGroupTemplates](./Docs/Get-CIPPGroupTemplates.md) +- [Remove-CIPPGroup](./Docs/Remove-CIPPGroup.md) +- [Set-CIPPGroupDeliveryManagement](./Docs/Set-CIPPGroupDeliveryManagement.md) +- [Set-CIPPGroupHideFromGAL](./Docs/Set-CIPPGroupHideFromGAL.md) +- [Add-CIPPUser](./Docs/Add-CIPPUser.md) +- [Get-CIPPBECCheck](./Docs/Get-CIPPBECCheck.md) +- [Get-CIPPDeletedItems](./Docs/Get-CIPPDeletedItems.md) +- [Get-CIPPUniversalSearch](./Docs/Get-CIPPUniversalSearch.md) +- [Get-CIPPUserCAPolicies](./Docs/Get-CIPPUserCAPolicies.md) +- [Get-CIPPUserCounts](./Docs/Get-CIPPUserCounts.md) +- [Get-CIPPUserDevices](./Docs/Get-CIPPUserDevices.md) +- [Get-CIPPUserGroups](./Docs/Get-CIPPUserGroups.md) +- [Get-CIPPUserPhoto](./Docs/Get-CIPPUserPhoto.md) +- [Get-CIPPUsers](./Docs/Get-CIPPUsers.md) +- [Get-CIPPUserSignIns](./Docs/Get-CIPPUserSignIns.md) +- [Send-CIPPPush](./Docs/Send-CIPPPush.md) +- [Set-CIPPClrImmID](./Docs/Set-CIPPClrImmID.md) +- [Set-CIPPCreateTap](./Docs/Set-CIPPCreateTap.md) +- [Set-CIPPResetPassword](./Docs/Set-CIPPResetPassword.md) +- [Set-CIPPRestoreDeletedUser](./Docs/Set-CIPPRestoreDeletedUser.md) +- [Set-CIPPRevokeSessions](./Docs/Set-CIPPRevokeSessions.md) +- [Set-CIPPSignInStatus](./Docs/Set-CIPPSignInStatus.md) +- [Set-CIPPUser](./Docs/Set-CIPPUser.md) +- [Get-CIPPBasicAuth](./Docs/Get-CIPPBasicAuth.md) +- [Get-CIPPInactiveAccounts](./Docs/Get-CIPPInactiveAccounts.md) +- [Get-CIPPMFAUsers](./Docs/Get-CIPPMFAUsers.md) +- [Get-CIPPSignIns](./Docs/Get-CIPPSignIns.md) +## Intune +- Device + - [Get-CIPPGetBitLockerKey](./Docs/Get-CIPPGetBitLockerKey.md) + - [Get-CIPPIntuneIntents](./Docs/Get-CIPPIntuneIntents.md) + - [Get-CIPPIntunePolicy](./Docs/Get-CIPPIntunePolicy.md) + - [Get-CIPPIntuneTemplates](./Docs/Get-CIPPIntuneTemplates.md) + - [Get-CIPPLocalAdminPassword](./Docs/Get-CIPPLocalAdminPassword.md) +- [Get-CIPPGetBitLockerKey](./Docs/Get-CIPPGetBitLockerKey.md) +- [Get-CIPPIntuneIntents](./Docs/Get-CIPPIntuneIntents.md) +- [Get-CIPPIntunePolicy](./Docs/Get-CIPPIntunePolicy.md) +- [Get-CIPPIntuneTemplates](./Docs/Get-CIPPIntuneTemplates.md) +- [Get-CIPPLocalAdminPassword](./Docs/Get-CIPPLocalAdminPassword.md) +## Security +- Defender + - [Get-CIPPDefenderState](./Docs/Get-CIPPDefenderState.md) + - [Get-CIPPDefenderTVM](./Docs/Get-CIPPDefenderTVM.md) +- Incidents + - [Get-CIPPAlertsList](./Docs/Get-CIPPAlertsList.md) + - [Get-CIPPIncidentList](./Docs/Get-CIPPIncidentList.md) +- Reports + - [Get-CIPPDeviceCompliance](./Docs/Get-CIPPDeviceCompliance.md) +- [Get-CIPPDefenderState](./Docs/Get-CIPPDefenderState.md) +- [Get-CIPPDefenderTVM](./Docs/Get-CIPPDefenderTVM.md) +- [Get-CIPPAlertsList](./Docs/Get-CIPPAlertsList.md) +- [Get-CIPPIncidentList](./Docs/Get-CIPPIncidentList.md) +- [Get-CIPPDeviceCompliance](./Docs/Get-CIPPDeviceCompliance.md) +## Teams-Sharepoint +- Sharepoint + - [Get-CIPPSharePointQuota](./Docs/Get-CIPPSharePointQuota.md) + - [Get-CIPPSharePointSites](./Docs/Get-CIPPSharePointSites.md) +- Teams + - [Get-CIPPTeams](./Docs/Get-CIPPTeams.md) + - [Get-CIPPTeamsActivity](./Docs/Get-CIPPTeamsActivity.md) + - [Get-CIPPTeamsVoice](./Docs/Get-CIPPTeamsVoice.md) +- [Get-CIPPSharePointQuota](./Docs/Get-CIPPSharePointQuota.md) +- [Get-CIPPSharePointSites](./Docs/Get-CIPPSharePointSites.md) +- [Get-CIPPTeams](./Docs/Get-CIPPTeams.md) +- [Get-CIPPTeamsActivity](./Docs/Get-CIPPTeamsActivity.md) +- [Get-CIPPTeamsVoice](./Docs/Get-CIPPTeamsVoice.md) +## Tenant +- Administration + - [Alerts](./Docs/Alerts.md) + - [Application Approval](./Docs/Application Approval.md) + - [Tenant](./Docs/Tenant.md) + - [Get-CIPPAppConsentReqs](./Docs/Get-CIPPAppConsentReqs.md) + - [Get-CIPPDomains](./Docs/Get-CIPPDomains.md) +- Conditional + - [Get-CIPPCAPolicies](./Docs/Get-CIPPCAPolicies.md) + - [Get-CIPPCATemplates](./Docs/Get-CIPPCATemplates.md) + - [Get-CIPPNamedLocations](./Docs/Get-CIPPNamedLocations.md) + - [Set-CIPPCAPolicy](./Docs/Set-CIPPCAPolicy.md) +- GDAP + - [Remove-CIPPGDAPRelationship](./Docs/Remove-CIPPGDAPRelationship.md) +- Reports + - [Get-CIPPLicenses](./Docs/Get-CIPPLicenses.md) + - [Get-CIPPOAuthApps](./Docs/Get-CIPPOAuthApps.md) +- Standards + - [Get-CIPPBPA](./Docs/Get-CIPPBPA.md) + - [Get-CIPPBPATemplates](./Docs/Get-CIPPBPATemplates.md) + - [Get-CIPPDomainAnalyser](./Docs/Get-CIPPDomainAnalyser.md) + - [Get-CIPPDomainHealth](./Docs/Get-CIPPDomainHealth.md) + - [Get-CIPPStandards](./Docs/Get-CIPPStandards.md) +- Tools + - [Get-CIPPAuditLogTest](./Docs/Get-CIPPAuditLogTest.md) + - [Get-CIPPExternalGEOIPLookup](./Docs/Get-CIPPExternalGEOIPLookup.md) + - [Get-CIPPExternalTenantInfo](./Docs/Get-CIPPExternalTenantInfo.md) +- Alerts + - [Get-CIPPAlerts](./Docs/Get-CIPPAlerts.md) +- Application Approval +- Tenant + - [Get-CIPPADConnectStatus](./Docs/Get-CIPPADConnectStatus.md) + - [Get-CIPPOrg](./Docs/Get-CIPPOrg.md) + - [Get-CIPPPartnerRelationships](./Docs/Get-CIPPPartnerRelationships.md) + - [Get-CIPPTenantDetails](./Docs/Get-CIPPTenantDetails.md) + - [Get-CIPPTenants](./Docs/Get-CIPPTenants.md) +- [Get-CIPPAppConsentReqs](./Docs/Get-CIPPAppConsentReqs.md) +- [Get-CIPPDomains](./Docs/Get-CIPPDomains.md) +- [Get-CIPPAlerts](./Docs/Get-CIPPAlerts.md) +- [Get-CIPPADConnectStatus](./Docs/Get-CIPPADConnectStatus.md) +- [Get-CIPPOrg](./Docs/Get-CIPPOrg.md) +- [Get-CIPPPartnerRelationships](./Docs/Get-CIPPPartnerRelationships.md) +- [Get-CIPPTenantDetails](./Docs/Get-CIPPTenantDetails.md) +- [Get-CIPPTenants](./Docs/Get-CIPPTenants.md) +- [Get-CIPPCAPolicies](./Docs/Get-CIPPCAPolicies.md) +- [Get-CIPPCATemplates](./Docs/Get-CIPPCATemplates.md) +- [Get-CIPPNamedLocations](./Docs/Get-CIPPNamedLocations.md) +- [Set-CIPPCAPolicy](./Docs/Set-CIPPCAPolicy.md) +- [Remove-CIPPGDAPRelationship](./Docs/Remove-CIPPGDAPRelationship.md) +- [Get-CIPPLicenses](./Docs/Get-CIPPLicenses.md) +- [Get-CIPPOAuthApps](./Docs/Get-CIPPOAuthApps.md) +- [Get-CIPPBPA](./Docs/Get-CIPPBPA.md) +- [Get-CIPPBPATemplates](./Docs/Get-CIPPBPATemplates.md) +- [Get-CIPPDomainAnalyser](./Docs/Get-CIPPDomainAnalyser.md) +- [Get-CIPPDomainHealth](./Docs/Get-CIPPDomainHealth.md) +- [Get-CIPPStandards](./Docs/Get-CIPPStandards.md) +- [Get-CIPPAuditLogTest](./Docs/Get-CIPPAuditLogTest.md) +- [Get-CIPPExternalGEOIPLookup](./Docs/Get-CIPPExternalGEOIPLookup.md) +- [Get-CIPPExternalTenantInfo](./Docs/Get-CIPPExternalTenantInfo.md) +## Invoke-CIPPRestMethod +- [Invoke-CIPPRestMethod](./Docs/Invoke-CIPPRestMethod.md) +## Set-CIPPAPIDetails +- [Set-CIPPAPIDetails](./Docs/Set-CIPPAPIDetails.md) diff --git a/Tools/Generate-HelpDocs.ps1 b/Tools/Generate-HelpDocs.ps1 new file mode 100644 index 0000000..082a795 --- /dev/null +++ b/Tools/Generate-HelpDocs.ps1 @@ -0,0 +1,4 @@ +$commands = get-command -module CIPPAPIModule +foreach ($command in $commands) { + Get-HelpByMarkDown $command.name > ".\Docs\$($command.name).md" +} \ No newline at end of file diff --git a/Tools/Get-HelpByMarkDown.ps1 b/Tools/Get-HelpByMarkDown.ps1 new file mode 100644 index 0000000..e9a3baf --- /dev/null +++ b/Tools/Get-HelpByMarkDown.ps1 @@ -0,0 +1,155 @@ +Function Get-HelpByMarkDown { +# +# File: Get-HelpByMarkdown.ps1 +# +# Authors: Akira Sugiura (urasandesu@gmail.com) +# Gordon Byers (gordon.byers@microsoft.com) +# Jason Marshall (jason@marshall.gg) +# +# +# Copyright (c) 2014 Akira Sugiura +# +# This software is MIT License. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# + +<# + .SYNOPSIS + Gets the comment-based help and converts to GitHub Flavored Markdown. + .PARAMETER Name + A command name to get comment-based help. + .EXAMPLE + & .\Get-HelpByMarkdown.ps1 Select-Object > .\Select-Object.md + + DESCRIPTION + ----------- + This example gets comment-based help of `Select-Object` command, and converts GitHub Flavored Markdown format, then saves it to `Select-Object.md` in current directory. + .INPUTS + System.String + .OUTPUTS + System.String +#> + +[CmdletBinding()] +param ( + [Parameter(Mandatory = $True)] + $Name +) + +function EncodePartOfHtml { + param ( + [string] + $Value + ) + + ($Value -replace '<', '<') -replace '>', '>' +} + +function GetCode { + param ( + $Example + ) + $codeAndRemarks = (($Example | Out-String) -replace ($Example.title), '').Trim() -split "`r`n"|ForEach-Object{$_.Trim()} + + $code = New-Object "System.Collections.Generic.List[string]" + for ($i = 0; $i -lt $codeAndRemarks.Length; $i++) { + + if ($codeAndRemarks[$i] -eq 'DESCRIPTION' -and $codeAndRemarks[$i + 1] -eq '-----------') { + + break + } + if (1 -le $i -and $i -le 2) { + + continue + } + + $code.Add($codeAndRemarks[$i]) + } + + $code -join "`r`n" +} + +function GetRemark { + param ( + $Example + ) + $codeAndRemarks = (($Example | Out-String) -replace ($Example.title), '').Trim() -split "`r`n"|ForEach-Object{$_.Trim()} + + $isSkipped = $false + $remark = New-Object "System.Collections.Generic.List[string]" + for ($i = 0; $i -lt $codeAndRemarks.Length; $i++) { + if (!$isSkipped -and $codeAndRemarks[$i - 2] -ne 'DESCRIPTION' -and $codeAndRemarks[$i - 1] -ne '-----------') { + continue + } + $isSkipped = $true + $remark.Add($codeAndRemarks[$i]) + } + + $remark -join "`r`n" +} + +try { + if ($Host.UI.RawUI) { + $rawUI = $Host.UI.RawUI + $oldSize = $rawUI.BufferSize + $typeName = $oldSize.GetType().FullName + $newSize = New-Object $typeName (500, $oldSize.Height) + $rawUI.BufferSize = $newSize + } + + $full = Get-Help $Name -Full + Write-Verbose $full | Format-Table + +@" +# $($full.Name.Split("\")[-1]) +## SYNOPSIS +$($full.Synopsis) +## DESCRIPTION +$(($full.description | Out-String).Trim()) +# PARAMETERS +`n +"@ + $(foreach ($parameter in $full.parameters.parameter) { +$mandatoryColor = if($parameter.required -eq $True){"Red"}Else{"Green"} +@" +## **-$($parameter.name)** +> ![Foo](https://img.shields.io/badge/Type-$($parameter.type.name)-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-$(($parameter.required).ToUpper())-$mandatoryColor`?) $(if([String]::IsNullOrEmpty($parameter.defaultValue) -eq $false){"![Foo](https://img.shields.io/badge/DefaultValue-$($parameter.defaultValue)-Blue?color=5547a8)\"}else{"\"}) +$((($parameter.description).text -replace "\n"," ").Trim()) +`n +"@ +}) + @" +$(if($full.examples.example){ + $(foreach ($example in $full.examples.example) { +@" +#### $(($example.title -replace '-*', '').Trim()) +``````powershell +$(GetCode $example) +`````` +$(GetRemark $example) +"@ +})}) +"@ + +} finally { + if ($Host.UI.RawUI) { + $rawUI = $Host.UI.RawUI + $rawUI.BufferSize = $oldSize + } +} +} \ No newline at end of file diff --git a/Tools/New-MarkdownHelpPathTree.ps1 b/Tools/New-MarkdownHelpPathTree.ps1 new file mode 100644 index 0000000..8589c3a --- /dev/null +++ b/Tools/New-MarkdownHelpPathTree.ps1 @@ -0,0 +1,21 @@ +$Readme = Get-Content .\README.md -Raw +$NewReadme = ($Readme -split '# Cmdlet Help')[0] + +$Folders = Get-ChildItem .\Public +$NewReadme = $NewReadme + '# Cmdlet Help' +foreach ($Folder in $Folders) { + $NewReadme = $NewReadme + ("`n## {0}" -f $Folder.BaseName) + $Items = Get-ChildItem -Path $Folder -Recurse + foreach ($Item in $Items) { + if ($item.Extension -eq '.ps1') { + $NewReadme = $NewReadme + ("`n- [{0}](./Docs/{1}.md)" -f $Item.BaseName, $Item.BaseName) + } else { + $NewReadme = $NewReadme + ("`n- {0}" -f $Item.BaseName) + $Item | Get-ChildItem | ForEach-Object { + $NewReadme = $NewReadme + ("`n - [{0}](./Docs/{1}.md)" -f $_.BaseName, $_.BaseName) + } + } + } +} + +$NewReadme | Set-Content -Path .\README.md \ No newline at end of file diff --git a/build.psd1 b/build.psd1 index cb33968..c60090e 100644 --- a/build.psd1 +++ b/build.psd1 @@ -2,9 +2,9 @@ # command when building the module (see `Get-Help Build-Module -Full` for details). @{ - ModuleManifest = 'CIPPAPIModule.psd1' + ModuleManifest = 'CIPPAPIModule\CIPPAPIModule.psd1' # Subsequent relative paths are to the ModuleManifest - OutputDirectory = '.\Output\' + OutputDirectory = '..\Output\' VersionedOutputDirectory = $false CopyDirectories = @() } \ No newline at end of file diff --git a/private/Connect-CIPP.ps1 b/private/Connect-CIPP.ps1 deleted file mode 100644 index 8472c49..0000000 --- a/private/Connect-CIPP.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -function Connect-CIPP { - [CmdletBinding()] - Param( - [string]$CIPPAPIUrl, - [string]$CIPPClientID, - [string]$CIPPClientSecret, - [string]$TenantID - ) - - $Script:AuthBody = @{ - client_id = $script:CIPPClientID - client_secret = $script:CIPPClientSecret - scope = "api://$($script:CIPPClientID)/.default" - grant_type = 'client_credentials' - } - $token = Invoke-RestMethod -Uri "https://login.microsoftonline.com/$script:TenantId/oauth2/v2.0/token" -Method POST -Body $AuthBody - - $script:AuthHeader = @{ Authorization = "Bearer $($token.access_token)" } - $script:TokenAcquiredTime = Get-Date - $script:ExpiresIn = $token.expires_in - -} diff --git a/private/Get-TokenExpiry.ps1 b/private/Get-TokenExpiry.ps1 deleted file mode 100644 index f70df45..0000000 --- a/private/Get-TokenExpiry.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -<# - .SYNOPSIS - Calculates and returns the expiry date/time of a Microsoft token. - .DESCRIPTION - Takes the expires in time for an auth token and returns a PowerShell date/time object containing the expiry date/time of the token. - .OUTPUTS - A powershell date/time object representing the token expiry. - #> -function Get-TokenExpiry { - [CmdletBinding()] - [OutputType([DateTime])] - param ( - [Parameter(Mandatory = $false)] - [int64]$ExpiresIn = $script:ExpiresIn - ) - if ($script:ExpiresIn -eq $null) { - return - } else { - $Script:ExpiryDateTime = $script:TokenAcquiredTime.AddSeconds($script:ExpiresIn) - Write-Verbose "Calcuated token expiry as $Script:ExpiryDateTime" - } -} \ No newline at end of file diff --git a/public/CIPP/Core/Get-CIPPAccessCheck.ps1 b/public/CIPP/Core/Get-CIPPAccessCheck.ps1 deleted file mode 100644 index 9cd9a43..0000000 --- a/public/CIPP/Core/Get-CIPPAccessCheck.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -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 -} diff --git a/public/CIPP/Core/Get-CIPPExecAPIPermissionsList.ps1 b/public/CIPP/Core/Get-CIPPExecAPIPermissionsList.ps1 deleted file mode 100644 index 6ca4877..0000000 --- a/public/CIPP/Core/Get-CIPPExecAPIPermissionsList.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -function Get-CIPPExecAPIPermissionsList { - [CmdletBinding()] - Param() - - Write-Verbose "Getting CIPP Logs" - $endpoint = "/api/ExecAPIPermissionList" - - Invoke-CIPPRestMethod -Endpoint $endpoint -} - diff --git a/public/CIPP/Core/Get-CIPPKnownIPDB.ps1 b/public/CIPP/Core/Get-CIPPKnownIPDB.ps1 deleted file mode 100644 index 21cac7c..0000000 --- a/public/CIPP/Core/Get-CIPPKnownIPDB.ps1 +++ /dev/null @@ -1,14 +0,0 @@ -function Get-CIPPKnownIPDB { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $false)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting Known IP Database for $CustomerTenantID" - $endpoint = "/api/listknownipdb" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file diff --git a/public/CIPP/Core/Get-CIPPLogs.ps1 b/public/CIPP/Core/Get-CIPPLogs.ps1 deleted file mode 100644 index 66d8f45..0000000 --- a/public/CIPP/Core/Get-CIPPLogs.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -function Get-CIPPLogs { - [CmdletBinding()] - Param() - - Write-Verbose "Getting CIPP Logs" - $endpoint = "/api/ListLogs" - - Invoke-CIPPRestMethod -Endpoint $endpoint -} - diff --git a/public/CIPP/Core/Get-CIPPPublicPhishingCheck.ps1 b/public/CIPP/Core/Get-CIPPPublicPhishingCheck.ps1 deleted file mode 100644 index 1979c98..0000000 --- a/public/CIPP/Core/Get-CIPPPublicPhishingCheck.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPPublicPhishingCheck { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting public phishing check $CustomerTenantID" - $endpoint = "/api/publicphishingcheck" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/CIPP/Core/Set-CIPPExecCPVPerms.ps1 b/public/CIPP/Core/Set-CIPPExecCPVPerms.ps1 deleted file mode 100644 index 9fea16c..0000000 --- a/public/CIPP/Core/Set-CIPPExecCPVPerms.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -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 -} - diff --git a/public/CIPP/Settings/Get-CIPPVersion.ps1 b/public/CIPP/Settings/Get-CIPPVersion.ps1 deleted file mode 100644 index 9ac0a73..0000000 --- a/public/CIPP/Settings/Get-CIPPVersion.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -function Get-CIPPVersion { - [CmdletBinding()] - Param() - - Write-Verbose "Getting CIPP Version" - $endpoint = "/api/Getversion" - - Invoke-CIPPRestMethod -Endpoint $endpoint -} - diff --git a/public/Email-Exchange/Get-CIPPCalendarPerms.ps1 b/public/Email-Exchange/Get-CIPPCalendarPerms.ps1 deleted file mode 100644 index fcedf8f..0000000 --- a/public/Email-Exchange/Get-CIPPCalendarPerms.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -function Get-CIPPCalendarPerms { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$UserID - ) - - Write-Verbose "Getting user calender permissions for user: $UserID" - $Endpoint = "/api/listcalendarpermissions" - $Params = @{ - tenantfilter = $CustomerTenantID - userId = $UserID - } - Invoke-CIPPRestMethod -Endpoint $Endpoint -Params $Params -} - diff --git a/public/Email-Exchange/Get-CIPPContacts.ps1 b/public/Email-Exchange/Get-CIPPContacts.ps1 deleted file mode 100644 index db139ee..0000000 --- a/public/Email-Exchange/Get-CIPPContacts.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -function Get-CIPPContacts { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $false)] - [GUID]$ContactID - ) - - if ($ContactID) { - Write-Verbose "Getting Contact details for Contact: $ContactID" - } else { - Write-Verbose "Getting all Contacts for tenant $CustomerTenantID" - } - $endpoint = "/api/listcontacts" - $params = @{ - tenantfilter = $CustomerTenantID - contactid = $ContactID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params - -} \ No newline at end of file diff --git a/public/Email-Exchange/Get-CIPPEnabledSharedMailboxes.ps1 b/public/Email-Exchange/Get-CIPPEnabledSharedMailboxes.ps1 deleted file mode 100644 index 82b209d..0000000 --- a/public/Email-Exchange/Get-CIPPEnabledSharedMailboxes.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPEnabledSharedMailboxes { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting shared mailboxes with account enabled for $CustomerTenantID" - $endpoint = "/api/listsharedmailboxaccountenabled" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Get-CIPPExchangeConnectorTemplates.ps1 b/public/Email-Exchange/Get-CIPPExchangeConnectorTemplates.ps1 deleted file mode 100644 index 2894083..0000000 --- a/public/Email-Exchange/Get-CIPPExchangeConnectorTemplates.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -function Get-CIPPExchangeConnectorTemplates { - [CmdletBinding()] - Param() - - Write-Verbose "Getting Exchange Connectors Templates" - $endpoint = "/api/listexconnectortemplates" - - Invoke-CIPPRestMethod -Endpoint $endpoint -} - diff --git a/public/Email-Exchange/Get-CIPPExchangeConnectors.ps1 b/public/Email-Exchange/Get-CIPPExchangeConnectors.ps1 deleted file mode 100644 index 795fb83..0000000 --- a/public/Email-Exchange/Get-CIPPExchangeConnectors.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPExchangeConnectors { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting Exchange Connectors for customer: $CustomerTenantID" - $endpoint = "/api/listexchangeconnectors" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Get-CIPPMailQuarantine.ps1 b/public/Email-Exchange/Get-CIPPMailQuarantine.ps1 deleted file mode 100644 index bbc38f2..0000000 --- a/public/Email-Exchange/Get-CIPPMailQuarantine.ps1 +++ /dev/null @@ -1,14 +0,0 @@ -function Get-CIPPMailQuarantine { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting mail quarantine for $CustomerTenantID" - $endpoint = "/api/listmailquarantine" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file diff --git a/public/Email-Exchange/Get-CIPPMailboxMobileDevices.ps1 b/public/Email-Exchange/Get-CIPPMailboxMobileDevices.ps1 deleted file mode 100644 index 5235c1a..0000000 --- a/public/Email-Exchange/Get-CIPPMailboxMobileDevices.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -function Get-CIPPMailboxMobileDevices { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$Mailbox - ) - - Write-Verbose "Getting mailbox mobile devices for $Mailbox" - $endpoint = "/api/listmailboxmobiledevices" - $params = @{ - tenantfilter = $CustomerTenantID - mailbox = $Mailbox - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Get-CIPPMailboxPermissions.ps1 b/public/Email-Exchange/Get-CIPPMailboxPermissions.ps1 deleted file mode 100644 index cd1e2bd..0000000 --- a/public/Email-Exchange/Get-CIPPMailboxPermissions.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -function Get-CIPPMailboxPermissions { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$UserID - ) - - Write-Verbose "Getting mailbox permissions for $CustomerTenantID" - $endpoint = "/api/listmailboxpermissions" - $params = @{ - tenantfilter = $CustomerTenantID - userid = $UserID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Get-CIPPMailboxRestores.ps1 b/public/Email-Exchange/Get-CIPPMailboxRestores.ps1 deleted file mode 100644 index ce96bc2..0000000 --- a/public/Email-Exchange/Get-CIPPMailboxRestores.ps1 +++ /dev/null @@ -1,32 +0,0 @@ -function Get-CIPPMailboxRestores { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $false)] - [string]$Identity, - [Parameter(Mandatory = $false)] - [switch]$Includereport, - [Parameter(Mandatory = $false)] - [switch]$Statistics - - ) - - Write-Verbose "Getting mailbox restores for $CustomerTenantID" - $endpoint = "/api/listmailboxrestores" - $params = @{ - tenantfilter = $CustomerTenantID - identity = $Identity - } - - if ($Includereport) { - $params.IncludeReport = "true" - } - - if ($Statistics) { - $params.Statistics = "true" - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Get-CIPPMailboxRules.ps1 b/public/Email-Exchange/Get-CIPPMailboxRules.ps1 deleted file mode 100644 index a814a1a..0000000 --- a/public/Email-Exchange/Get-CIPPMailboxRules.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPMailboxRules { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting mailbox rules for $CustomerTenantID" - $endpoint = "/api/listmailboxrules" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Get-CIPPMailboxStatistics.ps1 b/public/Email-Exchange/Get-CIPPMailboxStatistics.ps1 deleted file mode 100644 index 7e1bddd..0000000 --- a/public/Email-Exchange/Get-CIPPMailboxStatistics.ps1 +++ /dev/null @@ -1,14 +0,0 @@ -function Get-CIPPMailboxStatistics { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting mailbox statistics for $CustomerTenantID" - $endpoint = "/api/listmailboxstatistics" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file diff --git a/public/Email-Exchange/Get-CIPPMailboxes.ps1 b/public/Email-Exchange/Get-CIPPMailboxes.ps1 deleted file mode 100644 index ed809e9..0000000 --- a/public/Email-Exchange/Get-CIPPMailboxes.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPMailboxes { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting Mailbox List for $CustomerTenantID" - $endpoint = "/api/ListMailboxes" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Get-CIPPMessageTrace.ps1 b/public/Email-Exchange/Get-CIPPMessageTrace.ps1 deleted file mode 100644 index 92bb1d9..0000000 --- a/public/Email-Exchange/Get-CIPPMessageTrace.ps1 +++ /dev/null @@ -1,23 +0,0 @@ -function Get-CIPPMessageTrace { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$Days, - [Parameter(Mandatory = $false)] - [string]$Sender, - [Parameter(Mandatory = $false)] - [string]$Recipient - ) - - Write-Verbose "Getting message trace for $CustomerTenantID" - $endpoint = "/api/listmessagetrace" - $params = @{ - tenantfilter = $CustomerTenantID - days = $Days - sender = $Sender - recipient = $Recipient - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file diff --git a/public/Email-Exchange/Get-CIPPOutOfOffice.ps1 b/public/Email-Exchange/Get-CIPPOutOfOffice.ps1 deleted file mode 100644 index 7937b61..0000000 --- a/public/Email-Exchange/Get-CIPPOutOfOffice.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -function Get-CIPPOutOfOffice { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$UserID - ) - - Write-Verbose "Getting out of office for $UserID" - $endpoint = "/api/listooo" - $params = @{ - tenantfilter = $CustomerTenantID - userid = $UserID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Get-CIPPPhishPolicies.ps1 b/public/Email-Exchange/Get-CIPPPhishPolicies.ps1 deleted file mode 100644 index f31478c..0000000 --- a/public/Email-Exchange/Get-CIPPPhishPolicies.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPPhishPolicies { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting Phish Policies for $CustomerTenantID" - $endpoint = "/api/listphishpolicies" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Get-CIPPRecipients.ps1 b/public/Email-Exchange/Get-CIPPRecipients.ps1 deleted file mode 100644 index 09e1b65..0000000 --- a/public/Email-Exchange/Get-CIPPRecipients.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPRecipients { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting recipients for $CustomerTenantID" - $endpoint = "/api/listrecipients" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Get-CIPPSpamFilter.ps1 b/public/Email-Exchange/Get-CIPPSpamFilter.ps1 deleted file mode 100644 index 5f76fb3..0000000 --- a/public/Email-Exchange/Get-CIPPSpamFilter.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPSpamFilter { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting spam filter settings for $CustomerTenantID" - $endpoint = "/api/listspamfilter" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Get-CIPPSpamFilterTemplates.ps1 b/public/Email-Exchange/Get-CIPPSpamFilterTemplates.ps1 deleted file mode 100644 index da9545a..0000000 --- a/public/Email-Exchange/Get-CIPPSpamFilterTemplates.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPSpamFilterTemplates { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $false)] - [string]$TemplateID - ) - - Write-Verbose "Getting spam filter templates" - $endpoint = "/api/listspamfiltertemplates" - $params = @{ - id = $TemplateID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Get-CIPPTransportRules.ps1 b/public/Email-Exchange/Get-CIPPTransportRules.ps1 deleted file mode 100644 index ede0be8..0000000 --- a/public/Email-Exchange/Get-CIPPTransportRules.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPTransportRules { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting transport rules for $CustomerTenantID" - $endpoint = "/api/listtransportrulestemplates" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Get-CIPPUserMailboxDetails.ps1 b/public/Email-Exchange/Get-CIPPUserMailboxDetails.ps1 deleted file mode 100644 index 005fbbb..0000000 --- a/public/Email-Exchange/Get-CIPPUserMailboxDetails.ps1 +++ /dev/null @@ -1,20 +0,0 @@ -function Get-CIPPUserMailboxDetails { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$UserID - ) - - - Write-Verbose "Getting user Mailbox Details for $userID" - - $endpoint = "/api/listusermailboxdetails" - $params = @{ - tenantfilter = $CustomerTenantID - userId = $UserID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Get-CIPPUserMailboxRules.ps1 b/public/Email-Exchange/Get-CIPPUserMailboxRules.ps1 deleted file mode 100644 index 9ac1847..0000000 --- a/public/Email-Exchange/Get-CIPPUserMailboxRules.ps1 +++ /dev/null @@ -1,20 +0,0 @@ -function Get-CIPPUserMailboxRules { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$UserID - ) - - - Write-Verbose "Getting user Mailbox Rules for $userID" - - $endpoint = "/api/listusermailboxrules" - $params = @{ - tenantfilter = $CustomerTenantID - userId = $UserID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Set-CIPPCalendarPermissions.ps1 b/public/Email-Exchange/Set-CIPPCalendarPermissions.ps1 deleted file mode 100644 index a684bc9..0000000 --- a/public/Email-Exchange/Set-CIPPCalendarPermissions.ps1 +++ /dev/null @@ -1,44 +0,0 @@ -function Set-CIPPCalendarPermissions { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $false)] - [ValidateSet( - "Author", - "Contributor", - "Editor", - "Owner", - "Non Editing Author", - "Publishing Author", - "Publishing Editor", - "Reviewer", - "LimitedDetails", - "AvailabilityOnly" - )] - [string]$Permissions, - [Parameter(Mandatory = $true)] - [string]$Userid, - [Parameter(Mandatory = $false)] - [string]$RemoveAccess, - [Parameter(Mandatory = $false)] - [string]$usertogetpermissions, - [Parameter(Mandatory = $false)] - [string]$FolderName = "Calendar" - ) - - - Write-Verbose "Editing calendar permissions for $Userid" - $endpoint = "/api/execeditcalendarpermissions" - $params = @{ - TenantFilter = $CustomerTenantID - permissions = $Permissions - userid = $Userid - removeaccess = $RemoveAccess - usertogetpermissions = $usertogetpermissions - FolderName = $FolderName - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Set-CIPPConvertMailbox.ps1 b/public/Email-Exchange/Set-CIPPConvertMailbox.ps1 deleted file mode 100644 index c31e484..0000000 --- a/public/Email-Exchange/Set-CIPPConvertMailbox.ps1 +++ /dev/null @@ -1,24 +0,0 @@ -function Set-CIPPConvertMailbox { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$UserID, - [Parameter(Mandatory = $false)] - [switch]$ConvertToUserMailbox - ) - - - Write-Verbose "Converting Mailbox $userID" - - $endpoint = "/api/execconverttosharedmailbox" - $params = @{ - tenantfilter = $CustomerTenantID - id = $UserID - ConvertToUser = if ($ConvertToUserMailbox) { "true" } else { "false" } - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Set-CIPPCopyToSent.ps1 b/public/Email-Exchange/Set-CIPPCopyToSent.ps1 deleted file mode 100644 index 4a87e4e..0000000 --- a/public/Email-Exchange/Set-CIPPCopyToSent.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -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 -} - diff --git a/public/Email-Exchange/Set-CIPPEnableArchive.ps1 b/public/Email-Exchange/Set-CIPPEnableArchive.ps1 deleted file mode 100644 index 2259742..0000000 --- a/public/Email-Exchange/Set-CIPPEnableArchive.ps1 +++ /dev/null @@ -1,20 +0,0 @@ -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 -} \ No newline at end of file diff --git a/public/Email-Exchange/Set-CIPPExchConnector.ps1 b/public/Email-Exchange/Set-CIPPExchConnector.ps1 deleted file mode 100644 index b2638e4..0000000 --- a/public/Email-Exchange/Set-CIPPExchConnector.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -function Set-CIPPExchConnector { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory)] - [ValidateSet("Enable", "Disabled")] - [string]$State, - [Parameter(Mandatory = $true)] - [guid]$Guid, - [Parameter(Mandatory = $true)] - [string]$Type - ) - - - Write-Verbose "Editing Exchange Connector for tenant $CustomerTenantID" - $endpoint = "/api/editexconnector" - $params = @{ - TenantFilter = $CustomerTenantID - state = $State - GUID = $Guid - Type = $Type - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Set-CIPPHideFromGAL.ps1 b/public/Email-Exchange/Set-CIPPHideFromGAL.ps1 deleted file mode 100644 index 93f4b3e..0000000 --- a/public/Email-Exchange/Set-CIPPHideFromGAL.ps1 +++ /dev/null @@ -1,26 +0,0 @@ -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 - -} \ No newline at end of file diff --git a/public/Email-Exchange/Set-CIPPMailboxMobileDevices.ps1 b/public/Email-Exchange/Set-CIPPMailboxMobileDevices.ps1 deleted file mode 100644 index f3a0e3a..0000000 --- a/public/Email-Exchange/Set-CIPPMailboxMobileDevices.ps1 +++ /dev/null @@ -1,40 +0,0 @@ -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 -} - diff --git a/public/Email-Exchange/Set-CIPPQuarantineManagement.ps1 b/public/Email-Exchange/Set-CIPPQuarantineManagement.ps1 deleted file mode 100644 index 01dcb6a..0000000 --- a/public/Email-Exchange/Set-CIPPQuarantineManagement.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -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 -} \ No newline at end of file diff --git a/public/Email-Exchange/Set-CIPPSpamFilter.ps1 b/public/Email-Exchange/Set-CIPPSpamFilter.ps1 deleted file mode 100644 index 7011c78..0000000 --- a/public/Email-Exchange/Set-CIPPSpamFilter.ps1 +++ /dev/null @@ -1,26 +0,0 @@ -function Set-CIPPSpamFilter { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $false)] - [guid]$Guid, - [Parameter(Mandatory = $true)] - [string]$Name, - [Parameter(Mandatory = $true)] - [ValidateSet("Enable", "Disable")] - [string]$State - ) - - Write-Verbose "Editing Spam Filter" - $endpoint = "/api/editspamfilter" - $params = @{ - tenantfilter = $CustomerTenantID - guid = $Guid - name = $Name - state = $State - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Email-Exchange/Set-CIPPTransportRule.ps1 b/public/Email-Exchange/Set-CIPPTransportRule.ps1 deleted file mode 100644 index b735fa7..0000000 --- a/public/Email-Exchange/Set-CIPPTransportRule.ps1 +++ /dev/null @@ -1,24 +0,0 @@ -function Set-CIPPTransportRule { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory)] - [ValidateSet("Enable", "Disable")] - [string]$State, - [Parameter(Mandatory = $true)] - [guid]$Guid - ) - - - Write-Verbose "Editing transport rule for tenant $CustomerTenantID" - $endpoint = "/api/edittransportrule" - $params = @{ - TenantFilter = $CustomerTenantID - state = $State - GUID = $Guid - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Endpoint/Applications/Get-CIPPApps.ps1 b/public/Endpoint/Applications/Get-CIPPApps.ps1 deleted file mode 100644 index 4f7503e..0000000 --- a/public/Endpoint/Applications/Get-CIPPApps.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -function Get-CIPPApps { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting Apps for $CustomerTenantID" - $Endpoint = "/api/listapps" - $Params = @{ - tenantfilter = $CustomerTenantID - } - - Invoke-CIPPRestMethod -Endpoint $Endpoint -Params $Params - -} \ No newline at end of file diff --git a/public/Endpoint/Autopilot/Get-CIPPAPDevices.ps1 b/public/Endpoint/Autopilot/Get-CIPPAPDevices.ps1 deleted file mode 100644 index 7ff59b8..0000000 --- a/public/Endpoint/Autopilot/Get-CIPPAPDevices.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -function Get-CIPPAPDevices { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting AutoPilot Devices for $CustomerTenantID" - $Endpoint = "/api/listapdevices" - $Params = @{ - tenantfilter = $CustomerTenantID - } - - Invoke-CIPPRestMethod -Endpoint $Endpoint -Params $Params - -} \ No newline at end of file diff --git a/public/Endpoint/Autopilot/Get-CIPPAutoPilotConfig.ps1 b/public/Endpoint/Autopilot/Get-CIPPAutoPilotConfig.ps1 deleted file mode 100644 index 0eb6fd2..0000000 --- a/public/Endpoint/Autopilot/Get-CIPPAutoPilotConfig.ps1 +++ /dev/null @@ -1,23 +0,0 @@ -function Get-CIPPAutoPilotConfig { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$Type - ) - - if ($Type -eq "ESP") { - Write-Verbose "Getting AutoPilot Status Page for $CustomerTenantID" - } elseif ($Type -eq "ApProfile"){ - Write-Verbose "Getting AutoPilot Profile for customer: $CustomerTenantID" - } - $Endpoint = "/api/listautopilotconfig" - $Params = @{ - tenantfilter = $CustomerTenantID - type = $Type - } - - Invoke-CIPPRestMethod -Endpoint $Endpoint -Params $Params -} - diff --git a/public/Endpoint/MEM/Set-CIPPMEMPolicy.ps1 b/public/Endpoint/MEM/Set-CIPPMEMPolicy.ps1 deleted file mode 100644 index bd7cf3a..0000000 --- a/public/Endpoint/MEM/Set-CIPPMEMPolicy.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -function Set-CIPPMEMPolicy { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$ID, - [Parameter(Mandatory = $false)] - [string]$DisplayName, - [Parameter(Mandatory = $false)] - [string]$Description, - [ValidateSet("allLicensedUsers", "AllDevices", "AllDevicesAndUsers")] - [string]$AssignTo - ) - - Write-Verbose "Getting app consent requests for customer: $CustomerTenantID" - $Endpoint = "/api/editpolicy" - - $body = @{ - Tenant = $CustomerTenantID - ID = $ID - displayname = $DisplayName - description = $Description - } - - Invoke-CIPPRestMethod -Endpoint $Endpoint -Body $body -Method 'POST' - -} \ No newline at end of file diff --git a/public/Endpoint/Reports/Get-CIPPDevices.ps1 b/public/Endpoint/Reports/Get-CIPPDevices.ps1 deleted file mode 100644 index c7006b7..0000000 --- a/public/Endpoint/Reports/Get-CIPPDevices.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPDevices { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting Devices for customer: $CustomerTenantID" - $endpoint = "/api/listdevices" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Identity/Administration/Get-CIPPRoles.ps1 b/public/Identity/Administration/Get-CIPPRoles.ps1 deleted file mode 100644 index 3bb6868..0000000 --- a/public/Identity/Administration/Get-CIPPRoles.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPRoles { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting roles for $CustomerTenantID" - $endpoint = "/api/listroles" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Identity/Administration/Groups/Get-CIPPGroupTemplates.ps1 b/public/Identity/Administration/Groups/Get-CIPPGroupTemplates.ps1 deleted file mode 100644 index 04baef0..0000000 --- a/public/Identity/Administration/Groups/Get-CIPPGroupTemplates.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -function Get-CIPPGroupTemplates { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $false)] - [string]$TemplateID - ) - - if ($TemplateID) { - Write-Verbose "Getting Group Template $TemplateID" - } else { - Write-Verbose "Getting all Group Templates" - } - - $endpoint = "/api/ListGroupTemplates" - $params = @{ - id = $TemplateID - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params - -} - diff --git a/public/Identity/Administration/Groups/Get-CIPPGroups.ps1 b/public/Identity/Administration/Groups/Get-CIPPGroups.ps1 deleted file mode 100644 index f3febfd..0000000 --- a/public/Identity/Administration/Groups/Get-CIPPGroups.ps1 +++ /dev/null @@ -1,49 +0,0 @@ -function Get-CIPPGroups { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $false)] - [GUID]$GroupID, - [Parameter(Mandatory = $false)] - [switch]$Members, - [Parameter(Mandatory = $false)] - [switch]$Owners - ) - - $switchCount = 0 - - if ($Members) { $switchCount++ } - if ($Owners) { $switchCount++ } - - if ($switchCount -gt 1) { - Write-Error "Only one role switch can be specified at a time." - return - } - - if (-not $GroupID) { - Write-Verbose "Getting all Groups for tenant $CustomerTenantID" - } elseif ($GroupID -and -not $Members -and -not $Owners) { - Write-Verbose "Getting Group Details for Group $GroupID" - } elseif ($GroupID -and $Members -and -not $Owners) { - Write-Verbose "Getting Group Members for Group $GroupID" - } elseif ($GroupID -and -not $Members -and $Owners) { - Write-Verbose "Getting Group Owners for Group $GroupID" - } - $endpoint = "/api/listgroups" - $params = @{ - tenantfilter = $CustomerTenantID - groupid = $GroupID - } - - if ($Members) { - $params.members = "true" - } - - if ($Owners) { - $params.owners = "true" - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Identity/Administration/Groups/Set-CIPPGroupDeliveryManagement.ps1 b/public/Identity/Administration/Groups/Set-CIPPGroupDeliveryManagement.ps1 deleted file mode 100644 index b44e9f7..0000000 --- a/public/Identity/Administration/Groups/Set-CIPPGroupDeliveryManagement.ps1 +++ /dev/null @@ -1,34 +0,0 @@ -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 - -} \ No newline at end of file diff --git a/public/Identity/Administration/Groups/Set-CIPPGroupHideFromGAL.ps1 b/public/Identity/Administration/Groups/Set-CIPPGroupHideFromGAL.ps1 deleted file mode 100644 index 34ce3e2..0000000 --- a/public/Identity/Administration/Groups/Set-CIPPGroupHideFromGAL.ps1 +++ /dev/null @@ -1,35 +0,0 @@ -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 - -} \ No newline at end of file diff --git a/public/Identity/Administration/Users/Add-CIPPUser.ps1 b/public/Identity/Administration/Users/Add-CIPPUser.ps1 deleted file mode 100644 index fff730a..0000000 --- a/public/Identity/Administration/Users/Add-CIPPUser.ps1 +++ /dev/null @@ -1,81 +0,0 @@ -function Add-CIPPUser { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$DisplayName, - [Parameter(Mandatory = $true)] - [string]$UserName, - [Parameter(Mandatory = $false)] - [bool]$AutoPassword = $true, - [Parameter(Mandatory = $true)] - [string]$FirstName, - [Parameter(Mandatory = $true)] - [string]$LastName, - [Parameter(Mandatory = $true)] - [string]$Domain, - [Parameter(Mandatory = $false)] - [string]$AddedAliases, - [Parameter(Mandatory = $false)] - [string]$CopyFrom, - [Parameter(Mandatory = $true)] - [string]$UsageLocation, - [Parameter(Mandatory = $false)] - [string]$Department, - [Parameter(Mandatory = $false)] - [string]$City, - [Parameter(Mandatory = $false)] - [string]$Country, - [Parameter(Mandatory = $false)] - [string]$Jobtitle, - [Parameter(Mandatory = $false)] - [string]$MobilePhone, - [Parameter(Mandatory = $false)] - [string]$StreetAddress, - [Parameter(Mandatory = $false)] - [string]$PostalCode, - [Parameter(Mandatory = $false)] - [string]$CompanyName, - [Parameter(Mandatory = $false)] - [bool]$MustChangePass = $true - - ) - - Write-Verbose "Adding User to $CustomerTenantID" - - $endpoint = "/api/adduser" - $body = @{ - tenantID = $CustomerTenantID - DisplayName = $DisplayName - UserName = $UserName - AutoPassword = $AutoPassword - FirstName = $FirstName - LastName = $LastName - Domain = $Domain - AddedAliases = $AddedAliases - CopyFrom = $CopyFrom - Usagelocation = $UsageLocation - MustChangePass = $MustChangePass - } - - $optionalParams = @{ - Country = $Country - PostalCode = $PostalCode - CompanyName = $CompanyName - StreetAddress = $StreetAddress - MobilePhone = $MobilePhone - Jobtitle = $Jobtitle - Department = $Department - City = $City - } - - foreach ($key in $optionalParams.Keys) { - if ($optionalParams[$key]) { - $body[$key] = $optionalParams[$key] - } - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Body $body -Method 'POST' -} - diff --git a/public/Identity/Administration/Users/Get-CIPPBECCheck.ps1 b/public/Identity/Administration/Users/Get-CIPPBECCheck.ps1 deleted file mode 100644 index 5b7a6c0..0000000 --- a/public/Identity/Administration/Users/Get-CIPPBECCheck.ps1 +++ /dev/null @@ -1,40 +0,0 @@ -function Get-CIPPBECCheck { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$UserID, - [Parameter(Mandatory = $true)] - [string]$UserName - - ) - - Write-Verbose "Running BEC Check for $Username" - - $endpoint = "/api/execbeccheck" - $params = @{ - tenantfilter = $CustomerTenantID - userId = $UserID - username = $UserName - } - - $initialResponse = Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params - $GUID = $initialResponse.guid - - Write-Verbose "Initial check complete. GUID returned: $GUID" - $params.guid = $GUID - - do { - Start-Sleep -Seconds 10 - $response = Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params - - if ($response.waiting -eq "True") { - Write-Verbose "BEC Check Still Running." - } else { - Write-Verbose "BEC Check complete" - return $response - } - } while ($response.waiting -eq "True") -} - diff --git a/public/Identity/Administration/Users/Get-CIPPDeletedItems.ps1 b/public/Identity/Administration/Users/Get-CIPPDeletedItems.ps1 deleted file mode 100644 index 50bdb85..0000000 --- a/public/Identity/Administration/Users/Get-CIPPDeletedItems.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -function Get-CIPPDeletedItems { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting deleted items for $CustomerTenantID" - - $endpoint = "/api/listdeleteditems" - $params = @{ - tenantfilter = $CustomerTenantID - userId = $UserID - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Identity/Administration/Users/Get-CIPPUniversalSearch.ps1 b/public/Identity/Administration/Users/Get-CIPPUniversalSearch.ps1 deleted file mode 100644 index 7550b51..0000000 --- a/public/Identity/Administration/Users/Get-CIPPUniversalSearch.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -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 -} - diff --git a/public/Identity/Administration/Users/Get-CIPPUserCAPolicies.ps1 b/public/Identity/Administration/Users/Get-CIPPUserCAPolicies.ps1 deleted file mode 100644 index c8ca803..0000000 --- a/public/Identity/Administration/Users/Get-CIPPUserCAPolicies.ps1 +++ /dev/null @@ -1,20 +0,0 @@ -function Get-CIPPUserCAPolicies { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$UserID - ) - - - Write-Verbose "Getting user CA Policies $CustomerTenantID" - - $endpoint = "/api/listuserconditionalaccesspolicies" - $params = @{ - tenantfilter = $CustomerTenantID - userId = $UserID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Identity/Administration/Users/Get-CIPPUserCounts.ps1 b/public/Identity/Administration/Users/Get-CIPPUserCounts.ps1 deleted file mode 100644 index 6a413b7..0000000 --- a/public/Identity/Administration/Users/Get-CIPPUserCounts.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPUserCounts { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting User Counts for $CustomerTenantID" - $endpoint = "/api/listusercounts" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Identity/Administration/Users/Get-CIPPUserDevices.ps1 b/public/Identity/Administration/Users/Get-CIPPUserDevices.ps1 deleted file mode 100644 index 81fad8b..0000000 --- a/public/Identity/Administration/Users/Get-CIPPUserDevices.ps1 +++ /dev/null @@ -1,20 +0,0 @@ -function Get-CIPPUserDevices { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$UserID - ) - - - Write-Verbose "Getting user devices for $userID" - - $endpoint = "/api/listuserdevices" - $params = @{ - tenantfilter = $CustomerTenantID - userId = $UserID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Identity/Administration/Users/Get-CIPPUserGroups.ps1 b/public/Identity/Administration/Users/Get-CIPPUserGroups.ps1 deleted file mode 100644 index 84de863..0000000 --- a/public/Identity/Administration/Users/Get-CIPPUserGroups.ps1 +++ /dev/null @@ -1,20 +0,0 @@ -function Get-CIPPUserGroups { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$UserID - ) - - - Write-Verbose "Getting user groups for $userID" - - $endpoint = "/api/listusergroups" - $params = @{ - tenantfilter = $CustomerTenantID - userId = $UserID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Identity/Administration/Users/Get-CIPPUserPhoto.ps1 b/public/Identity/Administration/Users/Get-CIPPUserPhoto.ps1 deleted file mode 100644 index 4a1a892..0000000 --- a/public/Identity/Administration/Users/Get-CIPPUserPhoto.ps1 +++ /dev/null @@ -1,20 +0,0 @@ -function Get-CIPPUserPhoto { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$UserID - ) - - - Write-Verbose "Getting user photo for $userID" - - $endpoint = "/api/listuserphoto" - $params = @{ - tenantfilter = $CustomerTenantID - userId = $UserID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Identity/Administration/Users/Get-CIPPUserSignIns.ps1 b/public/Identity/Administration/Users/Get-CIPPUserSignIns.ps1 deleted file mode 100644 index 618b2a4..0000000 --- a/public/Identity/Administration/Users/Get-CIPPUserSignIns.ps1 +++ /dev/null @@ -1,19 +0,0 @@ -function Get-CIPPUserSignIns { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [guid]$UserID - ) - - Write-Verbose "Getting sign in logs for User $userID" - - $endpoint = "/api/listusersigninlogs" - $params = @{ - tenantfilter = $CustomerTenantID - userId = $UserID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Identity/Administration/Users/Get-CIPPUsers.ps1 b/public/Identity/Administration/Users/Get-CIPPUsers.ps1 deleted file mode 100644 index 8a4ba72..0000000 --- a/public/Identity/Administration/Users/Get-CIPPUsers.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -function Get-CIPPUsers { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $false)] - [string]$UserID - ) - - if (-not $UserID) { - Write-Verbose "Getting all users for tenant $CustomerTenantID" - } else { - Write-Verbose "Getting user details for user $UserID" - } - $endpoint = "/api/Listusers" - $params = @{ - tenantfilter = $CustomerTenantID - userId = $UserID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Identity/Administration/Users/Send-CIPPPush.ps1 b/public/Identity/Administration/Users/Send-CIPPPush.ps1 deleted file mode 100644 index b32a1d9..0000000 --- a/public/Identity/Administration/Users/Send-CIPPPush.ps1 +++ /dev/null @@ -1,19 +0,0 @@ -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 -} - diff --git a/public/Identity/Administration/Users/Set-CIPPClrImmID.ps1 b/public/Identity/Administration/Users/Set-CIPPClrImmID.ps1 deleted file mode 100644 index bda4f77..0000000 --- a/public/Identity/Administration/Users/Set-CIPPClrImmID.ps1 +++ /dev/null @@ -1,19 +0,0 @@ -function Set-CIPPClrImmID { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [guid]$UserID - ) - - Write-Verbose "Clearing Immutable ID for User: $userID" - - $endpoint = "/api/execclrimmid" - $params = @{ - tenantfilter = $CustomerTenantID - Id = $UserID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Identity/Administration/Users/Set-CIPPCreateTap.ps1 b/public/Identity/Administration/Users/Set-CIPPCreateTap.ps1 deleted file mode 100644 index ad8764c..0000000 --- a/public/Identity/Administration/Users/Set-CIPPCreateTap.ps1 +++ /dev/null @@ -1,19 +0,0 @@ -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 -} - diff --git a/public/Identity/Administration/Users/Set-CIPPResetPassword.ps1 b/public/Identity/Administration/Users/Set-CIPPResetPassword.ps1 deleted file mode 100644 index bd30ce3..0000000 --- a/public/Identity/Administration/Users/Set-CIPPResetPassword.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -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 -} - diff --git a/public/Identity/Administration/Users/Set-CIPPRestoreDeletedUser.ps1 b/public/Identity/Administration/Users/Set-CIPPRestoreDeletedUser.ps1 deleted file mode 100644 index af7e073..0000000 --- a/public/Identity/Administration/Users/Set-CIPPRestoreDeletedUser.ps1 +++ /dev/null @@ -1,19 +0,0 @@ -function Set-CIPPRestoreDeletedUser { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$ID - ) - - Write-Verbose "Restoring user: $ID" - - $endpoint = "/api/execrestoredeleted" - $params = @{ - tenantfilter = $CustomerTenantID - Id = $ID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Identity/Administration/Users/Set-CIPPRevokeSessions.ps1 b/public/Identity/Administration/Users/Set-CIPPRevokeSessions.ps1 deleted file mode 100644 index 309bdfc..0000000 --- a/public/Identity/Administration/Users/Set-CIPPRevokeSessions.ps1 +++ /dev/null @@ -1,19 +0,0 @@ -function Set-CIPPRevokeSessions { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$UserID - ) - - Write-Verbose "Revoking Sessions for user: $UserID" - - $endpoint = "/api/execrevokesessions" - $params = @{ - tenantfilter = $CustomerTenantID - Id = $UserID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Identity/Administration/Users/Set-CIPPSignInStatus.ps1 b/public/Identity/Administration/Users/Set-CIPPSignInStatus.ps1 deleted file mode 100644 index 8a46a7f..0000000 --- a/public/Identity/Administration/Users/Set-CIPPSignInStatus.ps1 +++ /dev/null @@ -1,30 +0,0 @@ -function Set-CIPPSignInStatus { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [string]$UserID, - [Parameter(Mandatory = $true)] - [ValidateSet( - "true", - "false" - )] - [string]$Enable - - ) - - if ($Enable -eq "true") { - Write-Verbose "Enabling signin for $UserID" - } else { - Write-Verbose "Disabling signin for $UserID" - } - $endpoint = "/api/execdisableuser" - $params = @{ - tenantfilter = $CustomerTenantID - Id = $UserID - Enable = $Enable - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Identity/Reports/Get-CIPPBasicAuth.ps1 b/public/Identity/Reports/Get-CIPPBasicAuth.ps1 deleted file mode 100644 index d8722ad..0000000 --- a/public/Identity/Reports/Get-CIPPBasicAuth.ps1 +++ /dev/null @@ -1,14 +0,0 @@ -function Get-CIPPBasicAuth { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting Basic Auth for customer: $CustomerTenantID" - $Endpoint = "/api/listbasicauth" - $Params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $Endpoint -Params $Params -} \ No newline at end of file diff --git a/public/Identity/Reports/Get-CIPPInactiveAccounts.ps1 b/public/Identity/Reports/Get-CIPPInactiveAccounts.ps1 deleted file mode 100644 index 79a0890..0000000 --- a/public/Identity/Reports/Get-CIPPInactiveAccounts.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPInactiveAccounts { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting inactive accounts for customer: $CustomerTenantID" - $endpoint = "/api/listinactiveaccounts" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Identity/Reports/Get-CIPPMFAUsers.ps1 b/public/Identity/Reports/Get-CIPPMFAUsers.ps1 deleted file mode 100644 index e744f5c..0000000 --- a/public/Identity/Reports/Get-CIPPMFAUsers.ps1 +++ /dev/null @@ -1,14 +0,0 @@ -function Get-CIPPMFAUsers { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting MFA users for $CustomerTenantID" - $endpoint = "/api/listmfausers" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file diff --git a/public/Identity/Reports/Get-CIPPSignIns.ps1 b/public/Identity/Reports/Get-CIPPSignIns.ps1 deleted file mode 100644 index 41c37f6..0000000 --- a/public/Identity/Reports/Get-CIPPSignIns.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -function Get-CIPPSignIns { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $false)] - [switch]$failedlogononly, - [Parameter(Mandatory = $false)] - [string]$filter - ) - - Write-Verbose "Getting Signins for $CustomerTenantID" - $endpoint = "/api/listsignins" - $params = @{ - tenantfilter = $CustomerTenantID - filter = $filter - } - - if ($failedlogononly) { - $params.failedlogononly = "true" - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Intune/Device/Get-CIPPGetBitLockerKey.ps1 b/public/Intune/Device/Get-CIPPGetBitLockerKey.ps1 deleted file mode 100644 index 4ccd5ef..0000000 --- a/public/Intune/Device/Get-CIPPGetBitLockerKey.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -Function Get-CIPPGetBitLockerKey { - [CmdletBinding()] - param ( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [guid]$guid - ) - - Write-Verbose "Getting bitlocker key for computer: $guid" - - # Define the endpoint and parameters - $endpoint = "/api/execgetrecoverykey" - $params = @{ - tenantfilter = $CustomerTenantID - guid = $guid - } - - # Use the Invoke-CIPPRequest function to make the request - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file diff --git a/public/Intune/Device/Get-CIPPIntuneIntents.ps1 b/public/Intune/Device/Get-CIPPIntuneIntents.ps1 deleted file mode 100644 index 89ad2f1..0000000 --- a/public/Intune/Device/Get-CIPPIntuneIntents.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -Function Get-CIPPIntuneIntents { - [CmdletBinding()] - param ( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting Intune Intents customer: $CustomerTenantID" - - # Define the endpoint and parameters - $endpoint = "/api/listintuneintents" - $params = @{ - tenantfilter = $CustomerTenantID - } - - # Use the Invoke-CIPPRequest function to make the request - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file diff --git a/public/Intune/Device/Get-CIPPIntunePolicy.ps1 b/public/Intune/Device/Get-CIPPIntunePolicy.ps1 deleted file mode 100644 index 78dee23..0000000 --- a/public/Intune/Device/Get-CIPPIntunePolicy.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -Function Get-CIPPIntunePolicy { - [CmdletBinding()] - param ( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $false)] - [string]$PolicyID, - [Parameter(Mandatory = $false)] - [string]$Urlname - ) - - Write-Verbose "Getting Intune policies for customer: $CustomerTenantID" - - # Validation to ensure both $PolicyID and $urlname are supplied together - if (($PolicyID -and -not $urlname) -or (-not $PolicyID -and $urlname)) { - throw "You must supply both -PolicyID and -Urlname parameters together or not at all." - } - - # Define the endpoint and parameters - $endpoint = "/api/listintunepolicy" - $params = @{ - tenantfilter = $CustomerTenantID - URLName = $urlname - id = $PolicyID - } - - # Use the Invoke-CIPPRequest function to make the request - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file diff --git a/public/Intune/Device/Get-CIPPIntuneTemplates.ps1 b/public/Intune/Device/Get-CIPPIntuneTemplates.ps1 deleted file mode 100644 index 6c5eeaa..0000000 --- a/public/Intune/Device/Get-CIPPIntuneTemplates.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPIntuneTemplates { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $false)] - [string]$TemplateID - ) - - Write-Verbose "Getting Intune Templates" - $endpoint = "/api/listintunetemplates" - $params = @{ - tenantfilter = $CustomerTenantID - id = $TemplateID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file diff --git a/public/Intune/Device/Get-CIPPLocalAdminPassword.ps1 b/public/Intune/Device/Get-CIPPLocalAdminPassword.ps1 deleted file mode 100644 index 2e8c15f..0000000 --- a/public/Intune/Device/Get-CIPPLocalAdminPassword.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -Function Get-CIPPLocalAdminPassword { - [CmdletBinding()] - param ( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $true)] - [guid]$guid - ) - - Write-Verbose "Getting local admin password for computer: $guid" - - # Define the endpoint and parameters - $endpoint = "/api/execgetlocaladminpassword" - $params = @{ - tenantfilter = $CustomerTenantID - guid = $guid - } - - # Use the Invoke-CIPPRequest function to make the request - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file diff --git a/public/Security/Defender/Get-CIPPDefenderState.ps1 b/public/Security/Defender/Get-CIPPDefenderState.ps1 deleted file mode 100644 index 0597f7f..0000000 --- a/public/Security/Defender/Get-CIPPDefenderState.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPDefenderState { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [Guid]$CustomerTenantID - ) - - Write-Verbose "Getting Defender State for customer: $CustomerTenantID" - $endpoint = "/api/listdefenderstate" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params - -} \ No newline at end of file diff --git a/public/Security/Defender/Get-CIPPDefenderTVM.ps1 b/public/Security/Defender/Get-CIPPDefenderTVM.ps1 deleted file mode 100644 index 187209e..0000000 --- a/public/Security/Defender/Get-CIPPDefenderTVM.ps1 +++ /dev/null @@ -1,14 +0,0 @@ -function Get-CIPPDefenderTVM { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting Defender TVM for customer: $CustomerTenantID" - $endpoint = "/api/listdefendertvm" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file diff --git a/public/Security/Incidents/Get-CIPPAlertsList.ps1 b/public/Security/Incidents/Get-CIPPAlertsList.ps1 deleted file mode 100644 index aa11247..0000000 --- a/public/Security/Incidents/Get-CIPPAlertsList.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPAlertsList { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting Alerts for customer: $CustomerTenantID" - $endpoint = "/api/execalertslist" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Security/Incidents/Get-CIPPIncidentList.ps1 b/public/Security/Incidents/Get-CIPPIncidentList.ps1 deleted file mode 100644 index 974887d..0000000 --- a/public/Security/Incidents/Get-CIPPIncidentList.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPIncidentList { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting Incidents for customer: $CustomerTenantID" - $endpoint = "/api/execincidentslist" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Security/Reports/Get-CIPPDeviceCompliance.ps1 b/public/Security/Reports/Get-CIPPDeviceCompliance.ps1 deleted file mode 100644 index 6a1b679..0000000 --- a/public/Security/Reports/Get-CIPPDeviceCompliance.ps1 +++ /dev/null @@ -1,14 +0,0 @@ -function Get-CIPPDeviceCompliance { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting Device Compliance for $CustomerTenantID" - $endpoint = "/api/listalltenantdevicecompliance" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file diff --git a/public/Set-CIPPAPIDetails.ps1 b/public/Set-CIPPAPIDetails.ps1 deleted file mode 100644 index bf3fd9e..0000000 --- a/public/Set-CIPPAPIDetails.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -function Set-CIPPAPIDetails { - [CmdletBinding()] - Param( - [Parameter(ParameterSetName = 'CIPP', Mandatory = $true)] - [string]$CIPPClientID, - [Parameter(ParameterSetName = 'CIPP', Mandatory = $true)] - [String]$CIPPClientSecret, - [Parameter(ParameterSetName = 'CIPP', Mandatory = $true)] - [String]$CIPPAPIUrl, - [Parameter(ParameterSetName = 'CIPP', Mandatory = $true)] - [String]$TenantID - ) - write-Verbose "Setting CIPP API Keys" - $script:CIPPClientID = $CIPPClientID - $script:CIPPClientSecret = $CIPPClientSecret - $script:CIPPAPIUrl = $CIPPAPIUrl - $script:TenantID = $TenantID -} \ No newline at end of file diff --git a/public/Teams-Sharepoint/Sharepoint/Get-CIPPSharePointQuota.ps1 b/public/Teams-Sharepoint/Sharepoint/Get-CIPPSharePointQuota.ps1 deleted file mode 100644 index 7f1264e..0000000 --- a/public/Teams-Sharepoint/Sharepoint/Get-CIPPSharePointQuota.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPSharePointQuota { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting SharePoint quota for $CustomerTenantID" - $endpoint = "/api/listsharepointquota" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Teams-Sharepoint/Sharepoint/Get-CIPPSharePointSites.ps1 b/public/Teams-Sharepoint/Sharepoint/Get-CIPPSharePointSites.ps1 deleted file mode 100644 index 7714a66..0000000 --- a/public/Teams-Sharepoint/Sharepoint/Get-CIPPSharePointSites.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -function Get-CIPPSharePointSites { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $false)] - [switch]$urlonly, - [Parameter(Mandatory = $false)] - [string]$UserUPN - - ) - - Write-Verbose "Getting sites for $CustomerTenantID" - $endpoint = "/api/listsites" - $params = @{ - tenantfilter = $CustomerTenantID - type = "SharePointSiteUsage" - userupn = $UserUPN - } - - if ($urlonly) { - $params.URLOnly = "true" - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Teams-Sharepoint/Teams/Get-CIPPTeams.ps1 b/public/Teams-Sharepoint/Teams/Get-CIPPTeams.ps1 deleted file mode 100644 index f8a0e64..0000000 --- a/public/Teams-Sharepoint/Teams/Get-CIPPTeams.ps1 +++ /dev/null @@ -1,20 +0,0 @@ -function Get-CIPPTeams { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $false)] - [string]$ID - ) - - Write-Verbose "Getting teams sites for $CustomerTenantID" - $endpoint = "/api/listteams" - $params = @{ - tenantfilter = $CustomerTenantID - type = if ($ID) { "team" } else { "list" } - ID = $id - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Teams-Sharepoint/Teams/Get-CIPPTeamsActivity.ps1 b/public/Teams-Sharepoint/Teams/Get-CIPPTeamsActivity.ps1 deleted file mode 100644 index af7fbab..0000000 --- a/public/Teams-Sharepoint/Teams/Get-CIPPTeamsActivity.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -function Get-CIPPTeamsActivity { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting teams activity $CustomerTenantID" - $endpoint = "/api/listteamsactivity" - $params = @{ - tenantfilter = $CustomerTenantID - type = "TeamsUserActivityUser" - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Teams-Sharepoint/Teams/Get-CIPPTeamsVoice.ps1 b/public/Teams-Sharepoint/Teams/Get-CIPPTeamsVoice.ps1 deleted file mode 100644 index c74b72b..0000000 --- a/public/Teams-Sharepoint/Teams/Get-CIPPTeamsVoice.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -function Get-CIPPTeamsVoice { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting teams voice $CustomerTenantID" - $endpoint = "/api/listteamsvoice" - $params = @{ - tenantfilter = $CustomerTenantID - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Tenant/Administration/Alerts/Get-CIPPAlerts.ps1 b/public/Tenant/Administration/Alerts/Get-CIPPAlerts.ps1 deleted file mode 100644 index 5c7dd68..0000000 --- a/public/Tenant/Administration/Alerts/Get-CIPPAlerts.ps1 +++ /dev/null @@ -1,12 +0,0 @@ -function Get-CIPPAlerts { - [CmdletBinding()] - param () - - Write-Verbose "Getting CIPP Alerts" - - # Define the endpoint and parameters - $endpoint = "/api/getcippalerts" - - Invoke-CIPPRestMethod -Endpoint $endpoint -} - diff --git a/public/Tenant/Administration/Get-CIPPAppConsentReqs.ps1 b/public/Tenant/Administration/Get-CIPPAppConsentReqs.ps1 deleted file mode 100644 index 61c05e3..0000000 --- a/public/Tenant/Administration/Get-CIPPAppConsentReqs.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -function Get-CIPPAppConsentReqs { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting app consent requests for customer: $CustomerTenantID" - $Endpoint = "/api/listappconsentrequests" - $Params = @{ - tenantfilter = $CustomerTenantID - } - - Invoke-CIPPRestMethod -Endpoint $Endpoint -Params $Params - -} \ No newline at end of file diff --git a/public/Tenant/Administration/Tenant/Get-CIPPOrg.ps1 b/public/Tenant/Administration/Tenant/Get-CIPPOrg.ps1 deleted file mode 100644 index de954b7..0000000 --- a/public/Tenant/Administration/Tenant/Get-CIPPOrg.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPOrg { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting org $CustomerTenantID" - $endpoint = "/api/listorg" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Tenant/Administration/Tenant/Get-CIPPPartnerRelationships.ps1 b/public/Tenant/Administration/Tenant/Get-CIPPPartnerRelationships.ps1 deleted file mode 100644 index 1936025..0000000 --- a/public/Tenant/Administration/Tenant/Get-CIPPPartnerRelationships.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPPartnerRelationships { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting org $CustomerTenantID" - $endpoint = "/api/listpartnerrelationships" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Tenant/Administration/Tenant/Get-CIPPTenantDetails.ps1 b/public/Tenant/Administration/Tenant/Get-CIPPTenantDetails.ps1 deleted file mode 100644 index 5e778e6..0000000 --- a/public/Tenant/Administration/Tenant/Get-CIPPTenantDetails.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPTenantDetails { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting Tenant Details for $CustomerTenantID" - $endpoint = "/api/ListTenantDetails" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Tenant/Administration/Tenant/Get-CIPPTenants.ps1 b/public/Tenant/Administration/Tenant/Get-CIPPTenants.ps1 deleted file mode 100644 index d641d3e..0000000 --- a/public/Tenant/Administration/Tenant/Get-CIPPTenants.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -function Get-CIPPTenants { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $false)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $false)] - [switch]$ClearCache, - [Parameter(Mandatory = $false)] - [switch]$TriggerRefresh - ) - - Write-Verbose "Getting Tenants" - $endpoint = "/api/listtenants" - $params = @{ - tenantfilter = $CustomerTenantID - } - - if ($ClearCache) { - $params.ClearCache = "true" - } - - if ($TriggerRefresh) { - $params.TriggerRefresh = "true" - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Tenant/Conditional/Get-CIPPCAPolicies.ps1 b/public/Tenant/Conditional/Get-CIPPCAPolicies.ps1 deleted file mode 100644 index 2cecdef..0000000 --- a/public/Tenant/Conditional/Get-CIPPCAPolicies.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -function Get-CIPPCAPolicies { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting Conditional Access Policies for customer: $CustomerTenantID" - $Endpoint = "/api/listconditionalaccesspolicies" - $Params = @{ - tenantfilter = $CustomerTenantID - } - - Invoke-CIPPRestMethod -Endpoint $Endpoint -Params $Params - -} \ No newline at end of file diff --git a/public/Tenant/Conditional/Get-CIPPCATemplates.ps1 b/public/Tenant/Conditional/Get-CIPPCATemplates.ps1 deleted file mode 100644 index b4950d2..0000000 --- a/public/Tenant/Conditional/Get-CIPPCATemplates.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -function Get-CIPPCATemplates { - [CmdletBinding()] - Param() - Write-Verbose "Getting Conditional Access Templates" - $endpoint = "/api/listcatemplates" - - Invoke-CIPPRestMethod -Endpoint $endpoint - -} - diff --git a/public/Tenant/Conditional/Get-CIPPNamedLocations.ps1 b/public/Tenant/Conditional/Get-CIPPNamedLocations.ps1 deleted file mode 100644 index 572b451..0000000 --- a/public/Tenant/Conditional/Get-CIPPNamedLocations.ps1 +++ /dev/null @@ -1,14 +0,0 @@ -function Get-CIPPNamedLocations { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting named locations for $CustomerTenantID" - $endpoint = "/api/listnamedlocations" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file diff --git a/public/Tenant/Conditional/Set-CIPPCAPolicy.ps1 b/public/Tenant/Conditional/Set-CIPPCAPolicy.ps1 deleted file mode 100644 index 0c4b745..0000000 --- a/public/Tenant/Conditional/Set-CIPPCAPolicy.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -function Set-CIPPCAPolicy { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [ValidateSet("Enabled", "Disabled")] - [string]$State, - [Parameter(Mandatory = $true)] - [guid]$Guid - ) - - Write-Verbose "Editing CA Policy for tenant $CustomerTenantID" - $endpoint = "/api/editcapolicy" - $params = @{ - tenantfilter = $CustomerTenantID - state = $State - guid = $Guid - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Tenant/GDAP/Remove-CIPPGDAPRelationship.ps1 b/public/Tenant/GDAP/Remove-CIPPGDAPRelationship.ps1 deleted file mode 100644 index 045b9e5..0000000 --- a/public/Tenant/GDAP/Remove-CIPPGDAPRelationship.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -function Remove-CIPPGDAPRelationship { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$GDAPID - ) - - Write-Verbose "Terminating GDAP Relationship: $GDAPID" - $Endpoint = "/api/execdeletegdaprelationship" - $Params = @{ - gdapid = $GDAPID - } - - Invoke-CIPPRestMethod -Endpoint $Endpoint -Params $Params - -} \ No newline at end of file diff --git a/public/Tenant/Reports/Get-CIPPLicenses.ps1 b/public/Tenant/Reports/Get-CIPPLicenses.ps1 deleted file mode 100644 index b65cce6..0000000 --- a/public/Tenant/Reports/Get-CIPPLicenses.ps1 +++ /dev/null @@ -1,14 +0,0 @@ -function Get-CIPPLicenses { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting Licenses for $CustomerTenantID" - $endpoint = "/api/ListLicenses" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file diff --git a/public/Tenant/Reports/Get-CIPPOAuthApps.ps1 b/public/Tenant/Reports/Get-CIPPOAuthApps.ps1 deleted file mode 100644 index f8f166f..0000000 --- a/public/Tenant/Reports/Get-CIPPOAuthApps.ps1 +++ /dev/null @@ -1,14 +0,0 @@ -function Get-CIPPOAuthApps { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting OAuth apps for $CustomerTenantID" - $endpoint = "/api/listoauthapps" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file diff --git a/public/Tenant/Standards/Get-CIPPBPA.ps1 b/public/Tenant/Standards/Get-CIPPBPA.ps1 deleted file mode 100644 index 62294e8..0000000 --- a/public/Tenant/Standards/Get-CIPPBPA.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -function Get-CIPPBPA { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID, - [Parameter(Mandatory = $false)] - [string]$ReportName - ) - - Write-Verbose "Getting BPA Report for customer: $CustomerTenantID" - $Endpoint = "/api/listbpa" - $Params = @{ - tenantfilter = $CustomerTenantID - Report = $ReportName - } - - Invoke-CIPPRestMethod -Endpoint $Endpoint -Params $Params -} \ No newline at end of file diff --git a/public/Tenant/Standards/Get-CIPPBPATemplates.ps1 b/public/Tenant/Standards/Get-CIPPBPATemplates.ps1 deleted file mode 100644 index 2ea6ce8..0000000 --- a/public/Tenant/Standards/Get-CIPPBPATemplates.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -function Get-CIPPBPATemplates { - [CmdletBinding()] - Param() - - Write-Verbose "Getting BPA Templates" - $Endpoint = "/api/listbpatemplates" - - Invoke-CIPPRestMethod -Endpoint $Endpoint - -} \ No newline at end of file diff --git a/public/Tenant/Standards/Get-CIPPDomainAnalyser.ps1 b/public/Tenant/Standards/Get-CIPPDomainAnalyser.ps1 deleted file mode 100644 index e342a46..0000000 --- a/public/Tenant/Standards/Get-CIPPDomainAnalyser.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPDomainAnalyser { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting Domain Analyser List for customer: $CustomerTenantID" - $endpoint = "/api/ListDomainAnalyser" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Tenant/Standards/Get-CIPPDomainHealth.ps1 b/public/Tenant/Standards/Get-CIPPDomainHealth.ps1 deleted file mode 100644 index 1682c59..0000000 --- a/public/Tenant/Standards/Get-CIPPDomainHealth.ps1 +++ /dev/null @@ -1,20 +0,0 @@ -function Get-CIPPDomainHealth { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$DomainName, - [Parameter(Mandatory = $true)] - [ValidateSet("ReadWhoisRecord", "ReadNSRecord", "ReadMXRecord", "ReadSpfRecord", "ReadDmarcPolicy", "ReadDkimRecord", "TestDNSSEC", "TestMtaSts")] - [string]$Action - ) - - Write-Verbose "Getting Domain Health for $DomainName with action $Action" - - $endpoint = "/api/listdomainhealth" - $params = @{ - Domain = $DomainName - Action = $action - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file diff --git a/public/Tenant/Standards/Get-CIPPStandards.ps1 b/public/Tenant/Standards/Get-CIPPStandards.ps1 deleted file mode 100644 index 64fe21a..0000000 --- a/public/Tenant/Standards/Get-CIPPStandards.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPStandards { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantID - ) - - Write-Verbose "Getting standards for $CustomerTenantID" - $endpoint = "/api/liststandards" - $params = @{ - tenantfilter = $CustomerTenantID - } - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} - diff --git a/public/Tenant/Tools/Get-CIPPAuditLogTest.ps1 b/public/Tenant/Tools/Get-CIPPAuditLogTest.ps1 deleted file mode 100644 index 145b059..0000000 --- a/public/Tenant/Tools/Get-CIPPAuditLogTest.ps1 +++ /dev/null @@ -1,19 +0,0 @@ -function Get-CIPPAuditLogTest { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$CustomerTenantId, - [Parameter(Mandatory = $true)] - [validateset('Audit.Exchange','Audit.AzureActiveDirectory')] - [string]$LogType - ) - - Write-Verbose "Looking up $LogType logs for tenant $CustomerTenantId" - $endpoint = "/api/ListAuditLogTest" - $params = @{ - TenantFilter = $CustomerTenantId - LogType = $LogType - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file diff --git a/public/Tenant/Tools/Get-CIPPExternalGEOIPLookup.ps1 b/public/Tenant/Tools/Get-CIPPExternalGEOIPLookup.ps1 deleted file mode 100644 index 08d5823..0000000 --- a/public/Tenant/Tools/Get-CIPPExternalGEOIPLookup.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -function Get-CIPPExternalGEOIPLookup { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [ValidatePattern('^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$|^((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){1,7}:)|(([0-9A-Fa-f]{1,4}:){1,6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,5}(:[0-9A-Fa-f]{1,4}){1,2})|(([0-9A-Fa-f]{1,4}:){1,4}(:[0-9A-Fa-f]{1,4}){1,3})|(([0-9A-Fa-f]{1,4}:){1,3}(:[0-9A-Fa-f]{1,4}){1,4})|(([0-9A-Fa-f]{1,4}:){1,2}(:[0-9A-Fa-f]{1,4}){1,5})|(([0-9A-Fa-f]{1,4}:):(:[0-9A-Fa-f]{1,4}){1,6})|(::([0-9A-Fa-f]{1,4}:){1,7}))$')] - [string]$IP - ) - - Write-Verbose "Looking up $ip in Geo DB" - $endpoint = "/api/execgeoiplookup" - $params = @{ - ip = $IP - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file diff --git a/public/Tenant/Tools/Get-CIPPExternalTenantInfo.ps1 b/public/Tenant/Tools/Get-CIPPExternalTenantInfo.ps1 deleted file mode 100644 index b99bf80..0000000 --- a/public/Tenant/Tools/Get-CIPPExternalTenantInfo.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -function Get-CIPPExternalTenantInfo { - [CmdletBinding()] - Param( - [Parameter(Mandatory = $true)] - [string]$Tenant - ) - - Write-Verbose "Getting Tenant info for $Tenant" - $endpoint = "/api/ListExternalTenantInfo" - $params = @{ - tenant = $Tenant - } - - Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -} \ No newline at end of file