diff --git a/DuoSecurity/Private/Argument Completers/IntegrationTypes.json b/DuoSecurity/Private/Argument Completers/IntegrationTypes.json deleted file mode 100644 index 46b134b..0000000 --- a/DuoSecurity/Private/Argument Completers/IntegrationTypes.json +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/DuoSecurity/Public/Accounts API/Remove-DuoAccount.ps1 b/DuoSecurity/Public/Accounts API/Remove-DuoAccount.ps1 index bb0f93d..66af9d7 100644 --- a/DuoSecurity/Public/Accounts API/Remove-DuoAccount.ps1 +++ b/DuoSecurity/Public/Accounts API/Remove-DuoAccount.ps1 @@ -28,15 +28,17 @@ function Remove-DuoAccount { [string]$AccountId ) - $DuoRequest = @{ - Method = 'POST' - Path = '/accounts/v1/account/delete' - Params = @{ - account_id = $AccountId + process { + $DuoRequest = @{ + Method = 'POST' + Path = '/accounts/v1/account/delete' + Params = @{ + account_id = $AccountId + } } - } - if ($PSCmdlet.ShouldProcess($AccountId)) { - Invoke-DuoRequest @DuoRequest + if ($PSCmdlet.ShouldProcess($AccountId)) { + Invoke-DuoRequest @DuoRequest + } } } diff --git a/DuoSecurity/Public/Admin API/Administrators/Sync-DuoAdminFromDirectory.ps1 b/DuoSecurity/Public/Admin API/Administrators/Sync-DuoAdminFromDirectory.ps1 index 397f2b1..35fa52f 100644 --- a/DuoSecurity/Public/Admin API/Administrators/Sync-DuoAdminFromDirectory.ps1 +++ b/DuoSecurity/Public/Admin API/Administrators/Sync-DuoAdminFromDirectory.ps1 @@ -4,7 +4,7 @@ function Sync-DuoAdminFromDirectory { Synchronize Admin from Directory .DESCRIPTION - Initiate a sync to create, update, or mark for deletion the administrator specified by email against the directory specified by the directory_key. The directory_key for a directory can be found by navigating to Administrators → Admin Directory Sync in the Duo Admin Panel, and then clicking on the configured directory. Learn more about syncing individual admins from Active Directory, OpenLDAP, or Azure Active Directory. Requires "Grant administrators" API permission. + Initiate a sync to create, update, or mark for deletion the administrator specified by email against the directory specified by the directory_key. The directory_key for a directory can be found by navigating to Administrators -> Admin Directory Sync in the Duo Admin Panel, and then clicking on the configured directory. Learn more about syncing individual admins from Active Directory, OpenLDAP, or Azure Active Directory. Requires "Grant administrators" API permission. .PARAMETER DirectoryKey The directory key to sync from diff --git a/DuoSecurity/Public/Admin API/Custom Branding/Set-DuoCustomMessaging.ps1 b/DuoSecurity/Public/Admin API/Custom Branding/Set-DuoCustomMessaging.ps1 index 918db12..c8559be 100644 --- a/DuoSecurity/Public/Admin API/Custom Branding/Set-DuoCustomMessaging.ps1 +++ b/DuoSecurity/Public/Admin API/Custom Branding/Set-DuoCustomMessaging.ps1 @@ -7,13 +7,13 @@ function Set-DuoCustomBranding { Updates current custom messaging settings, shown to users in the Universal Prompt. These settings can also be viewed and set in the Duo Admin Panel. Supersedes the helpdesk_message Settings parameter. Requires "Grant settings" API permission. .PARAMETER HelpLinks - A comma-separated list of up to two custom external links shown to users in the Universal Prompt. Each URL must begin with http:// or https://. + A comma-separated list of up to two custom external links shown to users in the Universal Prompt. Each URL must begin with http:// or https:// .PARAMETER HelpText Customized text string associated with the specified locale. The user's browser's preferred language settings determine which language to show in the Universal Prompt. The first locale and message text in the list matches the default language specified in global Settings and is also shown in the traditional web prompt and in the Duo Device Health app. Up to 200 characters. No support for hyperlinks. .PARAMETER Locale - The language of the help text. One of: en_US (English), cs_CZ (Czech), de_DE (German), es_ES (Spanish - Spain), es_419 (Spanish - Latin America), fi_FI (Finnish), fr_FR (French), hi_IN (Hindi), id_ID (Indonesian), it_IT (Italian), ja_JP (Japanese), ko_KR (Korean), nb_NO (Norwegian - BokmÃ¥l), pl_PL (Polish), pt_BR (Portuguese - Brazil), sv_SE (Swedish), th_TH (Thai), tr_TR (Turkish), vi_VN (Vietnamese), or zh_hans_CN (Chinese - Simplified). + The language of the help text. One of: en_US (English), cs_CZ (Czech), de_DE (German), es_ES (Spanish - Spain), es_419 (Spanish - Latin America), fi_FI (Finnish), fr_FR (French), hi_IN (Hindi), id_ID (Indonesian), it_IT (Italian), ja_JP (Japanese), ko_KR (Korean), nb_NO (Norwegian - Bokmal), pl_PL (Polish), pt_BR (Portuguese - Brazil), sv_SE (Swedish), th_TH (Thai), tr_TR (Turkish), vi_VN (Vietnamese), or zh_hans_CN (Chinese - Simplified). .EXAMPLE Set-DuoCustomMessaging -HelpLinks 'https://duo.com/docs/adminapi#modify-custom-messaging' diff --git a/DuoSecurity/Public/Admin API/Logs/Get-DuoAdminLogs.ps1 b/DuoSecurity/Public/Admin API/Logs/Get-DuoAdminLog.ps1 similarity index 93% rename from DuoSecurity/Public/Admin API/Logs/Get-DuoAdminLogs.ps1 rename to DuoSecurity/Public/Admin API/Logs/Get-DuoAdminLog.ps1 index 77e4312..645e4aa 100644 --- a/DuoSecurity/Public/Admin API/Logs/Get-DuoAdminLogs.ps1 +++ b/DuoSecurity/Public/Admin API/Logs/Get-DuoAdminLog.ps1 @@ -1,4 +1,4 @@ -function Get-DuoAdminLogs { +function Get-DuoAdminLog { <# .SYNOPSIS Administrator Logs @@ -10,7 +10,7 @@ function Get-DuoAdminLogs { Limit report to events after this Unix timestamp. .EXAMPLE - Get-DuoUserAuthenticationAttempts + Get-DuoAdminLog .LINK https://duo.com/docs/adminapi#administrator-logs @@ -66,4 +66,6 @@ function Get-DuoAdminLogs { $Request.response } -} \ No newline at end of file +} + +Set-Alias -Name Get-DuoAdminLogs -Value Get-DuoAdminLog \ No newline at end of file diff --git a/DuoSecurity/Public/Admin API/Logs/Get-DuoAuthLogs.ps1 b/DuoSecurity/Public/Admin API/Logs/Get-DuoAuthLog.ps1 similarity index 98% rename from DuoSecurity/Public/Admin API/Logs/Get-DuoAuthLogs.ps1 rename to DuoSecurity/Public/Admin API/Logs/Get-DuoAuthLog.ps1 index b4cb59a..13e7a31 100644 --- a/DuoSecurity/Public/Admin API/Logs/Get-DuoAuthLogs.ps1 +++ b/DuoSecurity/Public/Admin API/Logs/Get-DuoAuthLog.ps1 @@ -1,4 +1,4 @@ -function Get-DuoAuthLogs { +function Get-DuoAuthLog { <# .SYNOPSIS Authentication Logs @@ -151,7 +151,7 @@ function Get-DuoAuthLogs { https://duo.com/docs/adminapi#authentication-logs .EXAMPLE - Get-DuoAuthLogs -Days 30 -EventTypes authentication -Factors duo_push -Results denied + Get-DuoAuthLog -Days 30 -EventTypes authentication -Factors duo_push -Results denied .NOTES There is an intentional two minute delay in availability of new authentications in the API response. Duo operates a large scale distributed system, and this two minute buffer period ensures that calls will return consistent results. Querying for results more recent than two minutes will return as empty. @@ -258,3 +258,5 @@ function Get-DuoAuthLogs { $Response } } + +Set-Alias -Name Get-DuoAuthLogs -Value Get-DuoAuthLog diff --git a/DuoSecurity/Public/Admin API/Logs/Get-DuoOfflineEnrollmentLogs.ps1 b/DuoSecurity/Public/Admin API/Logs/Get-DuoOfflineEnrollmentLog.ps1 similarity index 93% rename from DuoSecurity/Public/Admin API/Logs/Get-DuoOfflineEnrollmentLogs.ps1 rename to DuoSecurity/Public/Admin API/Logs/Get-DuoOfflineEnrollmentLog.ps1 index 60bc8c5..606bdd0 100644 --- a/DuoSecurity/Public/Admin API/Logs/Get-DuoOfflineEnrollmentLogs.ps1 +++ b/DuoSecurity/Public/Admin API/Logs/Get-DuoOfflineEnrollmentLog.ps1 @@ -1,4 +1,4 @@ -function Get-DuoOfflineEnrollmentLogs { +function Get-DuoOfflineEnrollmentLog { <# .SYNOPSIS Offline Enrollment Logs @@ -12,7 +12,7 @@ function Get-DuoOfflineEnrollmentLogs { Only return records that have a Unix timestamp in seconds of mintime or later. Use mintime+1 to avoid receiving duplicate data. .EXAMPLE - Get-DuoOfflineEnrollmentLogs + Get-DuoOfflineEnrollmentLog .LINK https://duo.com/docs/adminapi#offline-enrollment-logs @@ -68,4 +68,6 @@ function Get-DuoOfflineEnrollmentLogs { $Request.response } -} \ No newline at end of file +} + +Set-Alias -Name Get-DuoOfflineEnrollmentLogs -Value Get-DuoOfflineEnrollmentLog diff --git a/DuoSecurity/Public/Admin API/Logs/Get-DuoTelephonyLogs.ps1 b/DuoSecurity/Public/Admin API/Logs/Get-DuoTelephonyLog.ps1 similarity index 92% rename from DuoSecurity/Public/Admin API/Logs/Get-DuoTelephonyLogs.ps1 rename to DuoSecurity/Public/Admin API/Logs/Get-DuoTelephonyLog.ps1 index 49c5bc0..d0c68b1 100644 --- a/DuoSecurity/Public/Admin API/Logs/Get-DuoTelephonyLogs.ps1 +++ b/DuoSecurity/Public/Admin API/Logs/Get-DuoTelephonyLog.ps1 @@ -1,4 +1,4 @@ -function Get-DuoTelephonyLogs { +function Get-DuoTelephonyLog { <# .SYNOPSIS Telephony Logs @@ -10,7 +10,7 @@ function Get-DuoTelephonyLogs { Limit report to events after this Unix timestamp. .EXAMPLE - Get-DuoTelephonyLogs + Get-DuoTelephonyLog .LINK https://duo.com/docs/adminapi#telephony-logs @@ -66,4 +66,6 @@ function Get-DuoTelephonyLogs { $Request.response } -} \ No newline at end of file +} + +Set-Alias -Name Get-DuoTelephonyLogs -Value Get-DuoTelephonyLog diff --git a/DuoSecurity/Public/Admin API/Phones/Get-DuoPhones.ps1 b/DuoSecurity/Public/Admin API/Phones/Get-DuoPhone.ps1 similarity index 95% rename from DuoSecurity/Public/Admin API/Phones/Get-DuoPhones.ps1 rename to DuoSecurity/Public/Admin API/Phones/Get-DuoPhone.ps1 index 25c7df6..ff690f8 100644 --- a/DuoSecurity/Public/Admin API/Phones/Get-DuoPhones.ps1 +++ b/DuoSecurity/Public/Admin API/Phones/Get-DuoPhone.ps1 @@ -1,4 +1,4 @@ -function Get-DuoPhones { +function Get-DuoPhone { <# .SYNOPSIS Retrieve Phones @@ -66,4 +66,4 @@ function Get-DuoPhones { } } -Set-Alias -Name Get-DuoPhone -Value Get-DuoPhones +Set-Alias -Name Get-DuoPhones -Value Get-DuoPhone diff --git a/DuoSecurity/Public/Admin API/Phones/Send-DuoPhoneSmsPasscodes.ps1 b/DuoSecurity/Public/Admin API/Phones/Send-DuoPhoneSmsPasscode.ps1 similarity index 84% rename from DuoSecurity/Public/Admin API/Phones/Send-DuoPhoneSmsPasscodes.ps1 rename to DuoSecurity/Public/Admin API/Phones/Send-DuoPhoneSmsPasscode.ps1 index 4e2e93f..256a48a 100644 --- a/DuoSecurity/Public/Admin API/Phones/Send-DuoPhoneSmsPasscodes.ps1 +++ b/DuoSecurity/Public/Admin API/Phones/Send-DuoPhoneSmsPasscode.ps1 @@ -1,4 +1,4 @@ -function Send-DuoPhoneSmsPasscodes { +function Send-DuoPhoneSmsPasscode { <# .SYNOPSIS Send Passcodes via SMS @@ -10,7 +10,7 @@ function Send-DuoPhoneSmsPasscodes { Id of phone .EXAMPLE - Send-DuoPhoneSmsPasscodes -PhoneId SOMEDUOID + Send-DuoPhoneSmsPasscode -PhoneId SOMEDUOID .LINK https://duo.com/docs/adminapi#send-passcodes-via-sms @@ -37,3 +37,5 @@ function Send-DuoPhoneSmsPasscodes { } } } + +Set-Alias -Name Send-DuoPhoneSmsPasscodes -Value Send-DuoPhoneSmsPasscode \ No newline at end of file diff --git a/DuoSecurity/Public/Admin API/Settings/Get-DuoSettings.ps1 b/DuoSecurity/Public/Admin API/Settings/Get-DuoSetting.ps1 similarity index 87% rename from DuoSecurity/Public/Admin API/Settings/Get-DuoSettings.ps1 rename to DuoSecurity/Public/Admin API/Settings/Get-DuoSetting.ps1 index d4fc095..4854b6a 100644 --- a/DuoSecurity/Public/Admin API/Settings/Get-DuoSettings.ps1 +++ b/DuoSecurity/Public/Admin API/Settings/Get-DuoSetting.ps1 @@ -1,4 +1,4 @@ -function Get-DuoSettings { +function Get-DuoSetting { <# .SYNOPSIS Retrieve Settings @@ -28,3 +28,5 @@ function Get-DuoSettings { $Request.response } } + +Set-Alias -Name Get-DuoSettings -Value Get-DuoSetting diff --git a/DuoSecurity/Public/Admin API/Settings/Update-DuoSettings.ps1 b/DuoSecurity/Public/Admin API/Settings/Update-DuoSetting.ps1 similarity index 98% rename from DuoSecurity/Public/Admin API/Settings/Update-DuoSettings.ps1 rename to DuoSecurity/Public/Admin API/Settings/Update-DuoSetting.ps1 index b1ac73c..301317d 100644 --- a/DuoSecurity/Public/Admin API/Settings/Update-DuoSettings.ps1 +++ b/DuoSecurity/Public/Admin API/Settings/Update-DuoSetting.ps1 @@ -1,4 +1,4 @@ -function Update-DuoSettings { +function Update-DuoSetting { <# .SYNOPSIS Modify Settings @@ -82,7 +82,7 @@ function Update-DuoSettings { The maximum number of telephony credits a user may consume in a single authentication event. This excludes Duo administrators authenticating to the Duo administration panel. If you know the countries from which your users expect to authenticate with phone callback we recommend adjusting this down from the default to match the most expensive expected country to help avoid misuse, using the values from the Telephony Credits documentation. Default: 20. .EXAMPLE - Update-DuoSettings -FraudEmail helpdesk@domain.com + Update-DuoSetting -FraudEmail helpdesk@domain.com .LINK https://duo.com/docs/adminapi#modify-settings @@ -227,3 +227,5 @@ function Update-DuoSettings { } } } + +Set-Alias -Name Update-DuoSettings -Value Update-DuoSetting diff --git a/DuoSecurity/Public/Admin API/Users/Sync-DuoUserFromDirectory.ps1 b/DuoSecurity/Public/Admin API/Users/Sync-DuoUserFromDirectory.ps1 index f123ad7..271085a 100644 --- a/DuoSecurity/Public/Admin API/Users/Sync-DuoUserFromDirectory.ps1 +++ b/DuoSecurity/Public/Admin API/Users/Sync-DuoUserFromDirectory.ps1 @@ -4,7 +4,7 @@ function Sync-DuoUserFromDirectory { Synchronize User from Directory .DESCRIPTION - Initiate a sync to create, update, or mark for deletion the user specified by username against the directory specified by the directory_key. The directory_key for a directory can be found by navigating to Users → Directory Sync in the Duo Admin Panel, and then clicking on the configured directory. Learn more about syncing individual users from Active Directory, OpenLDAP, or Azure Active Directory. Requires "Grant write resource" API permission. + Initiate a sync to create, update, or mark for deletion the user specified by username against the directory specified by the directory_key. The directory_key for a directory can be found by navigating to Users -> Directory Sync in the Duo Admin Panel, and then clicking on the configured directory. Learn more about syncing individual users from Active Directory, OpenLDAP, or Azure Active Directory. Requires "Grant write resource" API permission. .PARAMETER DirectoryKey The directory key to sync from