Skip to content

Commit

Permalink
Merge pull request #630 from TheJumpCloud/CUT-4394_JCDeviceFromCSV
Browse files Browse the repository at this point in the history
CUT-4394 - Update Device from CSV Function
  • Loading branch information
gweinjc authored Dec 17, 2024
2 parents a67118e + a545b19 commit 04e14b9
Show file tree
Hide file tree
Showing 23 changed files with 1,520 additions and 171 deletions.
8 changes: 7 additions & 1 deletion PowerShell/JumpCloud Module/Docs/JumpCloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Module Name: JumpCloud
Module Guid: 31c023d1-a901-48c4-90a3-082f91b31646
Download Help Link: https://github.com/TheJumpCloud/support/wiki
Help Version: 2.15.0
Help Version: 2.16.0
Locale: en-Us
---

Expand Down Expand Up @@ -159,6 +159,9 @@ Creates a new JumpCloud Mac, Linux, or Windows command
### [New-JCDeploymentTemplate](New-JCDeploymentTemplate.md)
A guided walk through that creates a command deployment CSV file on your local machine.

### [New-JCDeviceUpdateTemplate](New-JCDeviceUpdateTemplate.md)
A guided walk through that creates a JumpCloud Device Import CSV file on your local machine.

### [New-JCImportTemplate](New-JCImportTemplate.md)
A guided walk through that creates a JumpCloud User Import CSV file on your local machine.

Expand Down Expand Up @@ -284,6 +287,9 @@ Updates an existing JumpCloud User
### [Set-JCUserGroupLDAP](Set-JCUserGroupLDAP.md)
The Set-JCUserGroupLDAP command adds or removes a JumpCloud user group and the members to/from the JumpCloud LDAP directory.

### [Update-JCDeviceFromCSV](Update-JCDeviceFromCSV.md)
Updates a set of JumpCloud devices from a CSV file created using the New-JCDeviceUpdateTemplate function.

### [Update-JCModule](Update-JCModule.md)
Running this function will trigger the update of the JumpCloud PowerShell module.

Expand Down
60 changes: 60 additions & 0 deletions PowerShell/JumpCloud Module/Docs/New-JCDeviceUpdateTemplate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
external help file: JumpCloud-help.xml
Module Name: JumpCloud
online version: https://github.com/TheJumpCloud/support/wiki/
schema: 2.0.0
---

# New-JCDeviceUpdateTemplate

## SYNOPSIS
A guided walk through that creates a JumpCloud Device Import CSV file on your local machine.

## SYNTAX

```
New-JCDeviceUpdateTemplate [-Force] [<CommonParameters>]
```

## DESCRIPTION
The New-JCDeviceUpdateTemplate command is a menu driven function that guides end users and creates a custom JumpCloud Device Import .CSV file on their machine for populating with their Device information for updating in JumpCloud.

## EXAMPLES

### Example 1
```powershell
PS C:\> New-JCDeviceUpdateTemplate
```

Launches the New-JCDeviceUpdateTemplate menu

## PARAMETERS

### -Force
Parameter to force populate CSV with all headers when creating an update template.
When selected this option will forcefully replace existing files in the current working directory

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

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
## NOTES
## RELATED LINKS
44 changes: 42 additions & 2 deletions PowerShell/JumpCloud Module/Docs/Remove-JCUser.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ Removes a JumpCloud User

### Username (Default)
```
Remove-JCUser [-Username] <String> [-force] [<CommonParameters>]
Remove-JCUser [-Username] <String> [-force] [-CascadeManager <String>]
[<CommonParameters>]
```

### UserID
```
Remove-JCUser -UserID <String> [-ByID] [-force] [<CommonParameters>]
Remove-JCUser -UserID <String> [-ByID] [-force] [-CascadeManager <String>]
[<CommonParameters>]
```

## DESCRIPTION
Expand All @@ -40,6 +42,28 @@ PS C:\> Remove-JCUser cclemons -Force
```

Removes the JumpCloud User with Username 'cclemons' using the -Force Parameter. A warning message will not be presented to confirm this operation.
If the cclemons is a manager of other users, the `Force` parameter will clear cclemons' subordinates `manager` field. In other words if a user is managed by cclemons, removing cclemons will also remove that user's manager field in JumpCloud.

### Example 3
```powershell
PS C:\> Remove-JCUser cclemons -CascadeManager null
```

Removes the Jumpcloud user with Username 'cclemons'. If `cclemons` manages other JumpCloud users, those user's will have their manager field set to null. Note. This command as the same effect as running `Remove-JCUser cclemons -Force`

### Example 4
```powershell
PS C:\> Remove-JCUser cclemons -CascadeManager automatic
```

Removes the JumpCloud user with the username 'cclemons' and automatically update's their subordinates manager field to `cclemons` manager. Ex. If `cclemons` is a manager and is also managed by another user with username: `some.manager`, the users managed by `cclemons` will be reassigned to `some.manager` upon `cclemons` removal. If `cclemons` is not managed by anyone, the manager field for the `cclemons` subordinates will be set to null.

### Example 5
```powershell
PS C:\> Remove-JCUser cclemons -CascadeManager User -CascadeManagerUser some.manager
```

Removes the JumpCloud user with the username `cclemons`. If `cclemons` is a manager, their subordinates will be reassigned to the manager specified by the provided username/id with CascadeManagerUser parameter. In this case, `cclemons` subordinates will be managed by the user with username: `some.manager` after `cclemons` is removed.

## PARAMETERS

Expand All @@ -59,6 +83,22 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -CascadeManager
A SwitchParameter for Cascading the manager of the user to the users managed by the user. NULL, AUTOMATIC (bubble up), ID (prompt for manager ID)
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Accepted values: NULL, Automatic, User

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -force
A SwitchParameter which suppresses the warning message when removing a JumpCloud User.
Expand Down
4 changes: 2 additions & 2 deletions PowerShell/JumpCloud Module/Docs/Set-JCSettingsFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Updates the JumpCloud Module Settings File
## SYNTAX

```
Set-JCSettingsFile [-parallelOverride <PSObject>]
[-moduleBannerMessageCount <PSObject>] [<CommonParameters>]
Set-JCSettingsFile [-moduleBannerMessageCount <PSObject>]
[-parallelOverride <PSObject>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down
89 changes: 89 additions & 0 deletions PowerShell/JumpCloud Module/Docs/Update-JCDeviceFromCSV.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
external help file: JumpCloud-help.xml
Module Name: JumpCloud
online version: https://github.com/TheJumpCloud/support/wiki/
schema: 2.0.0
---

# Update-JCDeviceFromCSV

## SYNOPSIS
Updates a set of JumpCloud devices from a CSV file created using the New-JCDeviceUpdateTemplate function.

## SYNTAX

### GUI (Default)
```
Update-JCDeviceFromCSV [-CSVFilePath] <String> [<CommonParameters>]
```

### force
```
Update-JCDeviceFromCSV [-CSVFilePath] <String> [-force]
[<CommonParameters>]
```

## DESCRIPTION
The Update-JCDeviceFromCSV bulk sets device attributes via a CSV input.

## EXAMPLES

### Example 1
```powershell
PS C:\> Update-JCDeviceFromCSV ./JCDeviceUpdateImport_12-11-2024.csv
```

Updates devices from the .csv file 'JCDeviceUpdateImport_12-11-2024.csv'

### Example 2
```powershell
PS C:\> Update-JCDeviceFromCSV ./JCDeviceUpdateImport_12-11-2024.csv -Force
```

Uses the 'Force' parameter to skip the GUI and update devices from the file 'JCDeviceUpdateImport_12-11-2024.csv'

## PARAMETERS

### -CSVFilePath
The full path to the CSV file you wish to import.
You can use tab complete to search for .csv files.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -force
A SwitchParameter which suppresses the GUI and data validation when using the Update-JCDeviceFromCSV command.
```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: force
Aliases:

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
## NOTES
## RELATED LINKS
Loading

0 comments on commit 04e14b9

Please sign in to comment.