Skip to content

Commit 09dd121

Browse files
committed
fix LMUptime cmdlets
1 parent b388f4e commit 09dd121

21 files changed

Lines changed: 3609 additions & 446 deletions
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
external help file: Logic.Monitor-help.xml
3+
Module Name: Logic.Monitor
4+
online version:
5+
schema: 2.0.0
6+
---
7+
8+
# Get-LMExternalAPIStats
9+
10+
## SYNOPSIS
11+
Retrieves external API statistics from LogicMonitor.
12+
13+
## SYNTAX
14+
15+
```
16+
Get-LMExternalAPIStats [-ProgressAction <ActionPreference>] [<CommonParameters>]
17+
```
18+
19+
## DESCRIPTION
20+
The Get-LMExternalAPIStats function retrieves external API usage statistics from LogicMonitor.
21+
This provides information about API call volumes and usage patterns for external API access.
22+
23+
## EXAMPLES
24+
25+
### EXAMPLE 1
26+
```
27+
Get-LMExternalAPIStats
28+
```
29+
30+
Retrieves all external API statistics for the account.
31+
32+
## PARAMETERS
33+
34+
### -ProgressAction
35+
{{ Fill ProgressAction Description }}
36+
37+
```yaml
38+
Type: ActionPreference
39+
Parameter Sets: (All)
40+
Aliases: proga
41+
42+
Required: False
43+
Position: Named
44+
Default value: None
45+
Accept pipeline input: False
46+
Accept wildcard characters: False
47+
```
48+
49+
### CommonParameters
50+
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).
51+
52+
## INPUTS
53+
54+
### None. You cannot pipe objects to this command.
55+
## OUTPUTS
56+
57+
### Returns LogicMonitor.ExternalAPIStats object.
58+
## NOTES
59+
You must run Connect-LMAccount before running this command.
60+
61+
## RELATED LINKS
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
external help file: Logic.Monitor-help.xml
3+
Module Name: Logic.Monitor
4+
online version:
5+
schema: 2.0.0
6+
---
7+
8+
# Get-LMPortalVersion
9+
10+
## SYNOPSIS
11+
Retrieves the LogicMonitor portal version from API response headers.
12+
13+
## SYNTAX
14+
15+
```
16+
Get-LMPortalVersion [-Force] [-ProgressAction <ActionPreference>] [<CommonParameters>]
17+
```
18+
19+
## DESCRIPTION
20+
The Get-LMPortalVersion function makes a lightweight API call to retrieve the portal version
21+
from the x-server-version response header.
22+
The version is cached in $Script:LMAuth.Version
23+
for the duration of the session to avoid repeated API calls.
24+
25+
## EXAMPLES
26+
27+
### EXAMPLE 1
28+
```
29+
$version = Get-LMPortalVersion
30+
Write-Host "Portal version: $($version.RawVersion)"
31+
```
32+
33+
### EXAMPLE 2
34+
```
35+
$version = Get-LMPortalVersion -Force
36+
if ($version.Major -ge 231) { Write-Host "Feature supported" }
37+
```
38+
39+
## PARAMETERS
40+
41+
### -Force
42+
Forces a fresh API call to retrieve the version, bypassing the cached value.
43+
44+
```yaml
45+
Type: SwitchParameter
46+
Parameter Sets: (All)
47+
Aliases:
48+
49+
Required: False
50+
Position: Named
51+
Default value: False
52+
Accept pipeline input: False
53+
Accept wildcard characters: False
54+
```
55+
56+
### -ProgressAction
57+
{{ Fill ProgressAction Description }}
58+
59+
```yaml
60+
Type: ActionPreference
61+
Parameter Sets: (All)
62+
Aliases: proga
63+
64+
Required: False
65+
Position: Named
66+
Default value: None
67+
Accept pipeline input: False
68+
Accept wildcard characters: False
69+
```
70+
71+
### CommonParameters
72+
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).
73+
74+
## INPUTS
75+
76+
## OUTPUTS
77+
78+
### Returns a PSCustomObject with RawVersion (string), Major (int), and Minor (int) properties.
79+
## NOTES
80+
This is a private function used internally by the module.
81+
82+
## RELATED LINKS
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
---
2+
external help file: Logic.Monitor-help.xml
3+
Module Name: Logic.Monitor
4+
online version:
5+
schema: 2.0.0
6+
---
7+
8+
# Get-LMRemediationSource
9+
10+
## SYNOPSIS
11+
Retrieves remediation sources from LogicMonitor.
12+
13+
## SYNTAX
14+
15+
### All (Default)
16+
```
17+
Get-LMRemediationSource [-BatchSize <Int32>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
18+
```
19+
20+
### Id
21+
```
22+
Get-LMRemediationSource [-Id <Int32>] [-BatchSize <Int32>] [-ProgressAction <ActionPreference>]
23+
[<CommonParameters>]
24+
```
25+
26+
### Name
27+
```
28+
Get-LMRemediationSource [-Name <String>] [-BatchSize <Int32>] [-ProgressAction <ActionPreference>]
29+
[<CommonParameters>]
30+
```
31+
32+
### DisplayName
33+
```
34+
Get-LMRemediationSource [-DisplayName <String>] [-BatchSize <Int32>] [-ProgressAction <ActionPreference>]
35+
[<CommonParameters>]
36+
```
37+
38+
### Filter
39+
```
40+
Get-LMRemediationSource [-Filter <Object>] [-BatchSize <Int32>] [-ProgressAction <ActionPreference>]
41+
[<CommonParameters>]
42+
```
43+
44+
## DESCRIPTION
45+
The Get-LMRemediationSource function retrieves remediation source information from LogicMonitor.
46+
It can return remediation sources by ID, name, display name, or using filters.
47+
48+
## EXAMPLES
49+
50+
### EXAMPLE 1
51+
```
52+
# Retrieve all remediation sources
53+
Get-LMRemediationSource
54+
```
55+
56+
### EXAMPLE 2
57+
```
58+
# Retrieve a remediation source by ID
59+
Get-LMRemediationSource -Id 123
60+
```
61+
62+
### EXAMPLE 3
63+
```
64+
# Retrieve a remediation source by name
65+
Get-LMRemediationSource -Name "Test_RemediationSource"
66+
```
67+
68+
## PARAMETERS
69+
70+
### -Id
71+
The ID of the remediation source to retrieve.
72+
Part of a mutually exclusive parameter set.
73+
74+
```yaml
75+
Type: Int32
76+
Parameter Sets: Id
77+
Aliases:
78+
79+
Required: False
80+
Position: Named
81+
Default value: 0
82+
Accept pipeline input: False
83+
Accept wildcard characters: False
84+
```
85+
86+
### -Name
87+
The name of the remediation source to retrieve.
88+
Part of a mutually exclusive parameter set.
89+
90+
```yaml
91+
Type: String
92+
Parameter Sets: Name
93+
Aliases:
94+
95+
Required: False
96+
Position: Named
97+
Default value: None
98+
Accept pipeline input: False
99+
Accept wildcard characters: False
100+
```
101+
102+
### -DisplayName
103+
The display name of the remediation source to retrieve.
104+
Part of a mutually exclusive parameter set.
105+
106+
```yaml
107+
Type: String
108+
Parameter Sets: DisplayName
109+
Aliases:
110+
111+
Required: False
112+
Position: Named
113+
Default value: None
114+
Accept pipeline input: False
115+
Accept wildcard characters: False
116+
```
117+
118+
### -Filter
119+
A filter object to apply when retrieving remediation sources.
120+
Part of a mutually exclusive parameter set.
121+
122+
```yaml
123+
Type: Object
124+
Parameter Sets: Filter
125+
Aliases:
126+
127+
Required: False
128+
Position: Named
129+
Default value: None
130+
Accept pipeline input: False
131+
Accept wildcard characters: False
132+
```
133+
134+
### -BatchSize
135+
The number of results to return per request.
136+
Must be between 1 and 1000.
137+
Defaults to 1000.
138+
139+
```yaml
140+
Type: Int32
141+
Parameter Sets: (All)
142+
Aliases:
143+
144+
Required: False
145+
Position: Named
146+
Default value: 1000
147+
Accept pipeline input: False
148+
Accept wildcard characters: False
149+
```
150+
151+
### -ProgressAction
152+
{{ Fill ProgressAction Description }}
153+
154+
```yaml
155+
Type: ActionPreference
156+
Parameter Sets: (All)
157+
Aliases: proga
158+
159+
Required: False
160+
Position: Named
161+
Default value: None
162+
Accept pipeline input: False
163+
Accept wildcard characters: False
164+
```
165+
166+
### CommonParameters
167+
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).
168+
169+
## INPUTS
170+
171+
### None. You cannot pipe objects to this command.
172+
## OUTPUTS
173+
174+
### Returns LogicMonitor.RemediationSource objects.
175+
## NOTES
176+
You must run Connect-LMAccount before running this command.
177+
178+
## RELATED LINKS

0 commit comments

Comments
 (0)