### Install DynatracePS Module Source: https://github.com/joeywas/dynatraceps/blob/main/README.md Installs the DynatracePS module from the PowerShell Gallery for the current user. This is the first step to start using the module. ```powershell Install-Module DynatracePS -Scope CurrentUser ``` -------------------------------- ### Get Dynatrace Host (Cleaned Up) Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md The Get-DynatraceHost function has been cleaned up. This modification was made in version 0.1.5. ```PowerShell Get-DynatraceHost ``` -------------------------------- ### Get Dynatrace Problems Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Retrieves problems from Dynatrace. This function was added in version 0.1.13. ```PowerShell Get-DynatraceProblem ``` -------------------------------- ### Get Process Properties Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Retrieves properties for a process in Dynatrace. This function was added in version 0.1.5. ```PowerShell Get-DynatraceProcessProperty -ProcessId "proc-xyz" ``` -------------------------------- ### Get Dynatrace Database Services Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Returns database services within Dynatrace. This function was added in version 0.1.18. ```PowerShell Get-DynatraceDatabase ``` -------------------------------- ### Get Dynatrace Metrics Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Retrieves a list of metrics from Dynatrace. This function was added in version 0.1.22. ```PowerShell Get-DynatraceMetric ``` -------------------------------- ### Get Dynatrace Settings Object Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Returns one or more setting objects from Dynatrace. This function was added in version 0.1.21. ```PowerShell Get-DynatraceSettingsObject ``` -------------------------------- ### Get Dynatrace Host Properties Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Retrieves properties for a host in Dynatrace. This function was added in version 0.1.4. ```PowerShell Get-DynatraceHostProperty -HostId "host-222" ``` -------------------------------- ### Get Dynatrace Host Property (Fixed) Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md The Get-DynatraceHostProperty function now works correctly with the -Name parameter. This fix was made in version 0.1.5. ```PowerShell Get-DynatraceHostProperty -Name "MyHost" ``` -------------------------------- ### Get Dynatrace User List (Account Level) Source: https://github.com/joeywas/dynatraceps/blob/main/README.md Retrieves a list of users from the Dynatrace account. This is an account-level function and requires appropriate account configuration. ```powershell Get-DynatraceUser ``` -------------------------------- ### Get Dynatrace Process (Renamed) Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md The function Get-DynatraceProcessGroupInstance has been renamed to Get-DynatraceProcess to better reflect its functionality. This change was made in version 0.1.5. ```PowerShell Get-DynatraceProcess ``` -------------------------------- ### Get Dynatrace HTTP Checks Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Retrieves all HTTP checks configured in Dynatrace. This function was added in version 0.1.15. ```PowerShell Get-DynatraceHTTPCheck ``` -------------------------------- ### Get Dynatrace Alerting Profiles Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Retrieves one or more alerting profiles from Dynatrace. This function was added in version 0.1.17. ```PowerShell Get-DynatraceAlertingProfile ``` -------------------------------- ### Get Dynatrace Host Group List (Environment Level) Source: https://github.com/joeywas/dynatraceps/blob/main/README.md Retrieves a list of host groups from the Dynatrace environment. This is an environment-level function and requires environment configuration. ```powershell Get-DynatraceHostGroup ``` -------------------------------- ### Get Dynatrace Host Group (Fixed) Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md The Get-DynatraceHostGroup function now works correctly with the -Name parameter. This fix was made in version 0.1.5. ```PowerShell Get-DynatraceHostGroup -Name "Production" ``` -------------------------------- ### Get Dynatrace Audit Log Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Retrieves the Dynatrace audit log. This function was added in version 0.1.19. ```PowerShell Get-DynatraceAuditLog ``` -------------------------------- ### Get Dynatrace Settings Schema (Modified) Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Modified to accept a schema ID and output as JSON. This change was made in version 0.1.20. ```PowerShell Get-DynatraceSettingsSchema -SchemaId "yourSchemaId" -OutputAsJson ``` -------------------------------- ### Get Dynatrace Management Zone List (Environment Level) Source: https://github.com/joeywas/dynatraceps/blob/main/README.md Retrieves a list of management zones from the Dynatrace environment. This is an environment-level function and requires environment configuration. ```powershell Get-DynatraceManagementZone ``` -------------------------------- ### Get Dynatrace Host Group Properties Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Retrieves properties for a host group in Dynatrace. This function was added in version 0.1.4. ```PowerShell Get-DynatraceHostGroupProperty -HostGroupId "hg-333" ``` -------------------------------- ### Get Process Group Properties Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Retrieves properties for a process group in Dynatrace. This function was added in version 0.1.5. ```PowerShell Get-DynatraceProcessGroupProperty -ProcessGroupId "pg-abc" ``` -------------------------------- ### Get Dynatrace Group Permissions (Output) Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Added OutputNotNested parameter to function Get-DynatraceGroupPermission for outputting to Excel or FT. This modification was made in version 0.1.8. ```PowerShell Get-DynatraceGroupPermission -GroupId "yourGroupId" -OutputNotNested ``` -------------------------------- ### Get Dynatrace Management Zone Properties Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Retrieves properties for a management zone in Dynatrace. This function was added in version 0.1.4. ```PowerShell Get-DynatraceManagementZoneProperty -ManagementZoneId "mz-111" ``` -------------------------------- ### Get Dynatrace Notifications Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Retrieves a list of notifications or details on a single notification from Dynatrace. This function was added in version 0.1.17. ```PowerShell Get-DynatraceNotification ``` -------------------------------- ### Get Dynatrace Management Zone Rules Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Retrieves all rules associated with a management zone in Dynatrace. This function was added in version 0.1.14. ```PowerShell Get-DynatraceManagementZoneRule -ManagementZoneId "yourMzId" ``` -------------------------------- ### Get Dynatrace HTTP Check Properties Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Retrieves properties for a specific HTTP check in Dynatrace. This function was added in version 0.1.15. ```PowerShell Get-DynatraceHTTPCheckProperty -HttpCheckId "yourHttpCheckId" ``` -------------------------------- ### Get Dynatrace HTTP Check Status Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Retrieves the status of HTTP checks in Dynatrace. This function was added in version 0.1.16. ```PowerShell Get-DynatraceHTTPCheckStatus ``` -------------------------------- ### Get Dynatrace Process Group (Corrected) Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md The Get-DynatraceProcessGroup function now calls the correct underlying function. This modification was made in version 0.1.5. ```PowerShell Get-DynatraceProcessGroup ``` -------------------------------- ### Get Dynatrace Hosts in Host Group Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Returns a list of hosts and their related host groups in Dynatrace. This function was added in version 0.1.14. ```PowerShell Get-DynatraceHostsInHostGroup -HostGroupId "yourHostGroupId" ``` -------------------------------- ### Get User Last Login Information Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Retrieves user names and their last login times from Dynatrace. This function was added in version 0.1.12. ```PowerShell Get-DyntraceUserLastLogin ``` -------------------------------- ### Get Dynatrace Synthetic Locations Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Retrieves a list of locations available for synthetic checks in Dynatrace. This function was added in version 0.1.16. ```PowerShell Get-DynatraceSyntheticLocation ``` -------------------------------- ### Get Dynatrace Entity Properties (Modified) Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Modified to optionally output properties in JSON format. This change was made in version 0.1.4. ```PowerShell Get-DynatraceEntityProperty -EntityId "entity-444" -OutputAsJson ``` -------------------------------- ### Get Dynatrace Entity Type Properties Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Modified to accept a -Type parameter, returning available properties for a specified entity type. This change was made in version 0.1.18. ```PowerShell Get-DynatraceEntityType -Type "HOST" ``` -------------------------------- ### Get Dynatrace Group Permissions (Modified) Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Modified to output Management Zone (MZ) name instead of MZ ID for better readability. This change was made in version 0.1.12. ```PowerShell Get-DynatraceGroupPermission -GroupId "yourGroupId" ``` -------------------------------- ### Configure Dynatrace Account and Environment Access Source: https://github.com/joeywas/dynatraceps/blob/main/README.md Sets all configuration values for accessing both Dynatrace environment and account management functions. Requires EnvironmentID, AccountUuid, OAuthClientSecret, and AccessToken. ```powershell Set-DynatracePSConfig -EnvironmentID 'environmentid' ` -AccountUuid 'accountuuid' ` -OAuthClientSecret 'oauthclientsecret' ` -AccessToken 'accesstoken' ``` -------------------------------- ### DynatracePS About Topic Structure Source: https://github.com/joeywas/dynatraceps/blob/main/Docs/about_DynatracePS.md Defines the required structure for DynatracePS 'about' topics, including header formatting for topic and lookup names, and placeholders for various content sections. ```PowerShell # DynatracePS ## about_DynatracePS ``` ABOUT TOPIC NOTE: The first header of the about topic should be the topic name. The second header contains the lookup name used by the help system. IE: # Some Help Topic Name ## SomeHelpTopicFileName This will be transformed into the text file as `about_SomeHelpTopicFileName`. Do not include file extensions. The second header should have no spaces. ``` # SHORT DESCRIPTION {{ Short Description Placeholder }} ``` ABOUT TOPIC NOTE: About topics can be no longer than 80 characters wide when rendered to text. Any topics greater than 80 characters will be automatically wrapped. The generated about topic will be encoded UTF-8. ``` # LONG DESCRIPTION {{ Long Description Placeholder }} ## Optional Subtopics {{ Optional Subtopic Placeholder }} # EXAMPLES {{ Code or descriptive examples of how to leverage the functions described. }} # NOTE {{ Note Placeholder - Additional information that a user needs to know.}} # TROUBLESHOOTING NOTE {{ Troubleshooting Placeholder - Warns users of bugs}} {{ Explains behavior that is likely to change with fixes }} # SEE ALSO {{ See also placeholder }} {{ You can also list related articles, blogs, and video URLs. }} # KEYWORDS {{List alternate names or titles for this topic that readers might use.}} - {{ Keyword Placeholder }} - {{ Keyword Placeholder }} - {{ Keyword Placeholder }} - {{ Keyword Placeholder }} ``` -------------------------------- ### Dynatrace Environment Functions Source: https://github.com/joeywas/dynatraceps/blob/main/README.md A list of available PowerShell functions for interacting with Dynatrace environment-specific data and resources. These functions require environment configuration (EnvironmentID and AccessToken). ```APIDOC 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 ``` -------------------------------- ### Dynatrace Account Management Functions Source: https://github.com/joeywas/dynatraceps/blob/main/README.md A list of available PowerShell functions for interacting with Dynatrace account management features. These functions require account configuration (AccountUuid and OAuthClientSecret). ```APIDOC Get-DynatraceUser Get-DynatraceUserLastLogin Get-DynatraceUserGroup Get-DynatraceGroup Get-DynatraceGroupUser Get-DynatraceGroupPermission Get-DynatraceEnvironment Get-DynatracePermission Get-DynatraceQuota Get-DynatraceEffectivePermission Get-DynatraceSubscription ``` -------------------------------- ### Configure Dynatrace Environment Access Source: https://github.com/joeywas/dynatraceps/blob/main/README.md Sets the configuration values for accessing Dynatrace environment-related functions. Requires EnvironmentID and AccessToken, which are persisted in a JSON file and as a PSCredential object respectively. ```powershell Set-DynatracePSConfig -EnvironmentID 'environmentid' ` -AccessToken 'accesstoken' ``` -------------------------------- ### Output as JSON (All Functions) Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md All functions that should output as JSON now do so. This modification was made in version 0.1.5. ```PowerShell # Example: Any function that supports -OutputAsJson Get-DynatraceHost -OutputAsJson ``` -------------------------------- ### Fixing 'break' to 'return' Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md In version 0.1.20, 'break' statements were replaced with 'return' where appropriate across all functions for better control flow. ```PowerShell # Example of a function that might have had this change: function ProcessItems { foreach ($item in $items) { if ($item.Status -eq 'Processed') { return $item # Replaced 'break' } } } ``` -------------------------------- ### Connect Dynatrace Account Management (Fixed) Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Fixed to correctly handle caching of tokens. This fix was made in version 0.1.11. ```PowerShell Connect-DynatraceAccountManagement -Tenant "yourTenant" -ApiToken "yourToken" ``` -------------------------------- ### Generate Management Zone Rule Object Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Generates a management zone rule object for host group mapping. This function was added in version 0.1.7. ```PowerShell New-DynatraceMzRuleHostGroup -HostGroupName "ProductionServers" ``` -------------------------------- ### Test Server Response (Modified) Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Modified to accept a status code parameter and check that status code. This change was made in version 0.1.7. ```PowerShell Test-ServerResponse -Uri "http://example.com" -StatusCode 200 ``` -------------------------------- ### Management Zone Operations Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Provides functions to create, update, and remove management zones in Dynatrace. Added in version 0.1.7. ```PowerShell New-DynatraceManagementZone -Name "MyZone" Update-DynatraceManagementZone -Id "mz-123" -Name "UpdatedZone" Remove-DynatraceManagementZone -Id "mz-456" ``` -------------------------------- ### Invoke Dynatrace API Method (Modified) Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Modified to use output variables for response headers and status code, with improved debugging. This change was made in version 0.1.7. ```PowerShell Invoke-DynatraceAPIMethod -Method "POST" -Endpoint "/api/v2/alerting/profiles" -Body '{"name":"NewProfile"}' ``` -------------------------------- ### Convert Dynatrace Timestamp to Datetime Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Internal function to convert millisecond timestamps used in Dynatrace to human-readable local time. Added in version 0.1.13. ```PowerShell ConvertTo-Datetime -Timestamp 1670000000000 ``` -------------------------------- ### Invoke Dynatrace API Method (Modified) Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Modified to use Invoke-WebRequest instead of Invoke-RestMethod for better support across various PowerShell versions. This change was made in version 0.1.11. ```PowerShell Invoke-DynatraceAPIMethod -Method "GET" -Endpoint "/api/v2/entities" ``` -------------------------------- ### Rename Dynatrace Management Zone Source: https://github.com/joeywas/dynatraceps/blob/main/Changelog.md Renames management zones in Dynatrace. This function was added in version 0.1.6. ```PowerShell Rename-DynatraceManagementZone -Id "mz-789" -NewName "RenamedZone" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.