Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
stevevillardi committed Jul 5, 2024
2 parents 63c5423 + 6275bba commit f5aeb1a
Show file tree
Hide file tree
Showing 228 changed files with 11,076 additions and 5,864 deletions.
27 changes: 14 additions & 13 deletions Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,35 @@ $manifestPath = "./Logic.Monitor.psd1"
$publicFuncFolderPath = './Public'

$ps1xmlFiles = Get-ChildItem -Path ./ -Filter *.ps1xml
foreach ($ps1xml in $ps1xmlFiles) {
[xml]$xml = Get-Content -Path $ps1xml.FullName
$null = $xml.Schemas.Add($null, 'https://raw.githubusercontent.com/PowerShell/PowerShell/master/src/Schemas/Format.xsd')
$null = $xml.Schemas.Add($null, 'https://raw.githubusercontent.com/PowerShell/PowerShell/master/src/Schemas/Types.xsd')
$xml.Validate( { throw "File '$($ps1xml.Name)' schema error: $($_.Message)" })
Foreach ($ps1xml in $ps1xmlFiles) {
[xml]$xml = Get-Content -Path $ps1xml.FullName
$null = $xml.Schemas.Add($null, 'https://raw.githubusercontent.com/PowerShell/PowerShell/master/src/Schemas/Format.xsd')
$null = $xml.Schemas.Add($null, 'https://raw.githubusercontent.com/PowerShell/PowerShell/master/src/Schemas/Types.xsd')
$xml.Validate( { Throw "File '$($ps1xml.Name)' schema error: $($_.Message)" })
}

if (!(Get-PackageProvider | Where-Object { $_.Name -eq 'NuGet' })) {
Install-PackageProvider -Name NuGet -force | Out-Null
If (!(Get-PackageProvider | Where-Object { $_.Name -eq 'NuGet' })) {
Install-PackageProvider -Name NuGet -Force | Out-Null
}
Import-PackageProvider -Name NuGet -force | Out-Null
Import-PackageProvider -Name NuGet -Force | Out-Null

if ((Get-PSRepository -Name PSGallery).InstallationPolicy -ne 'Trusted') {
If ((Get-PSRepository -Name PSGallery).InstallationPolicy -ne 'Trusted') {
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
}

if(!(Get-Module Microsoft.PowerShell.SecretManagement -ListAvailable)){
If (!(Get-Module Microsoft.PowerShell.SecretManagement -ListAvailable)) {
Install-Module Microsoft.PowerShell.SecretManagement -Force -Confirm:$false
}
if(!(Get-Module Microsoft.PowerShell.SecretStore -ListAvailable)){
If (!(Get-Module Microsoft.PowerShell.SecretStore -ListAvailable)) {
Install-Module Microsoft.PowerShell.SecretStore -Force -Confirm:$false
}

$manifestContent = (Get-Content -Path $manifestPath -Raw) -replace '<ModuleVersion>', $buildVersion

if ((Test-Path -Path $publicFuncFolderPath) -and ($publicFunctionNames = Get-ChildItem -Path $publicFuncFolderPath -Filter '*.ps1' | Select-Object -ExpandProperty BaseName)) {
If ((Test-Path -Path $publicFuncFolderPath) -and ($publicFunctionNames = Get-ChildItem -Path $publicFuncFolderPath -Filter '*.ps1' | Select-Object -ExpandProperty BaseName)) {
$funcStrings = "'$($publicFunctionNames -join "','")'"
} else {
}
Else {
$funcStrings = $null
}

Expand Down
5 changes: 4 additions & 1 deletion Documentation/Disconnect-LMAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Disconnect from a previously connected LM portal
## SYNTAX

```
Disconnect-LMAccount
Disconnect-LMAccount [<CommonParameters>]
```

## DESCRIPTION
Expand All @@ -29,6 +29,9 @@ 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.
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Get-LMAccessGroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Retrieves the access group with the specified name.

### EXAMPLE 3
```
Get-LMAccessGroup -Filter @{ Property = "Value" }
Get-LMAccessGroup -Filter "tenantId -eq 'Value'"
Retrieves access groups based on the specified filter criteria.
```

Expand Down
5 changes: 4 additions & 1 deletion Documentation/Get-LMAccountStatus.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieves the status of the LogicMonitor account.
## SYNTAX

```
Get-LMAccountStatus
Get-LMAccountStatus [<CommonParameters>]
```

## DESCRIPTION
Expand All @@ -31,6 +31,9 @@ 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
Expand Down
100 changes: 57 additions & 43 deletions Documentation/Get-LMDeviceDatasourceInstance.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,65 +8,73 @@ schema: 2.0.0
# Get-LMDeviceDatasourceInstance

## SYNOPSIS
{{ Fill in the Synopsis }}
Retrieves instances of a LogicMonitor device datasource.

## SYNTAX

### Name-dsName
```
Get-LMDeviceDatasourceInstance -DatasourceName <String> -DeviceName <String> [-Filter <Object>]
[-BatchSize <Int32>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Get-LMDeviceDatasourceInstance -DatasourceName <String> -Name <String> [-Filter <Object>] [-BatchSize <Int32>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
```

### Id-dsName
```
Get-LMDeviceDatasourceInstance -DatasourceName <String> -DeviceId <Int32> [-Filter <Object>]
[-BatchSize <Int32>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Get-LMDeviceDatasourceInstance -DatasourceName <String> -Id <Int32> [-Filter <Object>] [-BatchSize <Int32>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
```

### Name-dsId
```
Get-LMDeviceDatasourceInstance -DatasourceId <Int32> -DeviceName <String> [-Filter <Object>]
[-BatchSize <Int32>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Get-LMDeviceDatasourceInstance -DatasourceId <Int32> -Name <String> [-Filter <Object>] [-BatchSize <Int32>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
```

### Id-dsId
```
Get-LMDeviceDatasourceInstance -DatasourceId <Int32> -DeviceId <Int32> [-Filter <Object>] [-BatchSize <Int32>]
Get-LMDeviceDatasourceInstance -DatasourceId <Int32> -Id <Int32> [-Filter <Object>] [-BatchSize <Int32>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
```

## DESCRIPTION
{{ Fill in the Description }}
The Get-LMDeviceDatasourceInstance function retrieves instances of a LogicMonitor device datasource based on the specified parameters.
It requires a valid API authentication and authorization.

## EXAMPLES

### Example 1
```powershell
PS C:\> {{ Add example code here }}
### EXAMPLE 1
```
Get-LMDeviceDatasourceInstance -DatasourceName "CPU" -Name "Server01" -BatchSize 500
Retrieves instances of the "CPU" datasource for the device named "Server01" with a batch size of 500.
```

{{ Add example description here }}
### EXAMPLE 2
```
Get-LMDeviceDatasourceInstance -DatasourceId 1234 -Id 5678
Retrieves instances of the datasource with ID 1234 for the device with ID 5678.
```

## PARAMETERS

### -BatchSize
{{ Fill BatchSize Description }}
### -DatasourceName
Specifies the name of the datasource.
This parameter is mandatory when using the 'Id-dsName' or 'Name-dsName' parameter sets.

```yaml
Type: Int32
Parameter Sets: (All)
Type: String
Parameter Sets: Name-dsName, Id-dsName
Aliases:

Required: False
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DatasourceId
{{ Fill DatasourceId Description }}
Specifies the ID of the datasource.
This parameter is mandatory when using the 'Id-dsId' or 'Name-dsId' parameter sets.
```yaml
Type: Int32
Expand All @@ -75,33 +83,37 @@ Aliases:

Required: True
Position: Named
Default value: None
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -DatasourceName
{{ Fill DatasourceName Description }}
### -Id
Specifies the ID of the device.
This parameter is mandatory when using the 'Id-dsId' or 'Id-dsName' parameter sets.
It can also be specified using the 'DeviceId' alias.
```yaml
Type: String
Parameter Sets: Name-dsName, Id-dsName
Aliases:
Type: Int32
Parameter Sets: Id-dsName, Id-dsId
Aliases: DeviceId

Required: True
Position: Named
Default value: None
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -DeviceId
{{ Fill DeviceId Description }}
### -Name
Specifies the name of the device.
This parameter is mandatory when using the 'Name-dsName' or 'Name-dsId' parameter sets.
It can also be specified using the 'DeviceName' alias.
```yaml
Type: Int32
Parameter Sets: Id-dsName, Id-dsId
Aliases: Id
Type: String
Parameter Sets: Name-dsName, Name-dsId
Aliases: DeviceName

Required: True
Position: Named
Expand All @@ -110,32 +122,34 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -DeviceName
{{ Fill DeviceName Description }}
### -Filter
Specifies additional filters to apply to the instances.
This parameter accepts an object representing the filter criteria.
```yaml
Type: String
Parameter Sets: Name-dsName, Name-dsId
Aliases: Name
Type: Object
Parameter Sets: (All)
Aliases:

Required: True
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Filter
{{ Fill Filter Description }}
### -BatchSize
Specifies the number of instances to retrieve per batch.
The default value is 1000.
```yaml
Type: Object
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Default value: 1000
Accept pipeline input: False
Accept wildcard characters: False
```
Expand All @@ -160,10 +174,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## INPUTS
### None
## OUTPUTS
### System.Object
## NOTES
This function requires a valid API authentication and authorization.
Use Connect-LMAccount to log in before running any commands.
## RELATED LINKS
Loading

0 comments on commit f5aeb1a

Please sign in to comment.