Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creation of Get-AutomateGroup function #77

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions Docs/Get-AutomateComputerServices.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
external help file: AutomateAPI-help.xml
Module Name: AutomateAPI
online version:
schema: 2.0.0
---

# Get-AutomateComputerServices

## SYNOPSIS
Get Computer's Services information out of the Automate API

## SYNTAX

## DESCRIPTION
Connects to the Automate API and returns all services for specified computer object.

## EXAMPLES

### EXAMPLE 1
```
Get-AutomateComputerServices -ComputerID 1
```

## PARAMETERS

### -ComputerID
Can take either single ComputerID integer, IE 1, or an array of ComputerID integers, IE 1,5,9.
Limits results to include only specified IDs.

```yaml
Type: Int32[]
Parameter Sets: (All)
Aliases: ID

Required: False
Position: 1
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

### Computer Services Objects
## NOTES
Version: 1.0
Author: Marcus Tedde
Creation Date: 2023-12-12
Purpose/Change: Initial script development

## RELATED LINKS
191 changes: 191 additions & 0 deletions Docs/Get-AutomateGroup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
---
external help file: AutomateAPI-help.xml
Module Name: AutomateAPI
online version:
schema: 2.0.0
---

# Get-AutomateGroup

## SYNOPSIS
Get Group information out of the Automate API

## SYNTAX

### IndividualGroup
```
Get-AutomateGroup [[-GroupId] <Int32[]>] [<CommonParameters>]
```

### AllResults
```
Get-AutomateGroup [-AllGroups] [-IncludeFields <String>] [-ExcludeFields <String>] [-OrderBy <String>]
[<CommonParameters>]
```

### ByCondition
```
Get-AutomateGroup [-Condition <String>] [-IncludeFields <String>] [-ExcludeFields <String>]
[-OrderBy <String>] [<CommonParameters>]
```

### CustomBuiltCondition
```
Get-AutomateGroup [-IncludeFields <String>] [-ExcludeFields <String>] [-OrderBy <String>]
[-GroupName <String>] [<CommonParameters>]
```

## DESCRIPTION
Connects to the Automate API and returns one or more full Group objects

## EXAMPLES

### EXAMPLE 1
```
Get-AutomateGroup -AllGroups
```

### EXAMPLE 2
```
Get-AutomateGroup -GroupId 4
```

### EXAMPLE 3
```
Get-AutomateGroup -GroupName "PatchGroup1"
```

### EXAMPLE 4
```
Get-AutomateGroup -Condition "(TypeName = 'Patching')"
```

## PARAMETERS

### -GroupId
GroupId to search for, integer, -GroupId 1

```yaml
Type: Int32[]
Parameter Sets: IndividualGroup
Aliases: ID

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -AllGroups
Returns all Groups in Automate, regardless of amount

```yaml
Type: SwitchParameter
Parameter Sets: AllResults
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### -Condition
A custom condition to build searches that can be used to search for specific things.
Supported operators are '=', 'eq', '\>', '\>=', '\<', '\<=', 'and', 'or', '()', 'like', 'contains', 'in', 'not'.
The 'not' operator is only used with 'in', 'like', or 'contains'.
The '=' and 'eq' operator are the same.
String values can be surrounded with either single or double quotes.
IE (RemoteAgentLastContact \<= 2019-12-18T00:50:19.575Z)
Boolean values are specified as 'true' or 'false'.
Parenthesis can be used to control the order of operations and group conditions.

```yaml
Type: String
Parameter Sets: ByCondition
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -IncludeFields
{{ Fill IncludeFields Description }}

```yaml
Type: String
Parameter Sets: AllResults, ByCondition, CustomBuiltCondition
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ExcludeFields
{{ Fill ExcludeFields Description }}

```yaml
Type: String
Parameter Sets: AllResults, ByCondition, CustomBuiltCondition
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -OrderBy
A comma separated list of fields that you want to order by finishing with either an asc or desc.

```yaml
Type: String
Parameter Sets: AllResults, ByCondition, CustomBuiltCondition
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -GroupName
Group name to search for, uses wildcards so full Group name is not needed

```yaml
Type: String
Parameter Sets: CustomBuiltCondition
Aliases: Group

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

### Client objects
## NOTES
Version: 1.0
Author: Marcus Tedde
Creation Date: 2023-12-11
Purpose/Change: Initial script development

## RELATED LINKS
Loading