PowerShell module to interact with Dynatrace SaaS APIs
Install the DynatracePS module from PSGallery for the current user
Install-Module DynatracePS -Scope CurrentUser
For environment related functions, you need a Dynatrace environment ID and an access token or personal access token. The environment ID may be found under Environment Management settings after logging in to the Dynatrace account page.
For Account Management related functions, you will need your Dynatrace Account Uuid and an account API Oauth client. Information on getting started with Account Management and account API Oauth client is available after logging into your Dynatrace account page and navigating to Account Management API.
Once you have the values from Dynatrace, use the Set-DynatracePSConfig
function to persist values in the user profile. The EnvironmentID and AccountUuid are stored in a json file. the OAuthClientSecret and AccessToken are saved as PSCredential objects with Export-CliXml.
In order to use the environment functions, the -EnvironmentID and -AccessToken parameters are required to be set.
Set-DynatracePSConfig -EnvironmentID 'environmentid' `
-AccessToken 'accesstoken'
In order to use all functions, then you set all four configuration values
Set-DynatracePSConfig -EnvironmentID 'environmentid' `
-AccountUuid 'accountuuid' `
-OAuthClientSecret 'oauthclientsecret' `
-AccessToken 'accesstoken'
Get-DynatraceUser
Get-DynatraceHostGroup
Get-DynatraceManagementZone
These functions require an environmentID and AccessToken be configured with Set-DynatracePSConfig
- Get-DynatraceAlertingProfile
- Get-DynatraceContainer
- Get-DynatraceDatabase
- Get-DynatraceEntity
- Get-DynatraceEntityProperty
- Get-DynatraceEntityType
- Get-DynatraceHost
- Get-DynatraceHostGroup
- Get-DynatraceHostGroupProperty
- Get-DynatraceHostProperty
- Get-DynatraceHostInHostGroup
- Get-DynatraceHTTPCheck
- Get-DynatraceHTTPCheckProperty
- Get-DynatraceHTTPCheckStatus
- Get-DynatraceManagementZone
- Get-DynatraceManagementZoneProperty
- Get-DynatraceManagementZoneRule
- Get-DynatraceNotification
- Get-DynatraceProcess
- Get-DynatraceProcessGroup
- Get-DynatraceProcessGroupProperty
- Get-DynatraceProcessProperty
- Get-DynatraceSettingsSchema
- Get-DynatraceSyntheticLocation
- Get-DynatraceTag
- New-DynatraceManagementZone
- Remove-DynatraceManagementZone
- Rename-DynatraceManagementZone
- Update-DynatraceManagementZone
These functions require an accountUuid and OAuthClientSecret be configured with Set-DynatracePSConfig
- Get-DynatraceUser
- Get-DynatraceUserLastLogin
- Get-DynatraceUserGroup
- Get-DynatraceGroup
- Get-DynatraceGroupUser
- Get-DynatraceGroupPermission
- Get-DynatraceEnvironment
- Get-DynatracePermission
- Get-DynatraceQuota
- Get-DynatraceEffectivePermission
- Get-DynatraceSubscription