@@ -12,39 +12,197 @@ Creates a new LogicMonitor diagnostic source.
1212
1313## SYNTAX
1414
15+ ### Default (Default)
1516```
16- New-LMDiagnosticSource [-DiagnosticSource] <PSObject> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
17+ New-LMDiagnosticSource -Name <String> [-Description <String>] [-AppliesTo <String>] [-Technology <String>]
18+ [-Tags <String>] [-Group <String>] [-ScriptType <String>] [-GroovyScript <String>] [-AccessGroupIds <Int32[]>]
19+ [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
20+ ```
21+
22+ ### InputObject
23+ ```
24+ New-LMDiagnosticSource -InputObject <PSObject> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
1725 [<CommonParameters>]
1826```
1927
2028## DESCRIPTION
21- The New-LMDiagnosticSource function creates a new diagnostic source in LogicMonitor using a provided diagnostic source configuration object.
29+ The New-LMDiagnosticSource function creates a new diagnostic source in LogicMonitor.
30+ You can
31+ specify individual parameters or provide a complete configuration object using the InputObject parameter.
2232
2333## EXAMPLES
2434
2535### EXAMPLE 1
2636```
27- # Create a new diagnostic source
37+ # Create a new diagnostic source using explicit parameters
38+ New-LMDiagnosticSource -Name "MyDiagnosticSource" -Description "Checks service status" -ScriptType "powershell" -GroovyScript "Get-Service MyService"
39+ ```
40+
41+ ### EXAMPLE 2
42+ ```
43+ # Create a new diagnostic source using an InputObject
2844$config = @{
2945 name = "MyDiagnosticSource"
30- # Additional configuration properties
46+ description = "Checks service status"
47+ scriptType = "powershell"
48+ groovyScript = "Get-Service MyService"
3149}
32- New-LMDiagnosticSource -DiagnosticSource $config
50+ New-LMDiagnosticSource -InputObject $config
3351```
3452
3553## PARAMETERS
3654
37- ### -DiagnosticSource
38- A PSCustomObject containing the diagnostic source configuration.
39- Must follow the schema model defined in LogicMonitor's API documentation.
55+ ### -InputObject
56+ A PSCustomObject containing the complete diagnostic source configuration.
57+ Must follow the schema model
58+ defined in LogicMonitor's API documentation.
59+ Use this parameter for advanced or programmatic scenarios.
4060
4161``` yaml
4262Type : PSObject
43- Parameter Sets : (All)
63+ Parameter Sets : InputObject
4464Aliases :
4565
4666Required : True
47- Position : 1
67+ Position : Named
68+ Default value : None
69+ Accept pipeline input : False
70+ Accept wildcard characters : False
71+ ` ` `
72+
73+ ### -Name
74+ The name of the diagnostic source.
75+ This parameter is mandatory when using explicit parameters.
76+
77+ ` ` ` yaml
78+ Type : String
79+ Parameter Sets : Default
80+ Aliases :
81+
82+ Required : True
83+ Position : Named
84+ Default value : None
85+ Accept pipeline input : False
86+ Accept wildcard characters : False
87+ ` ` `
88+
89+ ### -Description
90+ The description for the diagnostic source.
91+
92+ ` ` ` yaml
93+ Type : String
94+ Parameter Sets : Default
95+ Aliases :
96+
97+ Required : False
98+ Position : Named
99+ Default value : None
100+ Accept pipeline input : False
101+ Accept wildcard characters : False
102+ ` ` `
103+
104+ ### -AppliesTo
105+ The AppliesTo expression for the diagnostic source.
106+
107+ ` ` ` yaml
108+ Type : String
109+ Parameter Sets : Default
110+ Aliases :
111+
112+ Required : False
113+ Position : Named
114+ Default value : None
115+ Accept pipeline input : False
116+ Accept wildcard characters : False
117+ ` ` `
118+
119+ ### -Technology
120+ The technical notes for the diagnostic source.
121+
122+ ` ` ` yaml
123+ Type : String
124+ Parameter Sets : Default
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+ ### -Tags
135+ The tags to associate with the diagnostic source.
136+
137+ ` ` ` yaml
138+ Type : String
139+ Parameter Sets : Default
140+ Aliases :
141+
142+ Required : False
143+ Position : Named
144+ Default value : None
145+ Accept pipeline input : False
146+ Accept wildcard characters : False
147+ ` ` `
148+
149+ ### -Group
150+ The group the diagnostic source belongs to.
151+
152+ ` ` ` yaml
153+ Type : String
154+ Parameter Sets : Default
155+ Aliases :
156+
157+ Required : False
158+ Position : Named
159+ Default value : None
160+ Accept pipeline input : False
161+ Accept wildcard characters : False
162+ ` ` `
163+
164+ ### -ScriptType
165+ The script type for the diagnostic source.
166+ Valid values are 'groovy' or 'powershell'.
167+ Defaults to 'groovy'.
168+
169+ ` ` ` yaml
170+ Type : String
171+ Parameter Sets : Default
172+ Aliases :
173+
174+ Required : False
175+ Position : Named
176+ Default value : Groovy
177+ Accept pipeline input : False
178+ Accept wildcard characters : False
179+ ` ` `
180+
181+ ### -GroovyScript
182+ The script content for the diagnostic source.
183+
184+ ` ` ` yaml
185+ Type : String
186+ Parameter Sets : Default
187+ Aliases :
188+
189+ Required : False
190+ Position : Named
191+ Default value : None
192+ Accept pipeline input : False
193+ Accept wildcard characters : False
194+ ` ` `
195+
196+ ### -AccessGroupIds
197+ An array of Access Group IDs to assign to the diagnostic source.
198+
199+ ` ` ` yaml
200+ Type : Int32[]
201+ Parameter Sets : Default
202+ Aliases :
203+
204+ Required : False
205+ Position : Named
48206Default value : None
49207Accept pipeline input : False
50208Accept wildcard characters : False
0 commit comments