From 96991e6bb89b7f7296a6c07639e5a19b8286cd91 Mon Sep 17 00:00:00 2001 From: Steve Villardi <42367049+stevevillardi@users.noreply.github.com> Date: Mon, 6 May 2024 11:38:09 -0400 Subject: [PATCH] 6.1 Release Prep --- Documentation/Connect-LMAccount.md | 2 + Documentation/Disconnect-LMAccount.md | 7 +- Documentation/Export-LMDeviceConfigBackup.md | 2 + Documentation/Export-LMLogicModule.md | 2 + Documentation/Get-LMAWSAccountId.md | 59 + Documentation/Get-LMAccountStatus.md | 5 +- .../Get-LMConfigsourceUpdateHistory.md | 166 + .../Get-LMDatasourceUpdateHistory.md | 80 +- Documentation/Invoke-LMAWSAccountTest.md | 140 + Documentation/Invoke-LMAzureAccountTest.md | 170 + .../Invoke-LMAzureSubscriptionDiscovery.md | 117 + Documentation/Invoke-LMGCPAccountTest.md | 125 + Documentation/Set-LMDevice.md | 35 +- Documentation/Set-LMUserdata.md | 156 + Logic.Monitor.Format.ps1xml | 53 + Public/Get-LMAWSAccountId.ps1 | 46 + Public/Get-LMConfigsourceUpdateHistory.ps1 | 132 + Public/Get-LMDatasourceUpdateHistory.ps1 | 39 +- Public/Invoke-LMAWSAccountTest.ps1 | 105 + Public/Invoke-LMAzureAccountTest.ps1 | 113 + .../Invoke-LMAzureSubscriptionDiscovery.ps1 | 83 + Public/Invoke-LMGCPAccountTest.ps1 | 94 + Public/Set-LMDevice.ps1 | 31 +- Public/Set-LMUserdata.ps1 | 126 + README.md | 30 +- RELEASENOTES.md | 13 + en-US/Logic.Monitor-help.xml | 4555 ++++++++++++----- 27 files changed, 5074 insertions(+), 1412 deletions(-) create mode 100644 Documentation/Get-LMAWSAccountId.md create mode 100644 Documentation/Get-LMConfigsourceUpdateHistory.md create mode 100644 Documentation/Invoke-LMAWSAccountTest.md create mode 100644 Documentation/Invoke-LMAzureAccountTest.md create mode 100644 Documentation/Invoke-LMAzureSubscriptionDiscovery.md create mode 100644 Documentation/Invoke-LMGCPAccountTest.md create mode 100644 Documentation/Set-LMUserdata.md create mode 100644 Public/Get-LMAWSAccountId.ps1 create mode 100644 Public/Get-LMConfigsourceUpdateHistory.ps1 create mode 100644 Public/Invoke-LMAWSAccountTest.ps1 create mode 100644 Public/Invoke-LMAzureAccountTest.ps1 create mode 100644 Public/Invoke-LMAzureSubscriptionDiscovery.ps1 create mode 100644 Public/Invoke-LMGCPAccountTest.ps1 create mode 100644 Public/Set-LMUserdata.ps1 diff --git a/Documentation/Connect-LMAccount.md b/Documentation/Connect-LMAccount.md index 70d7244..bc296e7 100644 --- a/Documentation/Connect-LMAccount.md +++ b/Documentation/Connect-LMAccount.md @@ -260,5 +260,7 @@ You must run this command before you will be able to execute other commands incl ## RELATED LINKS +[Module repo: https://github.com/logicmonitor/lm-powershell-module]() + [PSGallery: https://www.powershellgallery.com/packages/Logic.Monitor]() diff --git a/Documentation/Disconnect-LMAccount.md b/Documentation/Disconnect-LMAccount.md index 167e44d..cdec45e 100644 --- a/Documentation/Disconnect-LMAccount.md +++ b/Documentation/Disconnect-LMAccount.md @@ -13,7 +13,7 @@ Disconnect from a previously connected LM portal ## SYNTAX ``` -Disconnect-LMAccount [] +Disconnect-LMAccount ``` ## DESCRIPTION @@ -29,9 +29,6 @@ Disconnect-LMAccount ## PARAMETERS -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - ## INPUTS ### None. You cannot pipe objects to this command. @@ -42,5 +39,7 @@ Once disconnect you will need to reconnect to a portal before you will be allowe ## RELATED LINKS +[Module repo: https://github.com/logicmonitor/lm-powershell-module]() + [PSGallery: https://www.powershellgallery.com/packages/Logic.Monitor]() diff --git a/Documentation/Export-LMDeviceConfigBackup.md b/Documentation/Export-LMDeviceConfigBackup.md index 555075e..691e7c2 100644 --- a/Documentation/Export-LMDeviceConfigBackup.md +++ b/Documentation/Export-LMDeviceConfigBackup.md @@ -143,5 +143,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS +[Module repo: https://github.com/logicmonitor/lm-powershell-module]() + [PSGallery: https://www.powershellgallery.com/packages/Logic.Monitor]() diff --git a/Documentation/Export-LMLogicModule.md b/Documentation/Export-LMLogicModule.md index 60562c8..6770cef 100644 --- a/Documentation/Export-LMLogicModule.md +++ b/Documentation/Export-LMLogicModule.md @@ -129,5 +129,7 @@ You must run this command before you will be able to execute other commands incl ## RELATED LINKS +[Module repo: https://github.com/logicmonitor/lm-powershell-module]() + [PSGallery: https://www.powershellgallery.com/packages/Logic.Monitor]() diff --git a/Documentation/Get-LMAWSAccountId.md b/Documentation/Get-LMAWSAccountId.md new file mode 100644 index 0000000..e0e4dd4 --- /dev/null +++ b/Documentation/Get-LMAWSAccountId.md @@ -0,0 +1,59 @@ +--- +external help file: Logic.Monitor-help.xml +Module Name: Logic.Monitor +online version: https://www.logicmonitor.com/support/rest-api-developers-guide/ +schema: 2.0.0 +--- + +# Get-LMAWSAccountId + +## SYNOPSIS +Retrieves the AWS Account ID associated with the LogicMonitor account. + +## SYNTAX + +``` +Get-LMAWSAccountId [-ProgressAction ] [] +``` + +## DESCRIPTION +The Get-LMAWSAccountId function is used to retrieve the AWS Account ID associated with the LogicMonitor account. +It checks if the user is logged in and has valid API credentials. +If the user is logged in, it builds the necessary headers and URI, and then sends a GET request to the LogicMonitor API to retrieve the AWS Account ID. +The function returns the response containing the AWS Account ID. + +## EXAMPLES + +### EXAMPLE 1 +``` +Get-LMAWSAccountId +Retrieves the AWS Account ID associated with the LogicMonitor account. +``` + +## PARAMETERS + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/Documentation/Get-LMAccountStatus.md b/Documentation/Get-LMAccountStatus.md index 06839ec..8947090 100644 --- a/Documentation/Get-LMAccountStatus.md +++ b/Documentation/Get-LMAccountStatus.md @@ -13,7 +13,7 @@ Retrieves the status of the LogicMonitor account. ## SYNTAX ``` -Get-LMAccountStatus [] +Get-LMAccountStatus ``` ## DESCRIPTION @@ -31,9 +31,6 @@ This example demonstrates how to use the Get-LMAccountStatus function to retriev ## PARAMETERS -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - ## INPUTS ## OUTPUTS diff --git a/Documentation/Get-LMConfigsourceUpdateHistory.md b/Documentation/Get-LMConfigsourceUpdateHistory.md new file mode 100644 index 0000000..bccdcea --- /dev/null +++ b/Documentation/Get-LMConfigsourceUpdateHistory.md @@ -0,0 +1,166 @@ +--- +external help file: Logic.Monitor-help.xml +Module Name: Logic.Monitor +online version: +schema: 2.0.0 +--- + +# Get-LMConfigsourceUpdateHistory + +## SYNOPSIS +Retrieves the update history for a LogicMonitor configuration source. + +## SYNTAX + +### Id (Default) +``` +Get-LMConfigsourceUpdateHistory -Id [-Filter ] [-BatchSize ] + [-ProgressAction ] [] +``` + +### Name +``` +Get-LMConfigsourceUpdateHistory [-Name ] [-Filter ] [-BatchSize ] + [-ProgressAction ] [] +``` + +### DisplayName +``` +Get-LMConfigsourceUpdateHistory [-DisplayName ] [-Filter ] [-BatchSize ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +The Get-LMConfigsourceUpdateHistory function retrieves the update history for a LogicMonitor configuration source. +It can be used to get information about the updates made to a configuration source, such as the update reasons and the modules that were updated. + +## EXAMPLES + +### EXAMPLE 1 +``` +Get-LMConfigsourceUpdateHistory -Id 1234 +Retrieves the update history for the configuration source with the ID 1234. +``` + +### EXAMPLE 2 +``` +Get-LMConfigsourceUpdateHistory -Name "MyConfigSource" +Retrieves the update history for the configuration source with the name "MyConfigSource". +``` + +### EXAMPLE 3 +``` +Get-LMConfigsourceUpdateHistory -DisplayName "My Config Source" +Retrieves the update history for the configuration source with the display name "My Config Source". +``` + +## PARAMETERS + +### -Id +The ID of the configuration source. +This parameter is mandatory when using the 'Id' parameter set. + +```yaml +Type: Int32 +Parameter Sets: Id +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the configuration source. +This parameter is used to look up the ID of the configuration source. +This parameter is used when using the 'Name' parameter set. + +```yaml +Type: String +Parameter Sets: Name +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +The display name of the configuration source. +This parameter is used to look up the ID of the configuration source. +This parameter is used when using the 'DisplayName' parameter set. + +```yaml +Type: String +Parameter Sets: DisplayName +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +A filter object that specifies additional filtering criteria for the update history. +This parameter is optional. + +```yaml +Type: Object +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BatchSize +The number of results to retrieve per request. +The default value is 1000. +This parameter is optional. + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: 1000 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/Documentation/Get-LMDatasourceUpdateHistory.md b/Documentation/Get-LMDatasourceUpdateHistory.md index 2ee06af..1be68c3 100644 --- a/Documentation/Get-LMDatasourceUpdateHistory.md +++ b/Documentation/Get-LMDatasourceUpdateHistory.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Get-LMDatasourceUpdateHistory ## SYNOPSIS -{{ Fill in the Synopsis }} +Retrieves the update history of a LogicMonitor datasource. ## SYNTAX @@ -31,40 +31,56 @@ Get-LMDatasourceUpdateHistory [-DisplayName ] [-Filter ] [-Batch ``` ## DESCRIPTION -{{ Fill in the Description }} +The Get-LMDatasourceUpdateHistory function retrieves the update history of a LogicMonitor datasource. +It can be used to get information about the updates made to a datasource, such as the reasons for the updates. ## EXAMPLES -### Example 1 -```powershell -PS C:\> {{ Add example code here }} +### EXAMPLE 1 +``` +Get-LMDatasourceUpdateHistory -Id 1234 +Retrieves the update history of the datasource with ID 1234. ``` -{{ Add example description here }} +### EXAMPLE 2 +``` +Get-LMDatasourceUpdateHistory -Name "MyDatasource" +Retrieves the update history of the datasource with the name "MyDatasource". +``` + +### EXAMPLE 3 +``` +Get-LMDatasourceUpdateHistory -DisplayName "My Datasource" +Retrieves the update history of the datasource with the display name "My Datasource". +``` ## PARAMETERS -### -BatchSize -{{ Fill BatchSize Description }} +### -Id +The ID of the datasource. +This parameter is mandatory when using the 'Id' parameter set. ```yaml Type: Int32 -Parameter Sets: (All) +Parameter Sets: Id Aliases: -Required: False +Required: True Position: Named -Default value: None +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -DisplayName -{{ Fill DisplayName Description }} +### -Name +The name of the datasource. +This parameter is used to look up the ID of the datasource. +If the name is provided, the function will automatically retrieve the ID of the datasource. +This parameter is used in the 'Name' parameter set. ```yaml Type: String -Parameter Sets: DisplayName +Parameter Sets: Name Aliases: Required: False @@ -74,12 +90,15 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Filter -{{ Fill Filter Description }} +### -DisplayName +The display name of the datasource. +This parameter is used to look up the ID of the datasource. +If the display name is provided, the function will automatically retrieve the ID of the datasource. +This parameter is used in the 'DisplayName' parameter set. ```yaml -Type: Object -Parameter Sets: (All) +Type: String +Parameter Sets: DisplayName Aliases: Required: False @@ -89,32 +108,35 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Id -{{ Fill Id Description }} +### -Filter +A filter object that can be used to filter the results. +The filter object should contain properties that match the properties of the datasource. +Only datasources that match the filter will be included in the results. ```yaml -Type: Int32 -Parameter Sets: Id +Type: Object +Parameter Sets: (All) Aliases: -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Name -{{ Fill Name Description }} +### -BatchSize +The number of results to retrieve in each batch. +The default value is 1000. ```yaml -Type: String -Parameter Sets: Name +Type: Int32 +Parameter Sets: (All) Aliases: Required: False Position: Named -Default value: None +Default value: 1000 Accept pipeline input: False Accept wildcard characters: False ``` @@ -139,10 +161,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### None ## OUTPUTS -### System.Object ## NOTES ## RELATED LINKS diff --git a/Documentation/Invoke-LMAWSAccountTest.md b/Documentation/Invoke-LMAWSAccountTest.md new file mode 100644 index 0000000..33d4407 --- /dev/null +++ b/Documentation/Invoke-LMAWSAccountTest.md @@ -0,0 +1,140 @@ +--- +external help file: Logic.Monitor-help.xml +Module Name: Logic.Monitor +online version: +schema: 2.0.0 +--- + +# Invoke-LMAWSAccountTest + +## SYNOPSIS +Invokes a test for an AWS account in LogicMonitor. + +## SYNTAX + +``` +Invoke-LMAWSAccountTest [-ExternalId] [[-AccountId] ] [-AssumedRoleARN] + [[-CheckedServices] ] [[-GroupId] ] [-ProgressAction ] [] +``` + +## DESCRIPTION +The Invoke-LMAWSAccountTest function is used to invoke a test for an AWS account in LogicMonitor. +It checks if the user is logged in and has valid API credentials. +If the user is logged in, it builds the necessary headers and URI, prepares the data, and sends a POST request to the LogicMonitor API to perform the test. +The function returns the response from the API. + +## EXAMPLES + +### EXAMPLE 1 +``` +Invoke-LMAWSAccountTest -ExternalId "123456" -AccountId "987654" -AccessId "AKI123" -AccessKey "abc123" -AssumedRoleARN "arn:aws:iam::123456789012:role/MyRole" -CheckedServices "EC2,S3,RDS" -GroupId 123 +``` + +This example invokes a test for an AWS account with the specified parameters. + +## PARAMETERS + +### -ExternalId +The external ID of the AWS account. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AccountId +The account ID of the AWS account. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AssumedRoleARN +The assumed role ARN of the AWS account. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CheckedServices +The list of services to be checked during the test. +Default value is a comma-separated string of service names supported by LogicMonitor. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: DYNAMODB,EBS,EC2,AUTOSCALING,BACKUP,BACKUPPROTECTEDRESOURCE,TRANSFER,ELASTICACHE,ELB,RDS,REDSHIFT,S3,SNS,SQS,EMR,KINESIS,ROUTE53,ROUTE53HOSTEDZONE,CLOUDSEARCH,LAMBDA,ECR,ECS,ELASTICSEARCH,EFS,SWFWORKFLOW,SWFACTIVITY,APPLICATIONELB,CLOUDFRONT,APIGATEWAY,APIGATEWAYV2,SES,VPN,FIREHOSE,KINESISVIDEO,WORKSPACE,NETWORKELB,NATGATEWAY,DIRECTCONNECT,DIRECTCONNECT_VIRTUALINTERFACE,WORKSPACEDIRECTORY,ELASTICBEANSTALK,DMSREPLICATION,MSKCLUSTER,MSKBROKER,FSX,TRANSITGATEWAY,GLUE,APPSTREAM,MQ,ATHENA,DBCLUSTER,DOCDB,STEPFUNCTIONS,OPSWORKS,CODEBUILD,SAGEMAKER,ROUTE53RESOLVER,DMSREPLICATIONTASKS,EVENTBRIDGE,MEDIACONNECT,MEDIAPACKAGELIVE,MEDIASTORE,MEDIAPACKAGEVOD,MEDIATAILOR,MEDIACONVERT,ELASTICTRANSCODER,COGNITO,TRANSITGATEWAYATTACHMENT,QUICKSIGHT_DASHBOARDS,QUICKSIGHT_DATASETS,PRIVATELINK_ENDPOINTS,PRIVATELINK_SERVICES,GLOBAL_NETWORKS +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId +The device group ID to which the AWS account belongs. +Default value is -1 for no group. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: -1 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +This function requires the user to be logged in before running any commands. +Use the Connect-LMAccount function to log in before invoking this function. + +## RELATED LINKS diff --git a/Documentation/Invoke-LMAzureAccountTest.md b/Documentation/Invoke-LMAzureAccountTest.md new file mode 100644 index 0000000..2a92c43 --- /dev/null +++ b/Documentation/Invoke-LMAzureAccountTest.md @@ -0,0 +1,170 @@ +--- +external help file: Logic.Monitor-help.xml +Module Name: Logic.Monitor +online version: +schema: 2.0.0 +--- + +# Invoke-LMAzureAccountTest + +## SYNOPSIS +Invokes a test on an Azure account. + +## SYNTAX + +``` +Invoke-LMAzureAccountTest [-ClientId] [-SecretKey] [[-CheckedServices] ] + [-SubscriptionIds] [[-GroupId] ] [-TenantId] [[-IsChinaAccount] ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +The Invoke-LMAzureAccountTest function is used to invoke a test on an Azure account. +It checks if the user is logged in and has valid API credentials. +If the user is logged in, it builds the necessary headers and URI, and then sends a POST request to the specified endpoint. +The function returns the response from the API. + +## EXAMPLES + +### EXAMPLE 1 +``` +Invoke-LMAzureAccountTest -ClientId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -SecretKey "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -SubscriptionIds "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +``` + +This example invokes a test on an Azure account using the specified client ID, secret key, and subscription IDs. + +## PARAMETERS + +### -ClientId +The client ID of the Azure account. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecretKey +The secret key of the Azure account. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CheckedServices +The list of services to be checked. +Default value is a list of commonly used Azure services. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: VIRTUALMACHINE,SQLDATABASE,APPSERVICE,EVENTHUB,REDISCACHE,REDISCACHEENTERPRISE,VIRTUALMACHINESCALESET,VIRTUALMACHINESCALESETVM,APPLICATIONGATEWAY,IOTHUB,FUNCTION,SERVICEBUS,MARIADB,MYSQL,MYSQLFLEXIBLE,POSTGRESQL,POSTGRESQLFLEXIBLE,POSTGRESQLCITUS,ANALYSISSERVICE,TABLESTORAGE,BLOBSTORAGE,FILESTORAGE,QUEUESTORAGE,STORAGEACCOUNT,APIMANAGEMENT,COSMOSDB,APPSERVICEPLAN,VIRTUALNETWORKGATEWAY,AUTOMATIONACCOUNT,EXPRESSROUTECIRCUIT,DATALAKEANALYTICS,DATALAKESTORE,APPLICATIONINSIGHTS,FIREWALL,SQLELASTICPOOL,SQLMANAGEDINSTANCE,HDINSIGHT,RECOVERYSERVICES,BACKUPPROTECTEDITEMS,RECOVERYPROTECTEDITEMS,NETWORKINTERFACE,BATCHACCOUNT,LOGICAPPS,DATAFACTORY,PUBLICIP,STREAMANALYTICS,EVENTGRID,LOADBALANCERS,SERVICEFABRICMESH,COGNITIVESEARCH,COGNITIVESERVICES,MLWORKSPACES,FRONTDOORS,KEYVAULT,RELAYNAMESPACES,NOTIFICATIONHUBS,APPSERVICEENVIRONMENT,TRAFFICMANAGER,SIGNALR,VIRTUALDESKTOP,SYNAPSEWORKSPACES,NETAPPPOOLS,DATABRICKS,LOGANALYTICSWORKSPACES,VIRTUALHUBS,VPNGATEWAYS,CDNPROFILE,POWERBIEMBEDDED,CONTAINERREGISTRY,NATGATEWAYS,BOTSERVICES,VIRTUALNETWORKS +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionIds +The subscription IDs associated with the Azure account. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId +The group ID. +Default value is -1. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: -1 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TenantId +The tenant ID of the Azure account. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsChinaAccount +Specifies whether the Azure account is a China account. +Default value is $false. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 7 +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/Documentation/Invoke-LMAzureSubscriptionDiscovery.md b/Documentation/Invoke-LMAzureSubscriptionDiscovery.md new file mode 100644 index 0000000..a5ba992 --- /dev/null +++ b/Documentation/Invoke-LMAzureSubscriptionDiscovery.md @@ -0,0 +1,117 @@ +--- +external help file: Logic.Monitor-help.xml +Module Name: Logic.Monitor +online version: +schema: 2.0.0 +--- + +# Invoke-LMAzureSubscriptionDiscovery + +## SYNOPSIS +Invokes the Azure subscription discovery process to return subscriptions for a specified client Id. + +## SYNTAX + +``` +Invoke-LMAzureSubscriptionDiscovery [-ClientId] [-SecretKey] [-TenantId] + [[-IsChinaAccount] ] [-ProgressAction ] [] +``` + +## DESCRIPTION +The Invoke-LMAzureSubscriptionDiscovery function is used to discover Azure subscriptions by making API requests to the LogicMonitor platform. + +## EXAMPLES + +### EXAMPLE 1 +``` +Invoke-LMAzureSubscriptionDiscovery -ClientId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -SecretKey "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +``` + +## PARAMETERS + +### -ClientId +The client ID of the Azure Active Directory application. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecretKey +The secret key of the Azure Active Directory application. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TenantId +The tenant ID of the Azure Active Directory application. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsChinaAccount +Specifies whether the Azure account is a China account. +Default value is $false. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/Documentation/Invoke-LMGCPAccountTest.md b/Documentation/Invoke-LMGCPAccountTest.md new file mode 100644 index 0000000..796ae5e --- /dev/null +++ b/Documentation/Invoke-LMGCPAccountTest.md @@ -0,0 +1,125 @@ +--- +external help file: Logic.Monitor-help.xml +Module Name: Logic.Monitor +online version: +schema: 2.0.0 +--- + +# Invoke-LMGCPAccountTest + +## SYNOPSIS +Invokes a test for a GCP (Google Cloud Platform) account. + +## SYNTAX + +``` +Invoke-LMGCPAccountTest [-ServiceAccountKey] [-ProjectId] [[-CheckedServices] ] + [[-GroupId] ] [-ProgressAction ] [] +``` + +## DESCRIPTION +The Invoke-LMGCPAccountTest function is used to invoke a test for a GCP account. +It checks if the user is logged in and has valid API credentials. +If the user is logged in, it builds the necessary headers and URI, prepares the data, and sends a POST request to the LogicMonitor API to perform the test. +The function returns the response from the API. + +## EXAMPLES + +### EXAMPLE 1 +``` +Invoke-LMGCPAccountTest -ServiceAccountKey "service-account-key" -ProjectId "project-id" +``` + +This example invokes a test for a GCP account using the specified service account key and project ID. + +## PARAMETERS + +### -ServiceAccountKey +The service account key for the GCP account. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProjectId +The ID of the GCP project. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CheckedServices +(Optional) A comma-separated list of GCP services to be checked. +The default value is a list of all LM supported GCP services. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: CLOUDRUN,CLOUDDNS,REGIONALHTTPSLOADBALANCER,COMPUTEENGINEAUTOSCALER,COMPUTEENGINE,CLOUDIOT,CLOUDROUTER,CLOUDTASKS,VPNGATEWAY,CLOUDREDIS,CLOUDCOMPOSER,INTERCONNECTATTACHMENT,CLOUDFUNCTION,CLOUDBIGTABLE,CLOUDFILESTORE,CLOUDPUBSUB,CLOUDTRACE,CLOUDSTORAGE,CLOUDDATAPROC,CLOUDINTERCONNECT,CLOUDAIPLATFORM,CLOUDSQL,MANAGEDSERVICEFORMICROSOFTAD,CLOUDFIRESTORE,CLOUDDATAFLOW,CLOUDTPU,CLOUDDLP,APPENGINE,HTTPSLOADBALANCER,CLOUDSPANNER +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId +(Optional) The ID of the group to which the GCP account belongs. +The default value is -1, indicating no group. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: -1 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +This function requires the user to be logged in before running any commands. +Use the Connect-LMAccount function to log in before invoking this function. + +## RELATED LINKS diff --git a/Documentation/Set-LMDevice.md b/Documentation/Set-LMDevice.md index 7d0a80c..45427e4 100644 --- a/Documentation/Set-LMDevice.md +++ b/Documentation/Set-LMDevice.md @@ -15,21 +15,21 @@ schema: 2.0.0 ### Id ``` Set-LMDevice -Id [-NewName ] [-DisplayName ] [-Description ] - [-PreferredCollectorId ] [-PreferredCollectorGroupId ] [-Properties ] - [-HostGroupIds ] [-PropertiesMethod ] [-Link ] [-DisableAlerting ] - [-EnableNetFlow ] [-NetflowCollectorGroupId ] [-NetflowCollectorId ] - [-LogCollectorGroupId ] [-LogCollectorId ] [-ProgressAction ] [-WhatIf] - [-Confirm] [] + [-PreferredCollectorId ] [-PreferredCollectorGroupId ] [-AutoBalancedCollectorGroupId ] + [-Properties ] [-HostGroupIds ] [-PropertiesMethod ] [-Link ] + [-DisableAlerting ] [-EnableNetFlow ] [-NetflowCollectorGroupId ] + [-NetflowCollectorId ] [-LogCollectorGroupId ] [-LogCollectorId ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Name ``` Set-LMDevice -Name [-NewName ] [-DisplayName ] [-Description ] - [-PreferredCollectorId ] [-PreferredCollectorGroupId ] [-Properties ] - [-HostGroupIds ] [-PropertiesMethod ] [-Link ] [-DisableAlerting ] - [-EnableNetFlow ] [-NetflowCollectorGroupId ] [-NetflowCollectorId ] - [-LogCollectorGroupId ] [-LogCollectorId ] [-ProgressAction ] [-WhatIf] - [-Confirm] [] + [-PreferredCollectorId ] [-PreferredCollectorGroupId ] [-AutoBalancedCollectorGroupId ] + [-Properties ] [-HostGroupIds ] [-PropertiesMethod ] [-Link ] + [-DisableAlerting ] [-EnableNetFlow ] [-NetflowCollectorGroupId ] + [-NetflowCollectorId ] [-LogCollectorGroupId ] [-LogCollectorId ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -46,6 +46,21 @@ PS C:\> {{ Add example code here }} ## PARAMETERS +### -AutoBalancedCollectorGroupId +{{ Fill AutoBalancedCollectorGroupId Description }} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/Documentation/Set-LMUserdata.md b/Documentation/Set-LMUserdata.md new file mode 100644 index 0000000..e5d5461 --- /dev/null +++ b/Documentation/Set-LMUserdata.md @@ -0,0 +1,156 @@ +--- +external help file: Logic.Monitor-help.xml +Module Name: Logic.Monitor +online version: +schema: 2.0.0 +--- + +# Set-LMUserdata + +## SYNOPSIS +Sets userdata for a LogicMonitor user. +Currently only setting the default dashboard is supported. + +## SYNTAX + +### Id (Default) +``` +Set-LMUserdata -Id -DashboardId [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### Name +``` +Set-LMUserdata -Name -DashboardId [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +## DESCRIPTION +The Set-LMUserdata function is used to set the user data for a LogicMonitor user. +It allows you to specify the user by either their Id or Name, and the dashboard Id for which the user data should be set. + +## EXAMPLES + +### EXAMPLE 1 +``` +Set-LMUserdata -Id "12345" -DashboardId "67890" +Sets the user data for the user with Id "12345" for the dashboard with Id "67890". +``` + +### EXAMPLE 2 +``` +Set-LMUserdata -Name "JohnDoe" -DashboardId "67890" +Sets the user data for the user with Name "JohnDoe" for the dashboard with Id "67890". +``` + +## PARAMETERS + +### -Id +Specifies the Id of the user. +This parameter is mandatory when using the 'Id' parameter set. + +```yaml +Type: String +Parameter Sets: Id +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Name +Specifies the Name of the user. +This parameter is mandatory when using the 'Name' parameter set. + +```yaml +Type: String +Parameter Sets: Name +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DashboardId +Specifies the Id of the dashboard for which the user data should be set. +This parameter is mandatory. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### None. +## OUTPUTS + +### System.Object +### Returns the response from the LogicMonitor API. +## NOTES +This function requires a valid API authentication. +Make sure you are logged in before running any commands using Connect-LMAccount. + +## RELATED LINKS diff --git a/Logic.Monitor.Format.ps1xml b/Logic.Monitor.Format.ps1xml index 3d772e3..99bfdbd 100644 --- a/Logic.Monitor.Format.ps1xml +++ b/Logic.Monitor.Format.ps1xml @@ -54,6 +54,59 @@ + + + LogicMonitorModuleUpdateHistory + + LogicMonitor.ModuleUpdateHistory + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + username + + + timeStr + + + timeEpoch + + + clientIp + + + updateReason + + + + + + LogicMonitorTopologyMap diff --git a/Public/Get-LMAWSAccountId.ps1 b/Public/Get-LMAWSAccountId.ps1 new file mode 100644 index 0000000..ec82a48 --- /dev/null +++ b/Public/Get-LMAWSAccountId.ps1 @@ -0,0 +1,46 @@ +<# +.SYNOPSIS +Retrieves the AWS Account ID associated with the LogicMonitor account. + +.DESCRIPTION +The Get-LMAWSAccountId function is used to retrieve the AWS Account ID associated with the LogicMonitor account. It checks if the user is logged in and has valid API credentials. If the user is logged in, it builds the necessary headers and URI, and then sends a GET request to the LogicMonitor API to retrieve the AWS Account ID. The function returns the response containing the AWS Account ID. + +.PARAMETER None +This function does not have any parameters. + +.EXAMPLE +Get-LMAWSAccountId +Retrieves the AWS Account ID associated with the LogicMonitor account. +#> + +Function Get-LMAWSAccountId { + [CmdletBinding(DefaultParameterSetName = 'All')] + Param () + + #Check if we are logged in and have valid api creds + If ($Script:LMAuth.Valid) { + + #Build header and uri + $ResourcePath = "/aws/accountId" + + Try { + $Headers = New-LMHeader -Auth $Script:LMAuth -Method "GET" -ResourcePath $ResourcePath + $Uri = "https://$($Script:LMAuth.Portal).logicmonitor.com/santaba/rest" + $ResourcePath + $QueryParams + + Resolve-LMDebugInfo -Url $Uri -Headers $Headers[0] -Command $MyInvocation + + #Issue request + $Response = Invoke-RestMethod -Uri $Uri -Method "GET" -Headers $Headers[0] -WebSession $Headers[1] + Return $Response + } + Catch [Exception] { + $Proceed = Resolve-LMException -LMException $PSItem + If (!$Proceed) { + Return + } + } + } + Else { + Write-Error "Please ensure you are logged in before running any commands, use Connect-LMAccount to login and try again." + } +} diff --git a/Public/Get-LMConfigsourceUpdateHistory.ps1 b/Public/Get-LMConfigsourceUpdateHistory.ps1 new file mode 100644 index 0000000..5fd91cf --- /dev/null +++ b/Public/Get-LMConfigsourceUpdateHistory.ps1 @@ -0,0 +1,132 @@ +<# +.SYNOPSIS +Retrieves the update history for a LogicMonitor configuration source. + +.DESCRIPTION +The Get-LMConfigsourceUpdateHistory function retrieves the update history for a LogicMonitor configuration source. It can be used to get information about the updates made to a configuration source, such as the update reasons and the modules that were updated. + +.PARAMETER Id +The ID of the configuration source. This parameter is mandatory when using the 'Id' parameter set. + +.PARAMETER Name +The name of the configuration source. This parameter is used to look up the ID of the configuration source. This parameter is used when using the 'Name' parameter set. + +.PARAMETER DisplayName +The display name of the configuration source. This parameter is used to look up the ID of the configuration source. This parameter is used when using the 'DisplayName' parameter set. + +.PARAMETER Filter +A filter object that specifies additional filtering criteria for the update history. This parameter is optional. + +.PARAMETER BatchSize +The number of results to retrieve per request. The default value is 1000. This parameter is optional. + +.EXAMPLE +Get-LMConfigsourceUpdateHistory -Id 1234 +Retrieves the update history for the configuration source with the ID 1234. + +.EXAMPLE +Get-LMConfigsourceUpdateHistory -Name "MyConfigSource" +Retrieves the update history for the configuration source with the name "MyConfigSource". + +.EXAMPLE +Get-LMConfigsourceUpdateHistory -DisplayName "My Config Source" +Retrieves the update history for the configuration source with the display name "My Config Source". + +#> +Function Get-LMConfigsourceUpdateHistory { + + [CmdletBinding(DefaultParameterSetName = 'Id')] + Param ( + [Parameter(Mandatory, ParameterSetName = 'Id')] + [Int]$Id, + + [Parameter(ParameterSetName = 'Name')] + [String]$Name, + + [Parameter(ParameterSetName = 'DisplayName')] + [String]$DisplayName, + + [Object]$Filter, + + [ValidateRange(1, 1000)] + [Int]$BatchSize = 1000 + ) + #Check if we are logged in and have valid api creds + If ($Script:LMAuth.Valid) { + + If ($Name) { + $LookupResult = (Get-LMConfigsource -Name $Name).Id + If (Test-LookupResult -Result $LookupResult -LookupString $Name) { + return + } + $Id = $LookupResult + } + + If ($DisplayName) { + $LookupResult = (Get-LMConfigsource -DisplayName $DisplayName).Id + If (Test-LookupResult -Result $LookupResult -LookupString $DisplayName) { + return + } + $Id = $LookupResult + } + + #Build header and uri + $ResourcePath = "/setting/configsources/$Id/updatereasons" + + #Initalize vars + $QueryParams = "" + $Count = 0 + $Done = $false + $Results = @() + + #Loop through requests + While (!$Done) { + #Build query params + $QueryParams = "?size=$BatchSize&offset=$Count&sort=+id" + + If ($Filter) { + #List of allowed filter props + $PropList = @() + $ValidFilter = Format-LMFilter -Filter $Filter -PropList $PropList + $QueryParams = "?filter=$ValidFilter&size=$BatchSize&offset=$Count&sort=+id" + } + + Try { + $Headers = New-LMHeader -Auth $Script:LMAuth -Method "GET" -ResourcePath $ResourcePath + $Uri = "https://$($Script:LMAuth.Portal).logicmonitor.com/santaba/rest" + $ResourcePath + $QueryParams + + + + Resolve-LMDebugInfo -Url $Uri -Headers $Headers[0] -Command $MyInvocation + + #Issue request + $Response = Invoke-RestMethod -Uri $Uri -Method "GET" -Headers $Headers[0] -WebSession $Headers[1] + + #Stop looping if single device, no need to continue + If (![bool]$Response.psobject.Properties["total"]) { + $Done = $true + Return (Add-ObjectTypeInfo -InputObject $Response -TypeName "LogicMonitor.ModuleUpdateHistory" ) + } + #Check result size and if needed loop again + Else { + [Int]$Total = $Response.Total + [Int]$Count += ($Response.Items | Measure-Object).Count + $Results += $Response.Items + If ($Count -ge $Total) { + $Done = $true + } + } + } + Catch [Exception] { + $Proceed = Resolve-LMException -LMException $PSItem + If (!$Proceed) { + Return + } + } + } + Return (Add-ObjectTypeInfo -InputObject $Results -TypeName "LogicMonitor.ModuleUpdateHistory" ) + } + Else { + Write-Error "Please ensure you are logged in before running any commands, use Connect-LMAccount to login and try again." + } +} diff --git a/Public/Get-LMDatasourceUpdateHistory.ps1 b/Public/Get-LMDatasourceUpdateHistory.ps1 index 5ffeec9..572cbf7 100644 --- a/Public/Get-LMDatasourceUpdateHistory.ps1 +++ b/Public/Get-LMDatasourceUpdateHistory.ps1 @@ -1,3 +1,38 @@ +<# +.SYNOPSIS +Retrieves the update history of a LogicMonitor datasource. + +.DESCRIPTION +The Get-LMDatasourceUpdateHistory function retrieves the update history of a LogicMonitor datasource. It can be used to get information about the updates made to a datasource, such as the reasons for the updates. + +.PARAMETER Id +The ID of the datasource. This parameter is mandatory when using the 'Id' parameter set. + +.PARAMETER Name +The name of the datasource. This parameter is used to look up the ID of the datasource. If the name is provided, the function will automatically retrieve the ID of the datasource. This parameter is used in the 'Name' parameter set. + +.PARAMETER DisplayName +The display name of the datasource. This parameter is used to look up the ID of the datasource. If the display name is provided, the function will automatically retrieve the ID of the datasource. This parameter is used in the 'DisplayName' parameter set. + +.PARAMETER Filter +A filter object that can be used to filter the results. The filter object should contain properties that match the properties of the datasource. Only datasources that match the filter will be included in the results. + +.PARAMETER BatchSize +The number of results to retrieve in each batch. The default value is 1000. + +.EXAMPLE +Get-LMDatasourceUpdateHistory -Id 1234 +Retrieves the update history of the datasource with ID 1234. + +.EXAMPLE +Get-LMDatasourceUpdateHistory -Name "MyDatasource" +Retrieves the update history of the datasource with the name "MyDatasource". + +.EXAMPLE +Get-LMDatasourceUpdateHistory -DisplayName "My Datasource" +Retrieves the update history of the datasource with the display name "My Datasource". + +#> Function Get-LMDatasourceUpdateHistory { [CmdletBinding(DefaultParameterSetName = 'Id')] @@ -70,7 +105,7 @@ Function Get-LMDatasourceUpdateHistory { #Stop looping if single device, no need to continue If (![bool]$Response.psobject.Properties["total"]) { $Done = $true - Return $Response + Return (Add-ObjectTypeInfo -InputObject $Response -TypeName "LogicMonitor.ModuleUpdateHistory" ) } #Check result size and if needed loop again Else { @@ -89,7 +124,7 @@ Function Get-LMDatasourceUpdateHistory { } } } - Return $Results + Return (Add-ObjectTypeInfo -InputObject $Results -TypeName "LogicMonitor.ModuleUpdateHistory" ) } Else { Write-Error "Please ensure you are logged in before running any commands, use Connect-LMAccount to login and try again." diff --git a/Public/Invoke-LMAWSAccountTest.ps1 b/Public/Invoke-LMAWSAccountTest.ps1 new file mode 100644 index 0000000..9868417 --- /dev/null +++ b/Public/Invoke-LMAWSAccountTest.ps1 @@ -0,0 +1,105 @@ +<# +.SYNOPSIS +Invokes a test for an AWS account in LogicMonitor. + +.DESCRIPTION +The Invoke-LMAWSAccountTest function is used to invoke a test for an AWS account in LogicMonitor. It checks if the user is logged in and has valid API credentials. If the user is logged in, it builds the necessary headers and URI, prepares the data, and sends a POST request to the LogicMonitor API to perform the test. The function returns the response from the API. + +.PARAMETER ExternalId +The external ID of the AWS account. + +.PARAMETER AccountId +The account ID of the AWS account. + +.PARAMETER AccessId +The access ID of the AWS account. + +.PARAMETER AccessKey +The access key of the AWS account. + +.PARAMETER AssumedRoleARN +The assumed role ARN of the AWS account. + +.PARAMETER CheckedServices +The list of services to be checked during the test. Default value is a comma-separated string of service names supported by LogicMonitor. + +.PARAMETER GroupId +The device group ID to which the AWS account belongs. Default value is -1 for no group. + +.EXAMPLE +Invoke-LMAWSAccountTest -ExternalId "123456" -AccountId "987654" -AccessId "AKI123" -AccessKey "abc123" -AssumedRoleARN "arn:aws:iam::123456789012:role/MyRole" -CheckedServices "EC2,S3,RDS" -GroupId 123 + +This example invokes a test for an AWS account with the specified parameters. + +.NOTES +This function requires the user to be logged in before running any commands. Use the Connect-LMAccount function to log in before invoking this function. +#> +Function Invoke-LMAWSAccountTest { + [CmdletBinding()] + Param ( + [Parameter(Mandatory)] + [String]$ExternalId, + + [Parameter()] + [String]$AccountId, + + [Parameter(Mandatory)] + [String]$AssumedRoleARN, + + [String]$CheckedServices = "DYNAMODB,EBS,EC2,AUTOSCALING,BACKUP,BACKUPPROTECTEDRESOURCE,TRANSFER,ELASTICACHE,ELB,RDS,REDSHIFT,S3,SNS,SQS,EMR,KINESIS,ROUTE53,ROUTE53HOSTEDZONE,CLOUDSEARCH,LAMBDA,ECR,ECS,ELASTICSEARCH,EFS,SWFWORKFLOW,SWFACTIVITY,APPLICATIONELB,CLOUDFRONT,APIGATEWAY,APIGATEWAYV2,SES,VPN,FIREHOSE,KINESISVIDEO,WORKSPACE,NETWORKELB,NATGATEWAY,DIRECTCONNECT,DIRECTCONNECT_VIRTUALINTERFACE,WORKSPACEDIRECTORY,ELASTICBEANSTALK,DMSREPLICATION,MSKCLUSTER,MSKBROKER,FSX,TRANSITGATEWAY,GLUE,APPSTREAM,MQ,ATHENA,DBCLUSTER,DOCDB,STEPFUNCTIONS,OPSWORKS,CODEBUILD,SAGEMAKER,ROUTE53RESOLVER,DMSREPLICATIONTASKS,EVENTBRIDGE,MEDIACONNECT,MEDIAPACKAGELIVE,MEDIASTORE,MEDIAPACKAGEVOD,MEDIATAILOR,MEDIACONVERT,ELASTICTRANSCODER,COGNITO,TRANSITGATEWAYATTACHMENT,QUICKSIGHT_DASHBOARDS,QUICKSIGHT_DATASETS,PRIVATELINK_ENDPOINTS,PRIVATELINK_SERVICES,GLOBAL_NETWORKS", + + [String]$GroupId = -1 + + ) + #Check if we are logged in and have valid api creds + If ($Script:LMAuth.Valid) { + + #Build header and uri + $ResourcePath = "/aws/functions/testAccount" + + Try { + $Data = @{ + externalId = $ExternalId + accountId = $AccountId + assumedRoleArn = $AssumedRoleARN + checkedServices = $CheckedServices + groupId = $GroupId + } + + #Remove empty keys so we dont overwrite them + @($Data.keys) | ForEach-Object { if ([string]::IsNullOrEmpty($Data[$_])) { $Data.Remove($_) } } + + $Data = ($Data | ConvertTo-Json) + + $Headers = New-LMHeader -Auth $Script:LMAuth -Method "POST" -ResourcePath $ResourcePath -Data $Data + $Uri = "https://$($Script:LMAuth.Portal).logicmonitor.com/santaba/rest" + $ResourcePath + + Resolve-LMDebugInfo -Url $Uri -Headers $Headers[0] -Command $MyInvocation -Payload $Data + + #Issue request + $Response = Invoke-RestMethod -Uri $Uri -Method "POST" -Headers $Headers[0] -WebSession $Headers[1] -Body $Data + Write-LMHost "All services have been tested successfully" -ForegroundColor Green + Return + } + Catch [Exception] { + #Handle LMCloud test account permission errors + If ($PSItem.Exception.Response.StatusCode.value__ -eq 400 -and $PSItem.Exception.Response.RequestMessage.RequestUri.AbsolutePath -like "*/testAccount") { + $Result = @() + ($PSItem.ErrorDetails.Message | ConvertFrom-Json).errorDetail.noPermissionServices | ForEach-Object { + $Result += [PSCustomObject]@{ + Service = $PSItem + TestResult = "You do not have permission to access the service" + } + } + return $Result + } + $Proceed = Resolve-LMException -LMException $PSItem + If (!$Proceed) { + Return + } + } + } + Else { + Write-Error "Please ensure you are logged in before running any commands, use Connect-LMAccount to login and try again." + } +} \ No newline at end of file diff --git a/Public/Invoke-LMAzureAccountTest.ps1 b/Public/Invoke-LMAzureAccountTest.ps1 new file mode 100644 index 0000000..6d1b723 --- /dev/null +++ b/Public/Invoke-LMAzureAccountTest.ps1 @@ -0,0 +1,113 @@ +<# +.SYNOPSIS + Invokes a test on an Azure account. + +.DESCRIPTION + The Invoke-LMAzureAccountTest function is used to invoke a test on an Azure account. It checks if the user is logged in and has valid API credentials. If the user is logged in, it builds the necessary headers and URI, and then sends a POST request to the specified endpoint. The function returns the response from the API. + +.PARAMETER ClientId + The client ID of the Azure account. + +.PARAMETER SecretKey + The secret key of the Azure account. + +.PARAMETER CheckedServices + The list of services to be checked. Default value is a list of commonly used Azure services. + +.PARAMETER SubscriptionIds + The subscription IDs associated with the Azure account. + +.PARAMETER GroupId + The group ID. Default value is -1. + +.PARAMETER TenantId + The tenant ID of the Azure account. + +.PARAMETER IsChinaAccount + Specifies whether the Azure account is a China account. Default value is $false. + +.EXAMPLE + Invoke-LMAzureAccountTest -ClientId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -SecretKey "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -SubscriptionIds "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + + This example invokes a test on an Azure account using the specified client ID, secret key, and subscription IDs. +#> +Function Invoke-LMAzureAccountTest { + + [CmdletBinding()] + Param ( + [Parameter(Mandatory)] + [String]$ClientId, + + [Parameter(Mandatory)] + [String]$SecretKey, + + [String]$CheckedServices = "VIRTUALMACHINE,SQLDATABASE,APPSERVICE,EVENTHUB,REDISCACHE,REDISCACHEENTERPRISE,VIRTUALMACHINESCALESET,VIRTUALMACHINESCALESETVM,APPLICATIONGATEWAY,IOTHUB,FUNCTION,SERVICEBUS,MARIADB,MYSQL,MYSQLFLEXIBLE,POSTGRESQL,POSTGRESQLFLEXIBLE,POSTGRESQLCITUS,ANALYSISSERVICE,TABLESTORAGE,BLOBSTORAGE,FILESTORAGE,QUEUESTORAGE,STORAGEACCOUNT,APIMANAGEMENT,COSMOSDB,APPSERVICEPLAN,VIRTUALNETWORKGATEWAY,AUTOMATIONACCOUNT,EXPRESSROUTECIRCUIT,DATALAKEANALYTICS,DATALAKESTORE,APPLICATIONINSIGHTS,FIREWALL,SQLELASTICPOOL,SQLMANAGEDINSTANCE,HDINSIGHT,RECOVERYSERVICES,BACKUPPROTECTEDITEMS,RECOVERYPROTECTEDITEMS,NETWORKINTERFACE,BATCHACCOUNT,LOGICAPPS,DATAFACTORY,PUBLICIP,STREAMANALYTICS,EVENTGRID,LOADBALANCERS,SERVICEFABRICMESH,COGNITIVESEARCH,COGNITIVESERVICES,MLWORKSPACES,FRONTDOORS,KEYVAULT,RELAYNAMESPACES,NOTIFICATIONHUBS,APPSERVICEENVIRONMENT,TRAFFICMANAGER,SIGNALR,VIRTUALDESKTOP,SYNAPSEWORKSPACES,NETAPPPOOLS,DATABRICKS,LOGANALYTICSWORKSPACES,VIRTUALHUBS,VPNGATEWAYS,CDNPROFILE,POWERBIEMBEDDED,CONTAINERREGISTRY,NATGATEWAYS,BOTSERVICES,VIRTUALNETWORKS", + + [Parameter(Mandatory)] + [String]$SubscriptionIds, + + [String]$GroupId = -1, + + [Parameter(Mandatory)] + [String]$TenantId, + + [String]$IsChinaAccount = $false + + ) + #Check if we are logged in and have valid api creds + If ($Script:LMAuth.Valid) { + + #Build header and uri + $ResourcePath = "/azure/functions/testAccount" + + Try { + $Data = @{ + clientId = $ClientId + secretKey = $SecretKey + checkedServices = $CheckedServices + subscriptionIds = $SubscriptionIds + groupId = $GroupId + tenantId = $TenantId + isChinaAccount = $IsChinaAccount + + } + + #Remove empty keys so we dont overwrite them + @($Data.keys) | ForEach-Object { if ([string]::IsNullOrEmpty($Data[$_])) { $Data.Remove($_) } } + + $Data = ($Data | ConvertTo-Json) + + $Headers = New-LMHeader -Auth $Script:LMAuth -Method "POST" -ResourcePath $ResourcePath -Data $Data + $Uri = "https://$($Script:LMAuth.Portal).logicmonitor.com/santaba/rest" + $ResourcePath + + Resolve-LMDebugInfo -Url $Uri -Headers $Headers[0] -Command $MyInvocation -Payload $Data + + #Issue request + $Response = Invoke-RestMethod -Uri $Uri -Method "POST" -Headers $Headers[0] -WebSession $Headers[1] -Body $Data + Write-LMHost "All services have been tested successfully" -ForegroundColor Green + Return + } + Catch [Exception] { + #Handle LMCloud test account permission errors + If ($PSItem.Exception.Response.StatusCode.value__ -eq 400 -and $PSItem.Exception.Response.RequestMessage.RequestUri.AbsolutePath -like "*/testAccount") { + $Result = @() + ($PSItem.ErrorDetails.Message | ConvertFrom-Json).errorDetail.noPermissionServices.services.serviceName | ForEach-Object { + $Result += [PSCustomObject]@{ + Service = $PSItem + TestResult = "You do not have permission to access the service" + } + } + return $Result + } + Else{ + $Proceed = Resolve-LMException -LMException $PSItem + If (!$Proceed) { + Return + } + } + } + } + Else { + Write-Error "Please ensure you are logged in before running any commands, use Connect-LMAccount to login and try again." + } +} \ No newline at end of file diff --git a/Public/Invoke-LMAzureSubscriptionDiscovery.ps1 b/Public/Invoke-LMAzureSubscriptionDiscovery.ps1 new file mode 100644 index 0000000..b8826db --- /dev/null +++ b/Public/Invoke-LMAzureSubscriptionDiscovery.ps1 @@ -0,0 +1,83 @@ +<# +.SYNOPSIS + Invokes the Azure subscription discovery process to return subscriptions for a specified client Id. + +.DESCRIPTION + The Invoke-LMAzureSubscriptionDiscovery function is used to discover Azure subscriptions by making API requests to the LogicMonitor platform. + +.PARAMETER ClientId + The client ID of the Azure Active Directory application. + +.PARAMETER SecretKey + The secret key of the Azure Active Directory application. + +.PARAMETER TenantId + The tenant ID of the Azure Active Directory application. + +.PARAMETER IsChinaAccount + Specifies whether the Azure account is a China account. Default value is $false. + +.EXAMPLE + Invoke-LMAzureSubscriptionDiscovery -ClientId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -SecretKey "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +#> +Function Invoke-LMAzureSubscriptionDiscovery { + + [CmdletBinding()] + Param ( + [Parameter(Mandatory)] + [String]$ClientId, + + [Parameter(Mandatory)] + [String]$SecretKey, + + [Parameter(Mandatory)] + [String]$TenantId, + + [String]$IsChinaAccount = $false + + ) + #Check if we are logged in and have valid api creds + If ($Script:LMAuth.Valid) { + + #Build header and uri + $ResourcePath = "/azure/functions/discoverSubscriptions" + + #Loop through requests + $Done = $false + While (!$Done) { + Try { + $Data = @{ + clientId = $ClientId + secretKey = $SecretKey + tenantId = $TenantId + isChinaAccount = $IsChinaAccount + + } + + #Remove empty keys so we dont overwrite them + @($Data.keys) | ForEach-Object { if ([string]::IsNullOrEmpty($Data[$_])) { $Data.Remove($_) } } + + $Data = ($Data | ConvertTo-Json) + + $Headers = New-LMHeader -Auth $Script:LMAuth -Method "POST" -ResourcePath $ResourcePath -Data $Data + $Uri = "https://$($Script:LMAuth.Portal).logicmonitor.com/santaba/rest" + $ResourcePath + + Resolve-LMDebugInfo -Url $Uri -Headers $Headers[0] -Command $MyInvocation -Payload $Data + + #Issue request + $Response = Invoke-RestMethod -Uri $Uri -Method "POST" -Headers $Headers[0] -WebSession $Headers[1] -Body $Data + + Return $Response.items + } + Catch [Exception] { + $Proceed = Resolve-LMException -LMException $PSItem + If (!$Proceed) { + Return + } + } + } + } + Else { + Write-Error "Please ensure you are logged in before running any commands, use Connect-LMAccount to login and try again." + } +} \ No newline at end of file diff --git a/Public/Invoke-LMGCPAccountTest.ps1 b/Public/Invoke-LMGCPAccountTest.ps1 new file mode 100644 index 0000000..6694317 --- /dev/null +++ b/Public/Invoke-LMGCPAccountTest.ps1 @@ -0,0 +1,94 @@ +<# +.SYNOPSIS +Invokes a test for a GCP (Google Cloud Platform) account. + +.DESCRIPTION +The Invoke-LMGCPAccountTest function is used to invoke a test for a GCP account. It checks if the user is logged in and has valid API credentials. If the user is logged in, it builds the necessary headers and URI, prepares the data, and sends a POST request to the LogicMonitor API to perform the test. The function returns the response from the API. + +.PARAMETER ServiceAccountKey +The service account key for the GCP account. + +.PARAMETER ProjectId +The ID of the GCP project. + +.PARAMETER CheckedServices +(Optional) A comma-separated list of GCP services to be checked. The default value is a list of all LM supported GCP services. + +.PARAMETER GroupId +(Optional) The ID of the group to which the GCP account belongs. The default value is -1, indicating no group. + +.EXAMPLE +Invoke-LMGCPAccountTest -ServiceAccountKey "service-account-key" -ProjectId "project-id" + +This example invokes a test for a GCP account using the specified service account key and project ID. + +.NOTES +This function requires the user to be logged in before running any commands. Use the Connect-LMAccount function to log in before invoking this function. +#> +Function Invoke-LMGCPAccountTest { + [CmdletBinding()] + Param ( + [Parameter(Mandatory)] + [String]$ServiceAccountKey, + + [Parameter(Mandatory)] + [String]$ProjectId, + + [String]$CheckedServices = "CLOUDRUN,CLOUDDNS,REGIONALHTTPSLOADBALANCER,COMPUTEENGINEAUTOSCALER,COMPUTEENGINE,CLOUDIOT,CLOUDROUTER,CLOUDTASKS,VPNGATEWAY,CLOUDREDIS,CLOUDCOMPOSER,INTERCONNECTATTACHMENT,CLOUDFUNCTION,CLOUDBIGTABLE,CLOUDFILESTORE,CLOUDPUBSUB,CLOUDTRACE,CLOUDSTORAGE,CLOUDDATAPROC,CLOUDINTERCONNECT,CLOUDAIPLATFORM,CLOUDSQL,MANAGEDSERVICEFORMICROSOFTAD,CLOUDFIRESTORE,CLOUDDATAFLOW,CLOUDTPU,CLOUDDLP,APPENGINE,HTTPSLOADBALANCER,CLOUDSPANNER", + + [String]$GroupId = -1 + + ) + #Check if we are logged in and have valid api creds + If ($Script:LMAuth.Valid) { + + #Build header and uri + $ResourcePath = "/gcp/functions/testAccount" + + Try { + $Data = @{ + serviceAccountKey = $ServiceAccountKey + projectId = $ProjectId + checkedServices = $CheckedServices + groupId = $GroupId + } + + #Remove empty keys so we dont overwrite them + @($Data.keys) | ForEach-Object { if ([string]::IsNullOrEmpty($Data[$_])) { $Data.Remove($_) } } + + $Data = ($Data | ConvertTo-Json) + + $Headers = New-LMHeader -Auth $Script:LMAuth -Method "POST" -ResourcePath $ResourcePath -Data $Data + $Uri = "https://$($Script:LMAuth.Portal).logicmonitor.com/santaba/rest" + $ResourcePath + + Resolve-LMDebugInfo -Url $Uri -Headers $Headers[0] -Command $MyInvocation -Payload $Data + + #Issue request + $Response = Invoke-RestMethod -Uri $Uri -Method "POST" -Headers $Headers[0] -WebSession $Headers[1] -Body $Data + Write-LMHost "All services have been tested successfully" -ForegroundColor Green + Return + } + Catch [Exception] { + #Handle LMCloud test account permission errors + If ($PSItem.Exception.Response.StatusCode.value__ -eq 400 -and $PSItem.Exception.Response.RequestMessage.RequestUri.AbsolutePath -like "*/testAccount") { + $Result = @() + ($PSItem.ErrorDetails.Message | ConvertFrom-Json).errorDetail.noPermissionServices | ForEach-Object { + $Result += [PSCustomObject]@{ + Service = $PSItem + TestResult = "You do not have permission to access the service" + } + } + return $Result + } + Else{ + $Proceed = Resolve-LMException -LMException $PSItem + If (!$Proceed) { + Return + } + } + } + } + Else { + Write-Error "Please ensure you are logged in before running any commands, use Connect-LMAccount to login and try again." + } +} diff --git a/Public/Set-LMDevice.ps1 b/Public/Set-LMDevice.ps1 index 26f5fff..1753c98 100644 --- a/Public/Set-LMDevice.ps1 +++ b/Public/Set-LMDevice.ps1 @@ -18,6 +18,8 @@ Function Set-LMDevice { [Nullable[Int]]$PreferredCollectorGroupId, + [Nullable[Int]]$AutoBalancedCollectorGroupId, + [Hashtable]$Properties, [String[]]$HostGroupIds, #Dynamic group ids will be ignored, operation will replace all existing groups @@ -76,20 +78,21 @@ Function Set-LMDevice { Try { $Data = @{ - name = $NewName - displayName = $DisplayName - description = $Description - disableAlerting = $DisableAlerting - enableNetflow = $EnableNetFlow - customProperties = $customProperties - preferredCollectorId = $PreferredCollectorId - preferredCollectorGroupId = $PreferredCollectorGroupId - link = $Link - netflowCollectorGroupId = $NetflowCollectorGroupId - netflowCollectorId = $NetflowCollectorId - logCollectorGroupId = $LogCollectorGroupId - logCollectorId = $LogCollectorId - hostGroupIds = $HostGroupIds -join "," + name = $NewName + displayName = $DisplayName + description = $Description + disableAlerting = $DisableAlerting + enableNetflow = $EnableNetFlow + customProperties = $customProperties + preferredCollectorId = $PreferredCollectorId + preferredCollectorGroupId = $PreferredCollectorGroupId + autoBalancedCollectorGroupId = $AutoBalancedCollectorGroupId + link = $Link + netflowCollectorGroupId = $NetflowCollectorGroupId + netflowCollectorId = $NetflowCollectorId + logCollectorGroupId = $LogCollectorGroupId + logCollectorId = $LogCollectorId + hostGroupIds = $HostGroupIds -join "," } diff --git a/Public/Set-LMUserdata.ps1 b/Public/Set-LMUserdata.ps1 new file mode 100644 index 0000000..99d53b6 --- /dev/null +++ b/Public/Set-LMUserdata.ps1 @@ -0,0 +1,126 @@ +<# +.SYNOPSIS +Sets userdata for a LogicMonitor user. Currently only setting the default dashboard is supported. + +.DESCRIPTION +The Set-LMUserdata function is used to set the user data for a LogicMonitor user. It allows you to specify the user by either their Id or Name, and the dashboard Id for which the user data should be set. + +.PARAMETER Id +Specifies the Id of the user. This parameter is mandatory when using the 'Id' parameter set. + +.PARAMETER Name +Specifies the Name of the user. This parameter is mandatory when using the 'Name' parameter set. + +.PARAMETER DashboardId +Specifies the Id of the dashboard for which the user data should be set. This parameter is mandatory. + +.EXAMPLE +Set-LMUserdata -Id "12345" -DashboardId "67890" +Sets the user data for the user with Id "12345" for the dashboard with Id "67890". + +.EXAMPLE +Set-LMUserdata -Name "JohnDoe" -DashboardId "67890" +Sets the user data for the user with Name "JohnDoe" for the dashboard with Id "67890". + +.INPUTS +None. + +.OUTPUTS +System.Object +Returns the response from the LogicMonitor API. + +.NOTES +This function requires a valid API authentication. Make sure you are logged in before running any commands using Connect-LMAccount. + +#> +Function Set-LMUserdata { + [CmdletBinding(DefaultParameterSetName = 'Id', SupportsShouldProcess, ConfirmImpact = 'None')] + Param ( + [Parameter(Mandatory, ParameterSetName = 'Id', ValueFromPipelineByPropertyName)] + [String]$Id, + + [Parameter(Mandatory, ParameterSetName = 'Name')] + [String]$Name, + + [Parameter(Mandatory)] + [String]$DashboardId + ) + + Begin {} + Process { + #Check if we are logged in and have valid api creds + If ($Script:LMAuth.Valid) { + + #Lookup Id if supplying AdminName + If ($Name) { + $LookupResult = (Get-LMUser -Name $Name).Id + If (Test-LookupResult -Result $LookupResult -LookupString $Name) { + return + } + $Id = $LookupResult + } + + #Get Dashboard JSON response + If ($DashboardId) { + $Dashboard = Get-LMDashboard -Id $DashboardId + If (Test-LookupResult -Result $Dashboard -LookupString $DashboardId) { + return + } + $Value = $Dashboard | ConvertTo-Json + } + + #Build header and uri + $ResourcePath = "/setting/userdata/$Id.user.default.dashboard" + + If ($PSItem) { + $Message = "Id: $Id | AccessId: $($PSItem.accessId)| AdminName:$($PSItem.adminName)" + } + Else { + $Message = "Id: $Id" + } + + Try { + $Data = @{ + id = "$Id.user.default.dashboard" + value = $Value + } + + #Remove empty keys so we dont overwrite them + @($Data.keys) | ForEach-Object { If ([string]::IsNullOrEmpty($Data[$_]) -and ($_ -notin @($MyInvocation.BoundParameters.Keys))) { $Data.Remove($_) } } + + If ($Status) { + $Data.status = $(If ($Status -eq "active") { 2 }Else { 1 }) + } + + $Data = ($Data | ConvertTo-Json) + + If ($PSCmdlet.ShouldProcess($Message, "Set API Token")) { + $Headers = New-LMHeader -Auth $Script:LMAuth -Method "PATCH" -ResourcePath $ResourcePath -Data $Data + $Uri = "https://$($Script:LMAuth.Portal).logicmonitor.com/santaba/rest" + $ResourcePath + + Resolve-LMDebugInfo -Url $Uri -Headers $Headers[0] -Command $MyInvocation -Payload $Data + + #Issue request + $Response = Invoke-RestMethod -Uri $Uri -Method "PATCH" -Headers $Headers[0] -WebSession $Headers[1] -Body $Data + + $Result = [PSCustomObject]@{ + Id = $Id + Message = "Successfully updated userdata for default dashboard to id: ($DashboardId)" + } + + Return $Result + } + } + Catch [Exception] { + $Proceed = Resolve-LMException -LMException $PSItem + If (!$Proceed) { + Return + } + } + } + Else { + Write-Error "Please ensure you are logged in before running any commands, use Connect-LMAccount to login and try again." + } + } + End {} +} diff --git a/README.md b/README.md index 2f98da6..f5a2c7e 100644 --- a/README.md +++ b/README.md @@ -409,18 +409,30 @@ This change aims to enhance visibility within the community and to foster a more We appreciate your continued support and enthusiasm for the Logic.Monitor PowerShell module. Your contributions and feedback are vital to the success of this project, and we look forward to seeing how the module evolves with your participation. -## 6.0 +## 6.1 ### New Cmdlets: - - **Get-LMDeviceInstanceData**: This cmdlet retrieves data for LogicMonitor device instances based on the specified parameters. The cmdlet can only retrieve data within the last 24 hours. You can use `Get-LMDeviceInstanceList` to quickly get a list of instances for a particular device. - - **New-LMAlertEscalation**: This cmdlet invokes an escalation for a LogicMonitor alert. It takes a *-Ids* parameter which is an array of alert ids to escalate. - - **Get-LMAccessGroup**: This cmdlet will retrieve data for specified LogicMonitor access groups. You can retrieve all access groups or limit the results using *-Id*, *-Name* or *-Filter* parameters. - - **Note**: Access Groups are not available in all portals and needs to be enabled before any access group commands can be utilized. - + - **Get-LMAWSAccountId**: This cmdlet is used to retrieve the AWS Account ID associated with the LogicMonitor account. + - **Get-LMConfigsourceUpdateHistory**: This cmdlet retrieves the update history for a LogicMonitor configuration source. It can be used to get information about the updates made to a configuration source, such as the update reasons and the modules that were updated.. + - **Invoke-LMAWSAccountTest**: This cmdlet will test for required permissions needed to add an AWS account to LogicMonitor. + ``` + Invoke-LMAWSAccountTest -ExternalId "123456" -AccountId "987654" -AccessId "AKI123" -AccessKey "abc123" -AssumedRoleARN "arn:aws:iam::123456789012:role/MyRole" -CheckedServices "EC2,S3,RDS" -GroupId 123 + ``` +- **Invoke-LMAzureAccountTest**: This cmdlet will test for required permissions needed to add an Azure account to LogicMonitor. + ``` + Invoke-LMAzureAccountTest -ClientId "xxxxxxxx" -SecretKey "xxxxxxxx" -SubscriptionIds "xxxxxxxx" + ``` +- **Invoke-LMAzureSubscriptionDiscovery**: This cmdlet invokes the Azure subscription discovery process to return subscriptions for a specified client Id. + ``` + Invoke-LMAzureSubscriptionDiscovery -ClientId "xxxxxxxx" -SecretKey "xxxxxxxx" -TenantId "xxxxxxxx" + ``` +- **Invoke-LMGCPAccountTest**: This cmdlet will test for required permissions needed to add an GCP project to LogicMonitor. + ``` + Invoke-LMGCPAccountTest -ServiceAccountKey "service-account-key" -ProjectId "project-id" + ``` ### Updated Cmdlets: - - **Set-LMDeviceDatasourceInstanceAlertSetting**: AlertForNoData, AlertClearTransitionInterval and AlertTransitionInterval parameters are now mandatory as a result of endpoint changes for LM APIv3. These values can now be set at instance and group level overrides and as a result must be specified when modifying alert thresholds. - - **Set-LMDeviceGroupDatasourceAlertSetting**: AlertForNoData, AlertClearTransitionInterval and AlertTransitionInterval parameters are now mandatory as a result of endpoint changes for LM APIv3. These values can now be set at instance and group level overrides and as a result must be specified when modifying alert thresholds. + - **Get-LMDatasourceUpdateHistory**: Added custom object return type *LogicMonitor.ModuleUpdateHistory*. + - **Set-LMDevice**: Added additional parameter `-AutoBalancedCollectorGroupId` to specify an auto balanced collector group. [Previous Release Notes](RELEASENOTES.md) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 1492bb7..5451f5d 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,3 +1,16 @@ +## 6.0 +### New Cmdlets: + - **Get-LMDeviceInstanceData**: This cmdlet retrieves data for LogicMonitor device instances based on the specified parameters. The cmdlet can only retrieve data within the last 24 hours. You can use `Get-LMDeviceInstanceList` to quickly get a list of instances for a particular device. + - **New-LMAlertEscalation**: This cmdlet invokes an escalation for a LogicMonitor alert. It takes a *-Ids* parameter which is an array of alert ids to escalate. + - **Get-LMAccessGroup**: This cmdlet will retrieve data for specified LogicMonitor access groups. You can retrieve all access groups or limit the results using *-Id*, *-Name* or *-Filter* parameters. + + **Note**: Access Groups are not available in all portals and needs to be enabled before any access group commands can be utilized. + + +### Updated Cmdlets: + - **Set-LMDeviceDatasourceInstanceAlertSetting**: AlertForNoData, AlertClearTransitionInterval and AlertTransitionInterval parameters are now mandatory as a result of endpoint changes for LM APIv3. These values can now be set at instance and group level overrides and as a result must be specified when modifying alert thresholds. + - **Set-LMDeviceGroupDatasourceAlertSetting**: AlertForNoData, AlertClearTransitionInterval and AlertTransitionInterval parameters are now mandatory as a result of endpoint changes for LM APIv3. These values can now be set at instance and group level overrides and as a result must be specified when modifying alert thresholds. + # Previous module release notes ## 5.1.3 ### Updated Cmdlets: diff --git a/en-US/Logic.Monitor-help.xml b/en-US/Logic.Monitor-help.xml index 37857cf..1e391b0 100644 --- a/en-US/Logic.Monitor-help.xml +++ b/en-US/Logic.Monitor-help.xml @@ -542,6 +542,10 @@ + + Module repo: https://github.com/logicmonitor/lm-powershell-module + + PSGallery: https://www.powershellgallery.com/packages/Logic.Monitor @@ -1289,6 +1293,10 @@ Creates a copy of the device specified by the $deviceObject variable with the na + + Module repo: https://github.com/logicmonitor/lm-powershell-module + + PSGallery: https://www.powershellgallery.com/packages/Logic.Monitor @@ -1542,6 +1550,10 @@ Creates a copy of the device specified by the $deviceObject variable with the na + + Module repo: https://github.com/logicmonitor/lm-powershell-module + + PSGallery: https://www.powershellgallery.com/packages/Logic.Monitor @@ -2439,12 +2451,244 @@ Creates a copy of the device specified by the $deviceObject variable with the na + + Module repo: https://github.com/logicmonitor/lm-powershell-module + + PSGallery: https://www.powershellgallery.com/packages/Logic.Monitor + + + Get-LMAccessGroup + Get + LMAccessGroup + + Retrieves LogicMonitor access groups based on specified parameters. + + + + The Get-LMAccessGroup function retrieves LogicMonitor access groups based on the specified parameters. It supports retrieving access groups by ID, name, or using a filter. The function uses the LogicMonitor REST API to make the requests. + + + + Get-LMAccessGroup + + Id + + Specifies the ID of the access group to retrieve. This parameter is mutually exclusive with the Name and Filter parameters. + + Int32 + + Int32 + + + 0 + + + BatchSize + + Specifies the number of access groups to retrieve per request. The default value is 1000. + + Int32 + + Int32 + + + 1000 + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + Get-LMAccessGroup + + Name + + Specifies the name of the access group to retrieve. This parameter is mutually exclusive with the Id and Filter parameters. + + String + + String + + + None + + + BatchSize + + Specifies the number of access groups to retrieve per request. The default value is 1000. + + Int32 + + Int32 + + + 1000 + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + Get-LMAccessGroup + + Filter + + Specifies a filter object to retrieve access groups based on custom filter criteria. This parameter is mutually exclusive with the Id and Name parameters. + + Object + + Object + + + None + + + BatchSize + + Specifies the number of access groups to retrieve per request. The default value is 1000. + + Int32 + + Int32 + + + 1000 + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + Id + + Specifies the ID of the access group to retrieve. This parameter is mutually exclusive with the Name and Filter parameters. + + Int32 + + Int32 + + + 0 + + + Name + + Specifies the name of the access group to retrieve. This parameter is mutually exclusive with the Id and Filter parameters. + + String + + String + + + None + + + Filter + + Specifies a filter object to retrieve access groups based on custom filter criteria. This parameter is mutually exclusive with the Id and Name parameters. + + Object + + Object + + + None + + + BatchSize + + Specifies the number of access groups to retrieve per request. The default value is 1000. + + Int32 + + Int32 + + + 1000 + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + + This function requires a valid LogicMonitor API authentication. Use Connect-LMAccount to authenticate before running this function. + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-LMAccessGroup -Id 123 +Retrieves the access group with the specified ID. + + + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-LMAccessGroup -Name "MyAccessGroup" +Retrieves the access group with the specified name. + + + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-LMAccessGroup -Filter @{ Property = "Value" } +Retrieves access groups based on the specified filter criteria. + + + + + + + Get-LMAccountStatus @@ -4071,6 +4315,73 @@ Retrieves audit logs that contain the search string "login" and occurred within + + + Get-LMAWSAccountId + Get + LMAWSAccountId + + Retrieves the AWS Account ID associated with the LogicMonitor account. + + + + The Get-LMAWSAccountId function is used to retrieve the AWS Account ID associated with the LogicMonitor account. It checks if the user is logged in and has valid API credentials. If the user is logged in, it builds the necessary headers and URI, and then sends a GET request to the LogicMonitor API to retrieve the AWS Account ID. The function returns the response containing the AWS Account ID. + + + + Get-LMAWSAccountId + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-LMAWSAccountId +Retrieves the AWS Account ID associated with the LogicMonitor account. + + + + + + + + Online Version: + https://www.logicmonitor.com/support/rest-api-developers-guide/ + + + Get-LMCachedAccount @@ -5563,6 +5874,282 @@ Retrieves configuration sources based on the specified filter criteria. + + + Get-LMConfigsourceUpdateHistory + Get + LMConfigsourceUpdateHistory + + Retrieves the update history for a LogicMonitor configuration source. + + + + The Get-LMConfigsourceUpdateHistory function retrieves the update history for a LogicMonitor configuration source. It can be used to get information about the updates made to a configuration source, such as the update reasons and the modules that were updated. + + + + Get-LMConfigsourceUpdateHistory + + Id + + The ID of the configuration source. This parameter is mandatory when using the 'Id' parameter set. + + Int32 + + Int32 + + + 0 + + + Filter + + A filter object that specifies additional filtering criteria for the update history. This parameter is optional. + + Object + + Object + + + None + + + BatchSize + + The number of results to retrieve per request. The default value is 1000. This parameter is optional. + + Int32 + + Int32 + + + 1000 + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + Get-LMConfigsourceUpdateHistory + + Name + + The name of the configuration source. This parameter is used to look up the ID of the configuration source. This parameter is used when using the 'Name' parameter set. + + String + + String + + + None + + + Filter + + A filter object that specifies additional filtering criteria for the update history. This parameter is optional. + + Object + + Object + + + None + + + BatchSize + + The number of results to retrieve per request. The default value is 1000. This parameter is optional. + + Int32 + + Int32 + + + 1000 + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + Get-LMConfigsourceUpdateHistory + + DisplayName + + The display name of the configuration source. This parameter is used to look up the ID of the configuration source. This parameter is used when using the 'DisplayName' parameter set. + + String + + String + + + None + + + Filter + + A filter object that specifies additional filtering criteria for the update history. This parameter is optional. + + Object + + Object + + + None + + + BatchSize + + The number of results to retrieve per request. The default value is 1000. This parameter is optional. + + Int32 + + Int32 + + + 1000 + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + Id + + The ID of the configuration source. This parameter is mandatory when using the 'Id' parameter set. + + Int32 + + Int32 + + + 0 + + + Name + + The name of the configuration source. This parameter is used to look up the ID of the configuration source. This parameter is used when using the 'Name' parameter set. + + String + + String + + + None + + + DisplayName + + The display name of the configuration source. This parameter is used to look up the ID of the configuration source. This parameter is used when using the 'DisplayName' parameter set. + + String + + String + + + None + + + Filter + + A filter object that specifies additional filtering criteria for the update history. This parameter is optional. + + Object + + Object + + + None + + + BatchSize + + The number of results to retrieve per request. The default value is 1000. This parameter is optional. + + Int32 + + Int32 + + + 1000 + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-LMConfigsourceUpdateHistory -Id 1234 +Retrieves the update history for the configuration source with the ID 1234. + + + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-LMConfigsourceUpdateHistory -Name "MyConfigSource" +Retrieves the update history for the configuration source with the name "MyConfigSource". + + + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-LMConfigsourceUpdateHistory -DisplayName "My Config Source" +Retrieves the update history for the configuration source with the display name "My Config Source". + + + + + + + Get-LMDashboard @@ -8462,50 +9049,50 @@ Retrieves the dashboards that match the specified custom filter. Get LMDatasourceUpdateHistory - {{ Fill in the Synopsis }} + Retrieves the update history of a LogicMonitor datasource. - {{ Fill in the Description }} + The Get-LMDatasourceUpdateHistory function retrieves the update history of a LogicMonitor datasource. It can be used to get information about the updates made to a datasource, such as the reasons for the updates. Get-LMDatasourceUpdateHistory - - BatchSize + + Id - {{ Fill BatchSize Description }} + The ID of the datasource. This parameter is mandatory when using the 'Id' parameter set. Int32 Int32 - None + 0 - DisplayName + Filter - {{ Fill DisplayName Description }} + A filter object that can be used to filter the results. The filter object should contain properties that match the properties of the datasource. Only datasources that match the filter will be included in the results. - String + Object - String + Object None - Filter + BatchSize - {{ Fill Filter Description }} + The number of results to retrieve in each batch. The default value is 1000. - Object + Int32 - Object + Int32 - None + 1000 ProgressAction @@ -8523,13 +9110,13 @@ Retrieves the dashboards that match the specified custom filter. Get-LMDatasourceUpdateHistory - BatchSize + Name - {{ Fill BatchSize Description }} + The name of the datasource. This parameter is used to look up the ID of the datasource. If the name is provided, the function will automatically retrieve the ID of the datasource. This parameter is used in the 'Name' parameter set. - Int32 + String - Int32 + String None @@ -8537,7 +9124,7 @@ Retrieves the dashboards that match the specified custom filter. Filter - {{ Fill Filter Description }} + A filter object that can be used to filter the results. The filter object should contain properties that match the properties of the datasource. Only datasources that match the filter will be included in the results. Object @@ -8546,17 +9133,17 @@ Retrieves the dashboards that match the specified custom filter. None - - Id + + BatchSize - {{ Fill Id Description }} + The number of results to retrieve in each batch. The default value is 1000. Int32 Int32 - None + 1000 ProgressAction @@ -8574,13 +9161,13 @@ Retrieves the dashboards that match the specified custom filter. Get-LMDatasourceUpdateHistory - BatchSize + DisplayName - {{ Fill BatchSize Description }} + The display name of the datasource. This parameter is used to look up the ID of the datasource. If the display name is provided, the function will automatically retrieve the ID of the datasource. This parameter is used in the 'DisplayName' parameter set. - Int32 + String - Int32 + String None @@ -8588,7 +9175,7 @@ Retrieves the dashboards that match the specified custom filter. Filter - {{ Fill Filter Description }} + A filter object that can be used to filter the results. The filter object should contain properties that match the properties of the datasource. Only datasources that match the filter will be included in the results. Object @@ -8598,16 +9185,16 @@ Retrieves the dashboards that match the specified custom filter. None - Name + BatchSize - {{ Fill Name Description }} + The number of results to retrieve in each batch. The default value is 1000. - String + Int32 - String + Int32 - None + 1000 ProgressAction @@ -8624,22 +9211,22 @@ Retrieves the dashboards that match the specified custom filter. - - BatchSize + + Id - {{ Fill BatchSize Description }} + The ID of the datasource. This parameter is mandatory when using the 'Id' parameter set. Int32 Int32 - None + 0 - DisplayName + Name - {{ Fill DisplayName Description }} + The name of the datasource. This parameter is used to look up the ID of the datasource. If the name is provided, the function will automatically retrieve the ID of the datasource. This parameter is used in the 'Name' parameter set. String @@ -8649,40 +9236,40 @@ Retrieves the dashboards that match the specified custom filter. None - Filter + DisplayName - {{ Fill Filter Description }} + The display name of the datasource. This parameter is used to look up the ID of the datasource. If the display name is provided, the function will automatically retrieve the ID of the datasource. This parameter is used in the 'DisplayName' parameter set. - Object + String - Object + String None - - Id + + Filter - {{ Fill Id Description }} + A filter object that can be used to filter the results. The filter object should contain properties that match the properties of the datasource. Only datasources that match the filter will be included in the results. - Int32 + Object - Int32 + Object None - Name + BatchSize - {{ Fill Name Description }} + The number of results to retrieve in each batch. The default value is 1000. - String + Int32 - String + Int32 - None + 1000 ProgressAction @@ -8697,26 +9284,8 @@ Retrieves the dashboards that match the specified custom filter. None - - - - None - - - - - - - - - - System.Object - - - - - - + + @@ -8724,10 +9293,27 @@ Retrieves the dashboards that match the specified custom filter. - -------------------------- Example 1 -------------------------- - PS C:\> {{ Add example code here }} + -------------------------- EXAMPLE 1 -------------------------- + Get-LMDatasourceUpdateHistory -Id 1234 +Retrieves the update history of the datasource with ID 1234. - {{ Add example description here }} + + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-LMDatasourceUpdateHistory -Name "MyDatasource" +Retrieves the update history of the datasource with the name "MyDatasource". + + + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-LMDatasourceUpdateHistory -DisplayName "My Datasource" +Retrieves the update history of the datasource with the display name "My Datasource". + + @@ -14745,129 +15331,78 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceInstanceList + Get-LMDeviceInstanceData Get - LMDeviceInstanceList + LMDeviceInstanceData - {{ Fill in the Synopsis }} + Retrieves data for LogicMonitor device instances. - {{ Fill in the Description }} + The Get-LMDeviceInstanceData function retrieves data for LogicMonitor device instances based on the specified parameters. - Get-LMDeviceInstanceList - - BatchSize - - {{ Fill BatchSize Description }} - - Int32 - - Int32 - - - None - - - CountOnly - - {{ Fill CountOnly Description }} - - Boolean - - Boolean - - - None - - - Filter - - {{ Fill Filter Description }} - - Object - - Object - - - None - - - Id - - {{ Fill Id Description }} - - Int32 - - Int32 - - - None - - - ProgressAction + Get-LMDeviceInstanceData + + StartDate - {{ Fill ProgressAction Description }} + The start date for the data retrieval. If not specified, the function uses the default value of 24 hours ago which is the max timeframe for this endpoint. - ActionPreference + DateTime - ActionPreference + DateTime None - - - Get-LMDeviceInstanceList - - BatchSize + + EndDate - {{ Fill BatchSize Description }} + The end date for the data retrieval. If not specified, the function uses the current date and time. - Int32 + DateTime - Int32 + DateTime None - - CountOnly + + Ids - {{ Fill CountOnly Description }} + The array of device instance IDs for which to retrieve data. This parameter is mandatory. - Boolean + String[] - Boolean + String[] None - - Filter + + AggregationType - {{ Fill Filter Description }} + The type of aggregation to apply to the retrieved data. Valid values are "first", "last", "min", "max", "sum", "average", and "none". The default value is "none". - Object + String - Object + String None - - Name + + Period - {{ Fill Name Description }} + The period for the data retrieval. The default value is 1. - String + Double - String + Double - None + 1 ProgressAction @@ -14884,65 +15419,65 @@ Retrieves the dashboards that match the specified custom filter. - - BatchSize + + StartDate - {{ Fill BatchSize Description }} + The start date for the data retrieval. If not specified, the function uses the default value of 24 hours ago which is the max timeframe for this endpoint. - Int32 + DateTime - Int32 + DateTime None - - CountOnly + + EndDate - {{ Fill CountOnly Description }} + The end date for the data retrieval. If not specified, the function uses the current date and time. - Boolean + DateTime - Boolean + DateTime None - - Filter + + Ids - {{ Fill Filter Description }} + The array of device instance IDs for which to retrieve data. This parameter is mandatory. - Object + String[] - Object + String[] None - - Id + + AggregationType - {{ Fill Id Description }} + The type of aggregation to apply to the retrieved data. Valid values are "first", "last", "min", "max", "sum", "average", and "none". The default value is "none". - Int32 + String - Int32 + String None - - Name + + Period - {{ Fill Name Description }} + The period for the data retrieval. The default value is 1. - String + Double - String + Double - None + 1 ProgressAction @@ -14957,37 +15492,20 @@ Retrieves the dashboards that match the specified custom filter. None - - - - None - - - - - - - - - - System.Object - - - - - - + + - + This function requires a valid LogicMonitor API authentication. Make sure to log in using Connect-LMAccount before running this command. - -------------------------- Example 1 -------------------------- - PS C:\> {{ Add example code here }} + -------------------------- EXAMPLE 1 -------------------------- + Get-LMDeviceInstanceData -StartDate (Get-Date).AddHours(-7) -EndDate (Get-Date) -Ids "12345", "67890" -AggregationType "average" -Period 1 +Retrieves data for the device instances with IDs "12345" and "67890" for the past 7 hours, using an average aggregation and a period of 1 day. - {{ Add example description here }} + @@ -14995,9 +15513,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceNetflowEndpoints + Get-LMDeviceInstanceList Get - LMDeviceNetflowEndpoints + LMDeviceInstanceList {{ Fill in the Synopsis }} @@ -15007,7 +15525,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceNetflowEndpoints + Get-LMDeviceInstanceList BatchSize @@ -15021,13 +15539,13 @@ Retrieves the dashboards that match the specified custom filter. None - EndDate + CountOnly - {{ Fill EndDate Description }} + {{ Fill CountOnly Description }} - DateTime + Boolean - DateTime + Boolean None @@ -15056,18 +15574,6 @@ Retrieves the dashboards that match the specified custom filter. None - - StartDate - - {{ Fill StartDate Description }} - - DateTime - - DateTime - - - None - ProgressAction @@ -15082,7 +15588,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceNetflowEndpoints + Get-LMDeviceInstanceList BatchSize @@ -15096,13 +15602,13 @@ Retrieves the dashboards that match the specified custom filter. None - EndDate + CountOnly - {{ Fill EndDate Description }} + {{ Fill CountOnly Description }} - DateTime + Boolean - DateTime + Boolean None @@ -15131,18 +15637,6 @@ Retrieves the dashboards that match the specified custom filter. None - - StartDate - - {{ Fill StartDate Description }} - - DateTime - - DateTime - - - None - ProgressAction @@ -15171,13 +15665,13 @@ Retrieves the dashboards that match the specified custom filter. None - EndDate + CountOnly - {{ Fill EndDate Description }} + {{ Fill CountOnly Description }} - DateTime + Boolean - DateTime + Boolean None @@ -15218,18 +15712,6 @@ Retrieves the dashboards that match the specified custom filter. None - - StartDate - - {{ Fill StartDate Description }} - - DateTime - - DateTime - - - None - ProgressAction @@ -15281,9 +15763,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceNetflowFlows + Get-LMDeviceNetflowEndpoints Get - LMDeviceNetflowFlows + LMDeviceNetflowEndpoints {{ Fill in the Synopsis }} @@ -15293,7 +15775,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceNetflowFlows + Get-LMDeviceNetflowEndpoints BatchSize @@ -15368,7 +15850,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceNetflowFlows + Get-LMDeviceNetflowEndpoints BatchSize @@ -15567,9 +16049,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceNetflowPorts + Get-LMDeviceNetflowFlows Get - LMDeviceNetflowPorts + LMDeviceNetflowFlows {{ Fill in the Synopsis }} @@ -15579,7 +16061,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceNetflowPorts + Get-LMDeviceNetflowFlows BatchSize @@ -15654,7 +16136,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceNetflowPorts + Get-LMDeviceNetflowFlows BatchSize @@ -15853,9 +16335,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceProperty + Get-LMDeviceNetflowPorts Get - LMDeviceProperty + LMDeviceNetflowPorts {{ Fill in the Synopsis }} @@ -15865,7 +16347,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceProperty + Get-LMDeviceNetflowPorts BatchSize @@ -15879,64 +16361,13 @@ Retrieves the dashboards that match the specified custom filter. None - DisplayName - - {{ Fill DisplayName Description }} - - String - - String - - - None - - - Filter - - {{ Fill Filter Description }} - - Object - - Object - - - None - - - PropertyName - - {{ Fill PropertyName Description }} - - String - - String - - - None - - - ProgressAction - - {{ Fill ProgressAction Description }} - - ActionPreference - - ActionPreference - - - None - - - - Get-LMDeviceProperty - - BatchSize + EndDate - {{ Fill BatchSize Description }} + {{ Fill EndDate Description }} - Int32 + DateTime - Int32 + DateTime None @@ -15966,13 +16397,13 @@ Retrieves the dashboards that match the specified custom filter. None - PropertyName + StartDate - {{ Fill PropertyName Description }} + {{ Fill StartDate Description }} - String + DateTime - String + DateTime None @@ -15991,7 +16422,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceProperty + Get-LMDeviceNetflowPorts BatchSize @@ -16004,6 +16435,18 @@ Retrieves the dashboards that match the specified custom filter. None + + EndDate + + {{ Fill EndDate Description }} + + DateTime + + DateTime + + + None + Filter @@ -16029,13 +16472,13 @@ Retrieves the dashboards that match the specified custom filter. None - PropertyName + StartDate - {{ Fill PropertyName Description }} + {{ Fill StartDate Description }} - String + DateTime - String + DateTime None @@ -16068,13 +16511,13 @@ Retrieves the dashboards that match the specified custom filter. None - DisplayName + EndDate - {{ Fill DisplayName Description }} + {{ Fill EndDate Description }} - String + DateTime - String + DateTime None @@ -16116,13 +16559,13 @@ Retrieves the dashboards that match the specified custom filter. None - PropertyName + StartDate - {{ Fill PropertyName Description }} + {{ Fill StartDate Description }} - String + DateTime - String + DateTime None @@ -16178,9 +16621,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceSDT + Get-LMDeviceProperty Get - LMDeviceSDT + LMDeviceProperty {{ Fill in the Synopsis }} @@ -16190,7 +16633,70 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceSDT + Get-LMDeviceProperty + + BatchSize + + {{ Fill BatchSize Description }} + + Int32 + + Int32 + + + None + + + DisplayName + + {{ Fill DisplayName Description }} + + String + + String + + + None + + + Filter + + {{ Fill Filter Description }} + + Object + + Object + + + None + + + PropertyName + + {{ Fill PropertyName Description }} + + String + + String + + + None + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + Get-LMDeviceProperty BatchSize @@ -16227,6 +16733,18 @@ Retrieves the dashboards that match the specified custom filter. None + + PropertyName + + {{ Fill PropertyName Description }} + + String + + String + + + None + ProgressAction @@ -16241,7 +16759,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceSDT + Get-LMDeviceProperty BatchSize @@ -16278,6 +16796,18 @@ Retrieves the dashboards that match the specified custom filter. None + + PropertyName + + {{ Fill PropertyName Description }} + + String + + String + + + None + ProgressAction @@ -16305,6 +16835,18 @@ Retrieves the dashboards that match the specified custom filter. None + + DisplayName + + {{ Fill DisplayName Description }} + + String + + String + + + None + Filter @@ -16341,6 +16883,18 @@ Retrieves the dashboards that match the specified custom filter. None + + PropertyName + + {{ Fill PropertyName Description }} + + String + + String + + + None + ProgressAction @@ -16392,9 +16946,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceSDTHistory + Get-LMDeviceSDT Get - LMDeviceSDTHistory + LMDeviceSDT {{ Fill in the Synopsis }} @@ -16404,7 +16958,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceSDTHistory + Get-LMDeviceSDT BatchSize @@ -16455,7 +17009,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMDeviceSDTHistory + Get-LMDeviceSDT BatchSize @@ -16606,9 +17160,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMEscalationChain + Get-LMDeviceSDTHistory Get - LMEscalationChain + LMDeviceSDTHistory {{ Fill in the Synopsis }} @@ -16618,7 +17172,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMEscalationChain + Get-LMDeviceSDTHistory BatchSize @@ -16643,34 +17197,7 @@ Retrieves the dashboards that match the specified custom filter. None - - ProgressAction - - {{ Fill ProgressAction Description }} - - ActionPreference - - ActionPreference - - - None - - - - Get-LMEscalationChain - - BatchSize - - {{ Fill BatchSize Description }} - - Int32 - - Int32 - - - None - - + Id {{ Fill Id Description }} @@ -16696,7 +17223,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMEscalationChain + Get-LMDeviceSDTHistory BatchSize @@ -16709,6 +17236,18 @@ Retrieves the dashboards that match the specified custom filter. None + + Filter + + {{ Fill Filter Description }} + + Object + + Object + + + None + Name @@ -16760,7 +17299,7 @@ Retrieves the dashboards that match the specified custom filter. None - + Id {{ Fill Id Description }} @@ -16835,9 +17374,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMEventSource + Get-LMEscalationChain Get - LMEventSource + LMEscalationChain {{ Fill in the Synopsis }} @@ -16847,7 +17386,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMEventSource + Get-LMEscalationChain BatchSize @@ -16886,7 +17425,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMEventSource + Get-LMEscalationChain BatchSize @@ -16925,7 +17464,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMEventSource + Get-LMEscalationChain BatchSize @@ -17064,9 +17603,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMIntegrationLogs + Get-LMEventSource Get - LMIntegrationLogs + LMEventSource {{ Fill in the Synopsis }} @@ -17076,7 +17615,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMIntegrationLogs + Get-LMEventSource BatchSize @@ -17090,37 +17629,13 @@ Retrieves the dashboards that match the specified custom filter. None - EndDate - - {{ Fill EndDate Description }} - - DateTime - - DateTime - - - None - - - SearchString - - {{ Fill SearchString Description }} - - String - - String - - - None - - - StartDate + Filter - {{ Fill StartDate Description }} + {{ Fill Filter Description }} - DateTime + Object - DateTime + Object None @@ -17139,7 +17654,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMIntegrationLogs + Get-LMEventSource BatchSize @@ -17153,13 +17668,13 @@ Retrieves the dashboards that match the specified custom filter. None - Filter + Id - {{ Fill Filter Description }} + {{ Fill Id Description }} - Object + Int32 - Object + Int32 None @@ -17178,7 +17693,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMIntegrationLogs + Get-LMEventSource BatchSize @@ -17192,9 +17707,9 @@ Retrieves the dashboards that match the specified custom filter. None - Id + Name - {{ Fill Id Description }} + {{ Fill Name Description }} String @@ -17230,18 +17745,6 @@ Retrieves the dashboards that match the specified custom filter. None - - EndDate - - {{ Fill EndDate Description }} - - DateTime - - DateTime - - - None - Filter @@ -17259,17 +17762,17 @@ Retrieves the dashboards that match the specified custom filter. {{ Fill Id Description }} - String + Int32 - String + Int32 None - SearchString + Name - {{ Fill SearchString Description }} + {{ Fill Name Description }} String @@ -17278,18 +17781,6 @@ Retrieves the dashboards that match the specified custom filter. None - - StartDate - - {{ Fill StartDate Description }} - - DateTime - - DateTime - - - None - ProgressAction @@ -17341,9 +17832,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMNetscan + Get-LMIntegrationLogs Get - LMNetscan + LMIntegrationLogs {{ Fill in the Synopsis }} @@ -17353,7 +17844,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMNetscan + Get-LMIntegrationLogs BatchSize @@ -17367,13 +17858,37 @@ Retrieves the dashboards that match the specified custom filter. None - Filter + EndDate - {{ Fill Filter Description }} + {{ Fill EndDate Description }} - Object + DateTime - Object + DateTime + + + None + + + SearchString + + {{ Fill SearchString Description }} + + String + + String + + + None + + + StartDate + + {{ Fill StartDate Description }} + + DateTime + + DateTime None @@ -17392,7 +17907,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMNetscan + Get-LMIntegrationLogs BatchSize @@ -17406,13 +17921,13 @@ Retrieves the dashboards that match the specified custom filter. None - Id + Filter - {{ Fill Id Description }} + {{ Fill Filter Description }} - Int32 + Object - Int32 + Object None @@ -17431,7 +17946,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMNetscan + Get-LMIntegrationLogs BatchSize @@ -17445,9 +17960,9 @@ Retrieves the dashboards that match the specified custom filter. None - Name + Id - {{ Fill Name Description }} + {{ Fill Id Description }} String @@ -17483,6 +17998,18 @@ Retrieves the dashboards that match the specified custom filter. None + + EndDate + + {{ Fill EndDate Description }} + + DateTime + + DateTime + + + None + Filter @@ -17500,17 +18027,17 @@ Retrieves the dashboards that match the specified custom filter. {{ Fill Id Description }} - Int32 + String - Int32 + String None - Name + SearchString - {{ Fill Name Description }} + {{ Fill SearchString Description }} String @@ -17519,6 +18046,18 @@ Retrieves the dashboards that match the specified custom filter. None + + StartDate + + {{ Fill StartDate Description }} + + DateTime + + DateTime + + + None + ProgressAction @@ -17570,9 +18109,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMNetscanExecution + Get-LMNetscan Get - LMNetscanExecution + LMNetscan {{ Fill in the Synopsis }} @@ -17582,7 +18121,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMNetscanExecution + Get-LMNetscan BatchSize @@ -17607,7 +18146,34 @@ Retrieves the dashboards that match the specified custom filter. None - + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + Get-LMNetscan + + BatchSize + + {{ Fill BatchSize Description }} + + Int32 + + Int32 + + + None + + Id {{ Fill Id Description }} @@ -17633,7 +18199,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMNetscanExecution + Get-LMNetscan BatchSize @@ -17647,18 +18213,6 @@ Retrieves the dashboards that match the specified custom filter. None - Filter - - {{ Fill Filter Description }} - - Object - - Object - - - None - - Name {{ Fill Name Description }} @@ -17709,7 +18263,7 @@ Retrieves the dashboards that match the specified custom filter. None - + Id {{ Fill Id Description }} @@ -17721,7 +18275,7 @@ Retrieves the dashboards that match the specified custom filter. None - + Name {{ Fill Name Description }} @@ -17784,9 +18338,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMNetscanExecutionDevices + Get-LMNetscanExecution Get - LMNetscanExecutionDevices + LMNetscanExecution {{ Fill in the Synopsis }} @@ -17796,7 +18350,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMNetscanExecutionDevices + Get-LMNetscanExecution BatchSize @@ -17833,18 +18387,6 @@ Retrieves the dashboards that match the specified custom filter. None - - NspId - - {{ Fill NspId Description }} - - String - - String - - - None - ProgressAction @@ -17859,7 +18401,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMNetscanExecutionDevices + Get-LMNetscanExecution BatchSize @@ -17885,9 +18427,9 @@ Retrieves the dashboards that match the specified custom filter. None - NspName + Name - {{ Fill NspName Description }} + {{ Fill Name Description }} String @@ -17948,21 +18490,9 @@ Retrieves the dashboards that match the specified custom filter. None - NspId - - {{ Fill NspId Description }} - - String - - String - - - None - - - NspName + Name - {{ Fill NspName Description }} + {{ Fill Name Description }} String @@ -18022,9 +18552,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMNetscanGroup + Get-LMNetscanExecutionDevices Get - LMNetscanGroup + LMNetscanExecutionDevices {{ Fill in the Synopsis }} @@ -18034,7 +18564,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMNetscanGroup + Get-LMNetscanExecutionDevices BatchSize @@ -18059,25 +18589,10 @@ Retrieves the dashboards that match the specified custom filter. None - - ProgressAction - - {{ Fill ProgressAction Description }} - - ActionPreference - - ActionPreference - - - None - - - - Get-LMNetscanGroup - - BatchSize + + Id - {{ Fill BatchSize Description }} + {{ Fill Id Description }} Int32 @@ -18086,14 +18601,14 @@ Retrieves the dashboards that match the specified custom filter. None - - Id + + NspId - {{ Fill Id Description }} + {{ Fill NspId Description }} - Int32 + String - Int32 + String None @@ -18112,7 +18627,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMNetscanGroup + Get-LMNetscanExecutionDevices BatchSize @@ -18126,9 +18641,21 @@ Retrieves the dashboards that match the specified custom filter. None - Name + Filter - {{ Fill Name Description }} + {{ Fill Filter Description }} + + Object + + Object + + + None + + + NspName + + {{ Fill NspName Description }} String @@ -18176,7 +18703,7 @@ Retrieves the dashboards that match the specified custom filter. None - + Id {{ Fill Id Description }} @@ -18188,10 +18715,22 @@ Retrieves the dashboards that match the specified custom filter. None - - Name + + NspId - {{ Fill Name Description }} + {{ Fill NspId Description }} + + String + + String + + + None + + + NspName + + {{ Fill NspName Description }} String @@ -18251,9 +18790,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMOpsNote + Get-LMNetscanGroup Get - LMOpsNote + LMNetscanGroup {{ Fill in the Synopsis }} @@ -18263,7 +18802,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMOpsNote + Get-LMNetscanGroup BatchSize @@ -18302,7 +18841,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMOpsNote + Get-LMNetscanGroup BatchSize @@ -18320,9 +18859,9 @@ Retrieves the dashboards that match the specified custom filter. {{ Fill Id Description }} - String + Int32 - String + Int32 None @@ -18341,7 +18880,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMOpsNote + Get-LMNetscanGroup BatchSize @@ -18355,9 +18894,9 @@ Retrieves the dashboards that match the specified custom filter. None - Tag + Name - {{ Fill Tag Description }} + {{ Fill Name Description }} String @@ -18410,17 +18949,17 @@ Retrieves the dashboards that match the specified custom filter. {{ Fill Id Description }} - String + Int32 - String + Int32 None - Tag + Name - {{ Fill Tag Description }} + {{ Fill Name Description }} String @@ -18480,88 +19019,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMPortalInfo - Get - LMPortalInfo - - {{ Fill in the Synopsis }} - - - - {{ Fill in the Description }} - - - - Get-LMPortalInfo - - ProgressAction - - {{ Fill ProgressAction Description }} - - ActionPreference - - ActionPreference - - - None - - - - - - ProgressAction - - {{ Fill ProgressAction Description }} - - ActionPreference - - ActionPreference - - - None - - - - - - None - - - - - - - - - - System.Object - - - - - - - - - - - - - - -------------------------- Example 1 -------------------------- - PS C:\> {{ Add example code here }} - - {{ Add example description here }} - - - - - - - - Get-LMPropertySource + Get-LMOpsNote Get - LMPropertySource + LMOpsNote {{ Fill in the Synopsis }} @@ -18571,7 +19031,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMPropertySource + Get-LMOpsNote BatchSize @@ -18610,7 +19070,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMPropertySource + Get-LMOpsNote BatchSize @@ -18628,9 +19088,9 @@ Retrieves the dashboards that match the specified custom filter. {{ Fill Id Description }} - Int32 + String - Int32 + String None @@ -18649,7 +19109,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMPropertySource + Get-LMOpsNote BatchSize @@ -18663,9 +19123,9 @@ Retrieves the dashboards that match the specified custom filter. None - Name + Tag - {{ Fill Name Description }} + {{ Fill Tag Description }} String @@ -18718,17 +19178,17 @@ Retrieves the dashboards that match the specified custom filter. {{ Fill Id Description }} - Int32 + String - Int32 + String None - Name + Tag - {{ Fill Name Description }} + {{ Fill Tag Description }} String @@ -18788,9 +19248,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMRecipientGroup + Get-LMPortalInfo Get - LMRecipientGroup + LMPortalInfo {{ Fill in the Synopsis }} @@ -18800,7 +19260,86 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMRecipientGroup + Get-LMPortalInfo + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + None + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> {{ Add example code here }} + + {{ Add example description here }} + + + + + + + + Get-LMPropertySource + Get + LMPropertySource + + {{ Fill in the Synopsis }} + + + + {{ Fill in the Description }} + + + + Get-LMPropertySource BatchSize @@ -18839,7 +19378,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMRecipientGroup + Get-LMPropertySource BatchSize @@ -18878,7 +19417,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMRecipientGroup + Get-LMPropertySource BatchSize @@ -19017,9 +19556,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMReport + Get-LMRecipientGroup Get - LMReport + LMRecipientGroup {{ Fill in the Synopsis }} @@ -19029,7 +19568,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMReport + Get-LMRecipientGroup BatchSize @@ -19068,7 +19607,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMReport + Get-LMRecipientGroup BatchSize @@ -19107,7 +19646,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMReport + Get-LMRecipientGroup BatchSize @@ -19246,9 +19785,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMReportGroup + Get-LMReport Get - LMReportGroup + LMReport {{ Fill in the Synopsis }} @@ -19258,7 +19797,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMReportGroup + Get-LMReport BatchSize @@ -19297,7 +19836,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMReportGroup + Get-LMReport BatchSize @@ -19336,7 +19875,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMReportGroup + Get-LMReport BatchSize @@ -19475,119 +20014,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMRepositoryLogicModules - Get - LMRepositoryLogicModules - - {{ Fill in the Synopsis }} - - - - {{ Fill in the Description }} - - - - Get-LMRepositoryLogicModules - - Type - - {{ Fill Type Description }} - - - datasource - propertyrules - eventsource - topologysource - configsource - - String - - String - - - None - - - ProgressAction - - {{ Fill ProgressAction Description }} - - ActionPreference - - ActionPreference - - - None - - - - - - Type - - {{ Fill Type Description }} - - String - - String - - - None - - - ProgressAction - - {{ Fill ProgressAction Description }} - - ActionPreference - - ActionPreference - - - None - - - - - - None - - - - - - - - - - System.Object - - - - - - - - - - - - - - -------------------------- Example 1 -------------------------- - PS C:\> {{ Add example code here }} - - {{ Add example description here }} - - - - - - - - Get-LMRole + Get-LMReportGroup Get - LMRole + LMReportGroup {{ Fill in the Synopsis }} @@ -19597,7 +20026,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMRole + Get-LMReportGroup BatchSize @@ -19636,7 +20065,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMRole + Get-LMReportGroup BatchSize @@ -19675,7 +20104,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMRole + Get-LMReportGroup BatchSize @@ -19814,9 +20243,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMSDT + Get-LMRepositoryLogicModules Get - LMSDT + LMRepositoryLogicModules {{ Fill in the Synopsis }} @@ -19826,7 +20255,117 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMSDT + Get-LMRepositoryLogicModules + + Type + + {{ Fill Type Description }} + + + datasource + propertyrules + eventsource + topologysource + configsource + + String + + String + + + None + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + Type + + {{ Fill Type Description }} + + String + + String + + + None + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + None + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> {{ Add example code here }} + + {{ Add example description here }} + + + + + + + + Get-LMRole + Get + LMRole + + {{ Fill in the Synopsis }} + + + + {{ Fill in the Description }} + + + + Get-LMRole BatchSize @@ -19865,7 +20404,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMSDT + Get-LMRole BatchSize @@ -19883,9 +20422,9 @@ Retrieves the dashboards that match the specified custom filter. {{ Fill Id Description }} - String + Int32 - String + Int32 None @@ -19904,7 +20443,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMSDT + Get-LMRole BatchSize @@ -19973,9 +20512,9 @@ Retrieves the dashboards that match the specified custom filter. {{ Fill Id Description }} - String + Int32 - String + Int32 None @@ -20043,9 +20582,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMTopologyMap + Get-LMSDT Get - LMTopologyMap + LMSDT {{ Fill in the Synopsis }} @@ -20055,7 +20594,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMTopologyMap + Get-LMSDT BatchSize @@ -20094,7 +20633,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMTopologyMap + Get-LMSDT BatchSize @@ -20112,9 +20651,9 @@ Retrieves the dashboards that match the specified custom filter. {{ Fill Id Description }} - Int32 + String - Int32 + String None @@ -20133,7 +20672,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMTopologyMap + Get-LMSDT BatchSize @@ -20202,18 +20741,6 @@ Retrieves the dashboards that match the specified custom filter. {{ Fill Id Description }} - Int32 - - Int32 - - - None - - - Name - - {{ Fill Name Description }} - String String @@ -20221,137 +20748,7 @@ Retrieves the dashboards that match the specified custom filter. None - - ProgressAction - - {{ Fill ProgressAction Description }} - - ActionPreference - - ActionPreference - - - None - - - - - - None - - - - - - - - - - System.Object - - - - - - - - - - - - - - -------------------------- Example 1 -------------------------- - PS C:\> {{ Add example code here }} - - {{ Add example description here }} - - - - - - - - Get-LMTopologyMapData - Get - LMTopologyMapData - - {{ Fill in the Synopsis }} - - - - {{ Fill in the Description }} - - - - Get-LMTopologyMapData - - Id - - {{ Fill Id Description }} - - Int32 - - Int32 - - - None - - - ProgressAction - - {{ Fill ProgressAction Description }} - - ActionPreference - - ActionPreference - - - None - - - - Get-LMTopologyMapData - - Name - - {{ Fill Name Description }} - - String - - String - - - None - - - ProgressAction - - {{ Fill ProgressAction Description }} - - ActionPreference - - ActionPreference - - - None - - - - - - Id - - {{ Fill Id Description }} - - Int32 - - Int32 - - - None - - + Name {{ Fill Name Description }} @@ -20414,9 +20811,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMTopologySource + Get-LMTopologyMap Get - LMTopologySource + LMTopologyMap {{ Fill in the Synopsis }} @@ -20426,7 +20823,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMTopologySource + Get-LMTopologyMap BatchSize @@ -20465,7 +20862,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMTopologySource + Get-LMTopologyMap BatchSize @@ -20504,7 +20901,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMTopologySource + Get-LMTopologyMap BatchSize @@ -20643,9 +21040,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMUnmonitoredDevice + Get-LMTopologyMapData Get - LMUnmonitoredDevice + LMTopologyMapData {{ Fill in the Synopsis }} @@ -20655,27 +21052,42 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMUnmonitoredDevice - - Filter + Get-LMTopologyMapData + + Id - {{ Fill Filter Description }} + {{ Fill Id Description }} - Object + Int32 - Object + Int32 None - - BatchSize + + ProgressAction - {{ Fill BatchSize Description }} + {{ Fill ProgressAction Description }} - Int32 + ActionPreference - Int32 + ActionPreference + + + None + + + + Get-LMTopologyMapData + + Name + + {{ Fill Name Description }} + + String + + String None @@ -20695,10 +21107,10 @@ Retrieves the dashboards that match the specified custom filter. - - BatchSize + + Id - {{ Fill BatchSize Description }} + {{ Fill Id Description }} Int32 @@ -20707,97 +21119,18 @@ Retrieves the dashboards that match the specified custom filter. None - - Filter - - {{ Fill Filter Description }} - - Object - - Object - - - None - - - ProgressAction + + Name - {{ Fill ProgressAction Description }} + {{ Fill Name Description }} - ActionPreference + String - ActionPreference + String None - - - - - None - - - - - - - - - - System.Object - - - - - - - - - - - - - - -------------------------- Example 1 -------------------------- - PS C:\> {{ Add example code here }} - - {{ Add example description here }} - - - - - - - - Get-LMUsageMetrics - Get - LMUsageMetrics - - {{ Fill in the Synopsis }} - - - - {{ Fill in the Description }} - - - - Get-LMUsageMetrics - - ProgressAction - - {{ Fill ProgressAction Description }} - - ActionPreference - - ActionPreference - - - None - - - - ProgressAction @@ -20849,9 +21182,9 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMUser + Get-LMTopologySource Get - LMUser + LMTopologySource {{ Fill in the Synopsis }} @@ -20861,7 +21194,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMUser + Get-LMTopologySource BatchSize @@ -20900,7 +21233,7 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMUser + Get-LMTopologySource BatchSize @@ -20939,7 +21272,442 @@ Retrieves the dashboards that match the specified custom filter. - Get-LMUser + Get-LMTopologySource + + BatchSize + + {{ Fill BatchSize Description }} + + Int32 + + Int32 + + + None + + + Name + + {{ Fill Name Description }} + + String + + String + + + None + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + BatchSize + + {{ Fill BatchSize Description }} + + Int32 + + Int32 + + + None + + + Filter + + {{ Fill Filter Description }} + + Object + + Object + + + None + + + Id + + {{ Fill Id Description }} + + Int32 + + Int32 + + + None + + + Name + + {{ Fill Name Description }} + + String + + String + + + None + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + None + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> {{ Add example code here }} + + {{ Add example description here }} + + + + + + + + Get-LMUnmonitoredDevice + Get + LMUnmonitoredDevice + + {{ Fill in the Synopsis }} + + + + {{ Fill in the Description }} + + + + Get-LMUnmonitoredDevice + + Filter + + {{ Fill Filter Description }} + + Object + + Object + + + None + + + BatchSize + + {{ Fill BatchSize Description }} + + Int32 + + Int32 + + + None + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + BatchSize + + {{ Fill BatchSize Description }} + + Int32 + + Int32 + + + None + + + Filter + + {{ Fill Filter Description }} + + Object + + Object + + + None + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + None + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> {{ Add example code here }} + + {{ Add example description here }} + + + + + + + + Get-LMUsageMetrics + Get + LMUsageMetrics + + {{ Fill in the Synopsis }} + + + + {{ Fill in the Description }} + + + + Get-LMUsageMetrics + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + None + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> {{ Add example code here }} + + {{ Add example description here }} + + + + + + + + Get-LMUser + Get + LMUser + + {{ Fill in the Synopsis }} + + + + {{ Fill in the Description }} + + + + Get-LMUser + + BatchSize + + {{ Fill BatchSize Description }} + + Int32 + + Int32 + + + None + + + Filter + + {{ Fill Filter Description }} + + Object + + Object + + + None + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + Get-LMUser + + BatchSize + + {{ Fill BatchSize Description }} + + Int32 + + Int32 + + + None + + + Id + + {{ Fill Id Description }} + + Int32 + + Int32 + + + None + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + Get-LMUser BatchSize @@ -24936,6 +25704,573 @@ Invokes an active discovery task for all devices in the device group with the na + + + Invoke-LMAWSAccountTest + Invoke + LMAWSAccountTest + + Invokes a test for an AWS account in LogicMonitor. + + + + The Invoke-LMAWSAccountTest function is used to invoke a test for an AWS account in LogicMonitor. It checks if the user is logged in and has valid API credentials. If the user is logged in, it builds the necessary headers and URI, prepares the data, and sends a POST request to the LogicMonitor API to perform the test. The function returns the response from the API. + + + + Invoke-LMAWSAccountTest + + ExternalId + + The external ID of the AWS account. + + String + + String + + + None + + + AccountId + + The account ID of the AWS account. + + String + + String + + + None + + + AssumedRoleARN + + The assumed role ARN of the AWS account. + + String + + String + + + None + + + CheckedServices + + The list of services to be checked during the test. Default value is a comma-separated string of service names supported by LogicMonitor. + + String + + String + + + DYNAMODB,EBS,EC2,AUTOSCALING,BACKUP,BACKUPPROTECTEDRESOURCE,TRANSFER,ELASTICACHE,ELB,RDS,REDSHIFT,S3,SNS,SQS,EMR,KINESIS,ROUTE53,ROUTE53HOSTEDZONE,CLOUDSEARCH,LAMBDA,ECR,ECS,ELASTICSEARCH,EFS,SWFWORKFLOW,SWFACTIVITY,APPLICATIONELB,CLOUDFRONT,APIGATEWAY,APIGATEWAYV2,SES,VPN,FIREHOSE,KINESISVIDEO,WORKSPACE,NETWORKELB,NATGATEWAY,DIRECTCONNECT,DIRECTCONNECT_VIRTUALINTERFACE,WORKSPACEDIRECTORY,ELASTICBEANSTALK,DMSREPLICATION,MSKCLUSTER,MSKBROKER,FSX,TRANSITGATEWAY,GLUE,APPSTREAM,MQ,ATHENA,DBCLUSTER,DOCDB,STEPFUNCTIONS,OPSWORKS,CODEBUILD,SAGEMAKER,ROUTE53RESOLVER,DMSREPLICATIONTASKS,EVENTBRIDGE,MEDIACONNECT,MEDIAPACKAGELIVE,MEDIASTORE,MEDIAPACKAGEVOD,MEDIATAILOR,MEDIACONVERT,ELASTICTRANSCODER,COGNITO,TRANSITGATEWAYATTACHMENT,QUICKSIGHT_DASHBOARDS,QUICKSIGHT_DATASETS,PRIVATELINK_ENDPOINTS,PRIVATELINK_SERVICES,GLOBAL_NETWORKS + + + GroupId + + The device group ID to which the AWS account belongs. Default value is -1 for no group. + + String + + String + + + -1 + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + ExternalId + + The external ID of the AWS account. + + String + + String + + + None + + + AccountId + + The account ID of the AWS account. + + String + + String + + + None + + + AssumedRoleARN + + The assumed role ARN of the AWS account. + + String + + String + + + None + + + CheckedServices + + The list of services to be checked during the test. Default value is a comma-separated string of service names supported by LogicMonitor. + + String + + String + + + DYNAMODB,EBS,EC2,AUTOSCALING,BACKUP,BACKUPPROTECTEDRESOURCE,TRANSFER,ELASTICACHE,ELB,RDS,REDSHIFT,S3,SNS,SQS,EMR,KINESIS,ROUTE53,ROUTE53HOSTEDZONE,CLOUDSEARCH,LAMBDA,ECR,ECS,ELASTICSEARCH,EFS,SWFWORKFLOW,SWFACTIVITY,APPLICATIONELB,CLOUDFRONT,APIGATEWAY,APIGATEWAYV2,SES,VPN,FIREHOSE,KINESISVIDEO,WORKSPACE,NETWORKELB,NATGATEWAY,DIRECTCONNECT,DIRECTCONNECT_VIRTUALINTERFACE,WORKSPACEDIRECTORY,ELASTICBEANSTALK,DMSREPLICATION,MSKCLUSTER,MSKBROKER,FSX,TRANSITGATEWAY,GLUE,APPSTREAM,MQ,ATHENA,DBCLUSTER,DOCDB,STEPFUNCTIONS,OPSWORKS,CODEBUILD,SAGEMAKER,ROUTE53RESOLVER,DMSREPLICATIONTASKS,EVENTBRIDGE,MEDIACONNECT,MEDIAPACKAGELIVE,MEDIASTORE,MEDIAPACKAGEVOD,MEDIATAILOR,MEDIACONVERT,ELASTICTRANSCODER,COGNITO,TRANSITGATEWAYATTACHMENT,QUICKSIGHT_DASHBOARDS,QUICKSIGHT_DATASETS,PRIVATELINK_ENDPOINTS,PRIVATELINK_SERVICES,GLOBAL_NETWORKS + + + GroupId + + The device group ID to which the AWS account belongs. Default value is -1 for no group. + + String + + String + + + -1 + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + + This function requires the user to be logged in before running any commands. Use the Connect-LMAccount function to log in before invoking this function. + + + + + -------------------------- EXAMPLE 1 -------------------------- + Invoke-LMAWSAccountTest -ExternalId "123456" -AccountId "987654" -AccessId "AKI123" -AccessKey "abc123" -AssumedRoleARN "arn:aws:iam::123456789012:role/MyRole" -CheckedServices "EC2,S3,RDS" -GroupId 123 + + This example invokes a test for an AWS account with the specified parameters. + + + + + + + + Invoke-LMAzureAccountTest + Invoke + LMAzureAccountTest + + Invokes a test on an Azure account. + + + + The Invoke-LMAzureAccountTest function is used to invoke a test on an Azure account. It checks if the user is logged in and has valid API credentials. If the user is logged in, it builds the necessary headers and URI, and then sends a POST request to the specified endpoint. The function returns the response from the API. + + + + Invoke-LMAzureAccountTest + + ClientId + + The client ID of the Azure account. + + String + + String + + + None + + + SecretKey + + The secret key of the Azure account. + + String + + String + + + None + + + CheckedServices + + The list of services to be checked. Default value is a list of commonly used Azure services. + + String + + String + + + VIRTUALMACHINE,SQLDATABASE,APPSERVICE,EVENTHUB,REDISCACHE,REDISCACHEENTERPRISE,VIRTUALMACHINESCALESET,VIRTUALMACHINESCALESETVM,APPLICATIONGATEWAY,IOTHUB,FUNCTION,SERVICEBUS,MARIADB,MYSQL,MYSQLFLEXIBLE,POSTGRESQL,POSTGRESQLFLEXIBLE,POSTGRESQLCITUS,ANALYSISSERVICE,TABLESTORAGE,BLOBSTORAGE,FILESTORAGE,QUEUESTORAGE,STORAGEACCOUNT,APIMANAGEMENT,COSMOSDB,APPSERVICEPLAN,VIRTUALNETWORKGATEWAY,AUTOMATIONACCOUNT,EXPRESSROUTECIRCUIT,DATALAKEANALYTICS,DATALAKESTORE,APPLICATIONINSIGHTS,FIREWALL,SQLELASTICPOOL,SQLMANAGEDINSTANCE,HDINSIGHT,RECOVERYSERVICES,BACKUPPROTECTEDITEMS,RECOVERYPROTECTEDITEMS,NETWORKINTERFACE,BATCHACCOUNT,LOGICAPPS,DATAFACTORY,PUBLICIP,STREAMANALYTICS,EVENTGRID,LOADBALANCERS,SERVICEFABRICMESH,COGNITIVESEARCH,COGNITIVESERVICES,MLWORKSPACES,FRONTDOORS,KEYVAULT,RELAYNAMESPACES,NOTIFICATIONHUBS,APPSERVICEENVIRONMENT,TRAFFICMANAGER,SIGNALR,VIRTUALDESKTOP,SYNAPSEWORKSPACES,NETAPPPOOLS,DATABRICKS,LOGANALYTICSWORKSPACES,VIRTUALHUBS,VPNGATEWAYS,CDNPROFILE,POWERBIEMBEDDED,CONTAINERREGISTRY,NATGATEWAYS,BOTSERVICES,VIRTUALNETWORKS + + + SubscriptionIds + + The subscription IDs associated with the Azure account. + + String + + String + + + None + + + GroupId + + The group ID. Default value is -1. + + String + + String + + + -1 + + + TenantId + + The tenant ID of the Azure account. + + String + + String + + + None + + + IsChinaAccount + + Specifies whether the Azure account is a China account. Default value is $false. + + String + + String + + + False + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + ClientId + + The client ID of the Azure account. + + String + + String + + + None + + + SecretKey + + The secret key of the Azure account. + + String + + String + + + None + + + CheckedServices + + The list of services to be checked. Default value is a list of commonly used Azure services. + + String + + String + + + VIRTUALMACHINE,SQLDATABASE,APPSERVICE,EVENTHUB,REDISCACHE,REDISCACHEENTERPRISE,VIRTUALMACHINESCALESET,VIRTUALMACHINESCALESETVM,APPLICATIONGATEWAY,IOTHUB,FUNCTION,SERVICEBUS,MARIADB,MYSQL,MYSQLFLEXIBLE,POSTGRESQL,POSTGRESQLFLEXIBLE,POSTGRESQLCITUS,ANALYSISSERVICE,TABLESTORAGE,BLOBSTORAGE,FILESTORAGE,QUEUESTORAGE,STORAGEACCOUNT,APIMANAGEMENT,COSMOSDB,APPSERVICEPLAN,VIRTUALNETWORKGATEWAY,AUTOMATIONACCOUNT,EXPRESSROUTECIRCUIT,DATALAKEANALYTICS,DATALAKESTORE,APPLICATIONINSIGHTS,FIREWALL,SQLELASTICPOOL,SQLMANAGEDINSTANCE,HDINSIGHT,RECOVERYSERVICES,BACKUPPROTECTEDITEMS,RECOVERYPROTECTEDITEMS,NETWORKINTERFACE,BATCHACCOUNT,LOGICAPPS,DATAFACTORY,PUBLICIP,STREAMANALYTICS,EVENTGRID,LOADBALANCERS,SERVICEFABRICMESH,COGNITIVESEARCH,COGNITIVESERVICES,MLWORKSPACES,FRONTDOORS,KEYVAULT,RELAYNAMESPACES,NOTIFICATIONHUBS,APPSERVICEENVIRONMENT,TRAFFICMANAGER,SIGNALR,VIRTUALDESKTOP,SYNAPSEWORKSPACES,NETAPPPOOLS,DATABRICKS,LOGANALYTICSWORKSPACES,VIRTUALHUBS,VPNGATEWAYS,CDNPROFILE,POWERBIEMBEDDED,CONTAINERREGISTRY,NATGATEWAYS,BOTSERVICES,VIRTUALNETWORKS + + + SubscriptionIds + + The subscription IDs associated with the Azure account. + + String + + String + + + None + + + GroupId + + The group ID. Default value is -1. + + String + + String + + + -1 + + + TenantId + + The tenant ID of the Azure account. + + String + + String + + + None + + + IsChinaAccount + + Specifies whether the Azure account is a China account. Default value is $false. + + String + + String + + + False + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + Invoke-LMAzureAccountTest -ClientId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -SecretKey "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -SubscriptionIds "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + + This example invokes a test on an Azure account using the specified client ID, secret key, and subscription IDs. + + + + + + + + Invoke-LMAzureSubscriptionDiscovery + Invoke + LMAzureSubscriptionDiscovery + + Invokes the Azure subscription discovery process to return subscriptions for a specified client Id. + + + + The Invoke-LMAzureSubscriptionDiscovery function is used to discover Azure subscriptions by making API requests to the LogicMonitor platform. + + + + Invoke-LMAzureSubscriptionDiscovery + + ClientId + + The client ID of the Azure Active Directory application. + + String + + String + + + None + + + SecretKey + + The secret key of the Azure Active Directory application. + + String + + String + + + None + + + TenantId + + The tenant ID of the Azure Active Directory application. + + String + + String + + + None + + + IsChinaAccount + + Specifies whether the Azure account is a China account. Default value is $false. + + String + + String + + + False + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + ClientId + + The client ID of the Azure Active Directory application. + + String + + String + + + None + + + SecretKey + + The secret key of the Azure Active Directory application. + + String + + String + + + None + + + TenantId + + The tenant ID of the Azure Active Directory application. + + String + + String + + + None + + + IsChinaAccount + + Specifies whether the Azure account is a China account. Default value is $false. + + String + + String + + + False + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + Invoke-LMAzureSubscriptionDiscovery -ClientId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -SecretKey "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + + + + + + + Invoke-LMCloudGroupNetScan @@ -25993,70 +27328,517 @@ Invokes a Groovy command on the collector with ID 5678 and specifies the host na - - DatasourceName - - Specifies the name of the datasource. This parameter is mandatory when using the 'Id-dsName' or 'Name-dsName' parameter sets. - - String - - String - - - None - - - DatasourceId - - Specifies the ID of the datasource. This parameter is mandatory when using the 'Id-dsId' or 'Name-dsId' parameter sets. - - Int32 - - Int32 - - - 0 - - - Id - - Specifies the ID of the device. This parameter is mandatory when using the 'Id-dsId', 'Id-dsName', or 'Id-HdsId' parameter sets. - - Int32 - - Int32 - - - 0 - - - Name - - Specifies the name of the device. This parameter is mandatory when using the 'Name-dsName', 'Name-dsId', or 'Name-HdsId' parameter sets. - - String - - String - - - None - - - HdsId + + DatasourceName + + Specifies the name of the datasource. This parameter is mandatory when using the 'Id-dsName' or 'Name-dsName' parameter sets. + + String + + String + + + None + + + DatasourceId + + Specifies the ID of the datasource. This parameter is mandatory when using the 'Id-dsId' or 'Name-dsId' parameter sets. + + Int32 + + Int32 + + + 0 + + + Id + + Specifies the ID of the device. This parameter is mandatory when using the 'Id-dsId', 'Id-dsName', or 'Id-HdsId' parameter sets. + + Int32 + + Int32 + + + 0 + + + Name + + Specifies the name of the device. This parameter is mandatory when using the 'Name-dsName', 'Name-dsId', or 'Name-HdsId' parameter sets. + + String + + String + + + None + + + HdsId + + Specifies the ID of the host datasource. This parameter is mandatory when using the 'Id-HdsId' or 'Name-HdsId' parameter sets. + + String + + String + + + None + + + InstanceId + + Specifies the ID of the device instance. This parameter is mandatory. + + String + + String + + + None + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + + This function requires the LogicMonitor PowerShell module to be installed. + + + + + -------------------------- EXAMPLE 1 -------------------------- + Invoke-LMDeviceConfigSourceCollection -Name "MyDevice" -DatasourceName "MyDatasource" -InstanceId "12345" +Schedules a configuration collection task for the device with the name "MyDevice", the datasource with the name "MyDatasource", and the instance with the ID "12345". + + + + + + -------------------------- EXAMPLE 2 -------------------------- + Invoke-LMDeviceConfigSourceCollection -Id 123 -DatasourceId 456 -InstanceId "12345" +Schedules a configuration collection task for the device with the ID 123, the datasource with the ID 456, and the instance with the ID "12345". + + + + + + + + + + Invoke-LMGCPAccountTest + Invoke + LMGCPAccountTest + + Invokes a test for a GCP (Google Cloud Platform) account. + + + + The Invoke-LMGCPAccountTest function is used to invoke a test for a GCP account. It checks if the user is logged in and has valid API credentials. If the user is logged in, it builds the necessary headers and URI, prepares the data, and sends a POST request to the LogicMonitor API to perform the test. The function returns the response from the API. + + + + Invoke-LMGCPAccountTest + + ServiceAccountKey + + The service account key for the GCP account. + + String + + String + + + None + + + ProjectId + + The ID of the GCP project. + + String + + String + + + None + + + CheckedServices + + (Optional) A comma-separated list of GCP services to be checked. The default value is a list of all LM supported GCP services. + + String + + String + + + CLOUDRUN,CLOUDDNS,REGIONALHTTPSLOADBALANCER,COMPUTEENGINEAUTOSCALER,COMPUTEENGINE,CLOUDIOT,CLOUDROUTER,CLOUDTASKS,VPNGATEWAY,CLOUDREDIS,CLOUDCOMPOSER,INTERCONNECTATTACHMENT,CLOUDFUNCTION,CLOUDBIGTABLE,CLOUDFILESTORE,CLOUDPUBSUB,CLOUDTRACE,CLOUDSTORAGE,CLOUDDATAPROC,CLOUDINTERCONNECT,CLOUDAIPLATFORM,CLOUDSQL,MANAGEDSERVICEFORMICROSOFTAD,CLOUDFIRESTORE,CLOUDDATAFLOW,CLOUDTPU,CLOUDDLP,APPENGINE,HTTPSLOADBALANCER,CLOUDSPANNER + + + GroupId + + (Optional) The ID of the group to which the GCP account belongs. The default value is -1, indicating no group. + + String + + String + + + -1 + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + ServiceAccountKey + + The service account key for the GCP account. + + String + + String + + + None + + + ProjectId + + The ID of the GCP project. + + String + + String + + + None + + + CheckedServices + + (Optional) A comma-separated list of GCP services to be checked. The default value is a list of all LM supported GCP services. + + String + + String + + + CLOUDRUN,CLOUDDNS,REGIONALHTTPSLOADBALANCER,COMPUTEENGINEAUTOSCALER,COMPUTEENGINE,CLOUDIOT,CLOUDROUTER,CLOUDTASKS,VPNGATEWAY,CLOUDREDIS,CLOUDCOMPOSER,INTERCONNECTATTACHMENT,CLOUDFUNCTION,CLOUDBIGTABLE,CLOUDFILESTORE,CLOUDPUBSUB,CLOUDTRACE,CLOUDSTORAGE,CLOUDDATAPROC,CLOUDINTERCONNECT,CLOUDAIPLATFORM,CLOUDSQL,MANAGEDSERVICEFORMICROSOFTAD,CLOUDFIRESTORE,CLOUDDATAFLOW,CLOUDTPU,CLOUDDLP,APPENGINE,HTTPSLOADBALANCER,CLOUDSPANNER + + + GroupId + + (Optional) The ID of the group to which the GCP account belongs. The default value is -1, indicating no group. + + String + + String + + + -1 + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + + This function requires the user to be logged in before running any commands. Use the Connect-LMAccount function to log in before invoking this function. + + + + + -------------------------- EXAMPLE 1 -------------------------- + Invoke-LMGCPAccountTest -ServiceAccountKey "service-account-key" -ProjectId "project-id" + + This example invokes a test for a GCP account using the specified service account key and project ID. + + + + + + + + Invoke-LMNetScan + Invoke + LMNetScan + + Invokes a NetScan task in LogicMonitor. + + + + The Invoke-LMNetScan function is used to execute a NetScan task in LogicMonitor. It checks if the user is logged in and has valid API credentials before making the API call. If the user is logged in, it builds the necessary headers and URI, and then issues a GET request to execute the NetScan task. If the request is successful, it returns a message indicating that the NetScan task has been scheduled. + + + + Invoke-LMNetScan + + Id + + The ID of the NetScan task to be executed. This parameter is mandatory. + + String + + String + + + None + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + Id + + The ID of the NetScan task to be executed. This parameter is mandatory. + + String + + String + + + None + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + Invoke-LMNetScan -Id "12345" +Schedules the NetScan task with ID "12345" in LogicMonitor. + + + + + + + + + + Invoke-LMUserLogoff + Invoke + LMUserLogoff + + Invokes a session logoff for one or more users in Logic Monitor. + + + + The Invoke-LMUserLogoff function is used to log off one or more users from a Logic Monitor session. It checks if the user is logged in and has valid API credentials before making the logoff request. If the user is not logged in, an error message is displayed. + + + + Invoke-LMUserLogoff + + Usernames + + Specifies an array of usernames for which the session logoff needs to be invoked. + + String[] + + String[] + + + None + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + Usernames + + Specifies an array of usernames for which the session logoff needs to be invoked. + + String[] + + String[] + + + None + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + Invoke-LMUserLogoff -Usernames "user1", "user2" +Invokes a session logoff for the users "user1" and "user2" in Logic Monitor. + + + + + + + + + + New-LMAlertAck + New + LMAlertAck + + Creates a new alert acknowledgment in LogicMonitor. + + + + The New-LMAlertAck function is used to create a new alert acknowledgment in LogicMonitor. It sends a POST request to the LogicMonitor API to acknowledge one or more alerts. + + + + New-LMAlertAck + + Ids + + Specifies the alert IDs to be acknowledged. This parameter is mandatory and accepts an array of strings. + + String[] + + String[] + + + None + + + Note + + Specifies the note to be added to the acknowledgment. This parameter is mandatory and accepts a string. + + String + + String + + + None + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + Ids - Specifies the ID of the host datasource. This parameter is mandatory when using the 'Id-HdsId' or 'Name-HdsId' parameter sets. + Specifies the alert IDs to be acknowledged. This parameter is mandatory and accepts an array of strings. - String + String[] - String + String[] None - - InstanceId + + Note - Specifies the ID of the device instance. This parameter is mandatory. + Specifies the note to be added to the acknowledgment. This parameter is mandatory and accepts a string. String @@ -26082,24 +27864,15 @@ Invokes a Groovy command on the collector with ID 5678 and specifies the host na - This function requires the LogicMonitor PowerShell module to be installed. + This function requires a valid API authentication. Make sure you are logged in before running any commands by using the Connect-LMAccount function. -------------------------- EXAMPLE 1 -------------------------- - Invoke-LMDeviceConfigSourceCollection -Name "MyDevice" -DatasourceName "MyDatasource" -InstanceId "12345" -Schedules a configuration collection task for the device with the name "MyDevice", the datasource with the name "MyDatasource", and the instance with the ID "12345". - - - - - - -------------------------- EXAMPLE 2 -------------------------- - Invoke-LMDeviceConfigSourceCollection -Id 123 -DatasourceId 456 -InstanceId "12345" -Schedules a configuration collection task for the device with the ID 123, the datasource with the ID 456, and the instance with the ID "12345". + New-LMAlertAck -Ids @("12345","67890") -Note "Acknowledging alerts" - + This example acknowledges the alerts with the IDs "12345" and "67890" and adds the note "Acknowledging alerts" to the acknowledgment. @@ -26107,23 +27880,23 @@ Schedules a configuration collection task for the device with the ID 123, the da - Invoke-LMNetScan - Invoke - LMNetScan + New-LMAlertEscalation + New + LMAlertEscalation - Invokes a NetScan task in LogicMonitor. + Creates a new escalation for a LogicMonitor alert. - The Invoke-LMNetScan function is used to execute a NetScan task in LogicMonitor. It checks if the user is logged in and has valid API credentials before making the API call. If the user is logged in, it builds the necessary headers and URI, and then issues a GET request to execute the NetScan task. If the request is successful, it returns a message indicating that the NetScan task has been scheduled. + The New-LMAlertEscalation function creates a new escalation for a LogicMonitor alert. It checks if the user is logged in and has valid API credentials before making the API request to create the escalation. - Invoke-LMNetScan - + New-LMAlertEscalation + Id - The ID of the NetScan task to be executed. This parameter is mandatory. + The ID of the alert for which the escalation needs to be created. String @@ -26147,10 +27920,10 @@ Schedules a configuration collection task for the device with the ID 123, the da - + Id - The ID of the NetScan task to be executed. This parameter is mandatory. + The ID of the alert for which the escalation needs to be created. String @@ -26182,94 +27955,8 @@ Schedules a configuration collection task for the device with the ID 123, the da -------------------------- EXAMPLE 1 -------------------------- - Invoke-LMNetScan -Id "12345" -Schedules the NetScan task with ID "12345" in LogicMonitor. - - - - - - - - - - Invoke-LMUserLogoff - Invoke - LMUserLogoff - - Invokes a session logoff for one or more users in Logic Monitor. - - - - The Invoke-LMUserLogoff function is used to log off one or more users from a Logic Monitor session. It checks if the user is logged in and has valid API credentials before making the logoff request. If the user is not logged in, an error message is displayed. - - - - Invoke-LMUserLogoff - - Usernames - - Specifies an array of usernames for which the session logoff needs to be invoked. - - String[] - - String[] - - - None - - - ProgressAction - - {{ Fill ProgressAction Description }} - - ActionPreference - - ActionPreference - - - None - - - - - - Usernames - - Specifies an array of usernames for which the session logoff needs to be invoked. - - String[] - - String[] - - - None - - - ProgressAction - - {{ Fill ProgressAction Description }} - - ActionPreference - - ActionPreference - - - None - - - - - - - - - - - - -------------------------- EXAMPLE 1 -------------------------- - Invoke-LMUserLogoff -Usernames "user1", "user2" -Invokes a session logoff for the users "user1" and "user2" in Logic Monitor. + New-LMAlertEscalation -Id "DS12345" +Creates a new escalation for the alert with ID "12345". @@ -26277,115 +27964,6 @@ Invokes a session logoff for the users "user1" and "user2" in Logic Monitor. - - - New-LMAlertAck - New - LMAlertAck - - Creates a new alert acknowledgment in LogicMonitor. - - - - The New-LMAlertAck function is used to create a new alert acknowledgment in LogicMonitor. It sends a POST request to the LogicMonitor API to acknowledge one or more alerts. - - - - New-LMAlertAck - - Ids - - Specifies the alert IDs to be acknowledged. This parameter is mandatory and accepts an array of strings. - - String[] - - String[] - - - None - - - Note - - Specifies the note to be added to the acknowledgment. This parameter is mandatory and accepts a string. - - String - - String - - - None - - - ProgressAction - - {{ Fill ProgressAction Description }} - - ActionPreference - - ActionPreference - - - None - - - - - - Ids - - Specifies the alert IDs to be acknowledged. This parameter is mandatory and accepts an array of strings. - - String[] - - String[] - - - None - - - Note - - Specifies the note to be added to the acknowledgment. This parameter is mandatory and accepts a string. - - String - - String - - - None - - - ProgressAction - - {{ Fill ProgressAction Description }} - - ActionPreference - - ActionPreference - - - None - - - - - - - This function requires a valid API authentication. Make sure you are logged in before running any commands by using the Connect-LMAccount function. - - - - - -------------------------- EXAMPLE 1 -------------------------- - New-LMAlertAck -Ids @("12345","67890") -Note "Acknowledging alerts" - - This example acknowledges the alerts with the IDs "12345" and "67890" and adds the note "Acknowledging alerts" to the acknowledgment. - - - - - New-LMAlertNote @@ -48861,6 +50439,18 @@ Removes the LogicMonitor role with the Name "Admin". Set-LMDevice + + AutoBalancedCollectorGroupId + + {{ Fill AutoBalancedCollectorGroupId Description }} + + Int32 + + Int32 + + + None + Confirm @@ -49095,6 +50685,18 @@ Removes the LogicMonitor role with the Name "Admin". Set-LMDevice + + AutoBalancedCollectorGroupId + + {{ Fill AutoBalancedCollectorGroupId Description }} + + Int32 + + Int32 + + + None + Confirm @@ -49329,6 +50931,18 @@ Removes the LogicMonitor role with the Name "Admin". + + AutoBalancedCollectorGroupId + + {{ Fill AutoBalancedCollectorGroupId Description }} + + Int32 + + Int32 + + + None + Confirm @@ -59559,6 +61173,269 @@ Removes the LogicMonitor role with the Name "Admin". + + + Set-LMUserdata + Set + LMUserdata + + Sets userdata for a LogicMonitor user. Currently only setting the default dashboard is supported. + + + + The Set-LMUserdata function is used to set the user data for a LogicMonitor user. It allows you to specify the user by either their Id or Name, and the dashboard Id for which the user data should be set. + + + + Set-LMUserdata + + Id + + Specifies the Id of the user. This parameter is mandatory when using the 'Id' parameter set. + + String + + String + + + None + + + DashboardId + + Specifies the Id of the dashboard for which the user data should be set. This parameter is mandatory. + + String + + String + + + None + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + SwitchParameter + + + False + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + SwitchParameter + + + False + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + Set-LMUserdata + + Name + + Specifies the Name of the user. This parameter is mandatory when using the 'Name' parameter set. + + String + + String + + + None + + + DashboardId + + Specifies the Id of the dashboard for which the user data should be set. This parameter is mandatory. + + String + + String + + + None + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + SwitchParameter + + + False + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + SwitchParameter + + + False + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + Id + + Specifies the Id of the user. This parameter is mandatory when using the 'Id' parameter set. + + String + + String + + + None + + + Name + + Specifies the Name of the user. This parameter is mandatory when using the 'Name' parameter set. + + String + + String + + + None + + + DashboardId + + Specifies the Id of the dashboard for which the user data should be set. This parameter is mandatory. + + String + + String + + + None + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + False + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + False + + + ProgressAction + + {{ Fill ProgressAction Description }} + + ActionPreference + + ActionPreference + + + None + + + + + + None. + + + + + + + + + + System.Object + + + + + + + + Returns the response from the LogicMonitor API. + + + + + + + + + This function requires a valid API authentication. Make sure you are logged in before running any commands using Connect-LMAccount. + + + + + -------------------------- EXAMPLE 1 -------------------------- + Set-LMUserdata -Id "12345" -DashboardId "67890" +Sets the user data for the user with Id "12345" for the dashboard with Id "67890". + + + + + + -------------------------- EXAMPLE 2 -------------------------- + Set-LMUserdata -Name "JohnDoe" -DashboardId "67890" +Sets the user data for the user with Name "JohnDoe" for the dashboard with Id "67890". + + + + + + + Set-LMWebsite