ControlUp Powershell Commands

ControlUp supports a variety of commands to use in Powershell allowing users to run basic commands freely, both individually and in batches. The batch commands are preformed before one of the the other commands that support batch actions.

Each command in this article contains the synopsis of the command, full description and examples. 

Please also review this blog article - Copy your AD OU Structure to ControlUp

These Powershell commands must be run from the CU Monitor. You need to import the modules by first running the following command:

Import-Module "C:\Program Files\Smart-X\ControlUpMonitor\Version X.X.X.X\ControlUp.PowerShell.User.dll"

PowerShell_5.0_logo.png

Commands

The following are a list of the available Powershell commands.

Batch Related Commands
These commands enable you to perform batch actions (where supported).

  • New-CUBatchUpdate 
  • Publish-CUUpdates
  • Show-CUBatchResult

Computer Write Commands
The actions enable you to perform writable actions to a specific computer or in batches.

  • Add-CUComputer
  • Remove-CUComputer
  • Move-CUComputer

 Folder Write Commands
The actions enable you to perform writable actions to a specific folder or in batches.

  • Add-CUFolder
  • Remove-CUFolder

Existing Computers
The actions enable you to view existing computers from the customer tree. These are 'read only' commandsת and are NOT available in batchesת as they are lists.

  • Get-CUComputers
  • Search-CUComputersFromAD

 

____________________________________________________________________________

New-CUBatchUpdate 

NAME

New-CUBatchUpdate 

SYNOPSIS

Performs batch updates for the computer and folder commands.

SYNTAX

New-CUBatchUpdate [<CommonParameters>]

DESCRIPTION

This command enables users to perform batch updates when it precedes another command that permits batch actions.

EXAMPLES

Example 1:

New-CUBatchUpdate Remove-CUFolder -FolderPath “CUFolder” -ParentPath “Organization Name”

This command removes multiple folders.

 

RELATED LINKS

Remove-CUFolder

 

____________________________________________________________________________

Publish-CUUpdate 

NAME

Publish-CUUpdate 

SYNOPSIS

Publishes updates the computer and folder commands.

SYNTAX

Publish-CUUpdates [-Batch] <BatchUpdate> [<CommonParameters>]

DESCRIPTION

This command enables users to publish batch updates when it precedes another command that permits batch actions.

EXAMPLES

Example 1:

Publish-CUUpdate Remove-CUFolder -FolderPath “CUFolder” -ParentPath “Organization Name”

This command publishes updates for multiple removed folders.

 ____________________________________________________________________________

Show-CUBatchResult 

NAME

Show-CUBatchResult 

SYNOPSIS

Shows batch results for the performed computer and folder commands.

SYNTAX

Show-CUBatchResult [-Batch] <BatchUpdate> [[-ShowSuccess]] [<CommonParameters>]

DESCRIPTION

This command enables users to show results for batch actions performed when it precedes another command that permits batch actions.

EXAMPLES

Example 1:

Show-CUBatchResult Remove-CUFolder -FolderPath “CUFolder” -ParentPath “Organization Name”

This command shows the successful/failed attempts to remove multiple folders.

 ____________________________________________________________________________

 

 

Add-CUComputer

NAME

Add-CUComputer

SYNOPSIS

Adds a computer to ControlUp real-time Console.

SYNTAX

Add-CUComputer -ADComputerName “PC001” -DomainName "domain.dom" -FolderPath “\Servers\Foldername”

DESCRIPTION

Adds a computer account from Active Directory to ControlUp real-time Console.

ADComputerName describes the computer account name as appears in Active Directory.

DomainName describes the domain name from which the computer will be added.

FolderPath describes the ControlUp folder path to which the computer will be added.

This action can be performed in batches.

PARAMETERS

-ADComputerName

Required true
Position Named
Accept pipeline input false
Parameter set name (All)
Aliases                   None
Dynamic false


-DomainName

Required true
Position Named
Accept pipeline input false
Parameter set name (All)
Aliases                   None
Dynamic false 


-FolderPath

Required true
Position Named
Accept pipeline input false
Parameter set name (All)
Aliases                   None
Dynamic false 

EXAMPLES

Example 1:

Add-CUComputer -ADComputerName “PC001” -DomainName “NTNET” -FolderPath “\SQL Servers”

RELATED LINKS

Remove-CUComputer

____________________________________________________________________________

Remove-CUComputer               

NAME

Remove-CUComputer

SYNOPSIS

Removes a computer from ControlUp real-time Console.

SYNTAX

Remove-CUComputer  -Name “PC001.domain.dom”

DESCRIPTION

Removes a computer from ControlUp real-time Console.

Name indicates the computer to be removed from ControlUp real-time Console and can be entered as it appears in ControlUp, as an FQDN or as an IP address.

PARAMETERS

-Name

Required true
Position Named
Accept pipeline input false
Parameter set name (All)
Aliases                   None
Dynamic false 


EXAMPLES

Example 1:

Remove-CUComputer -Name “John-PC”

Example 2:

Remove-CUComputer -Name “117.34.2.7”

RELATED LINKS

Add-CUComputer

____________________________________________________________________________

Move-CUComputer                

NAME

Move-CUComputer

SYNOPSIS

Moves a computer between ControlUp folders.

SYNTAX

Move-CUComputer -Name “PC001.domain.dom” -NewFolderPath “\Servers\Foldername”

DESCRIPTION

Moves a computer between ControlUp folders.

This indicates the computer to be moved from current location to -NewFolderPath which determines the new location in ControlUp real-time Console.
The name can be entered as it appears in ControlUp, as an FQDN or as an IP address.

This action can be performed in batches.

PARAMETERS

-Name

Required true
Position Named
Accept pipeline input false
Parameter set name (All)
Aliases                   None
Dynamic false 

 

EXAMPLES

Move-CUComputer -Name “John-PC” -NewFolderPath “\Servers\Boston”

 

____________________________________________________________________________

Add-CUFolder

NAME

Add-CUFolder

SYNOPSIS

Adds a folder to ControlUp real-time Console.

SYNTAX

Add-CUFolder -Name <string> [[-ParentPath] <string>] [[-Description] <string>] [-ExcludeFromMonitor <boolean>]

DESCRIPTION

Adds a folder to the ControlUp real-time Console. The folder name is specified by the -Name parameter, and its parent location by the -ParentPath parameter. If -ParentPath is not specified, the new folder is created under the root folder.

Optional parameters - ExcludeFromMonitor determines whether the folder contents are to be excluded from connection by ControlUp Monitor services. If this parameter is not specified, its values are inherited from the parent folder.

PARAMETERS

-Name

Required true
Position Named
Accept pipeline input false
Parameter set name (All)
Aliases                   None
Dynamic false


-ParentPath

Required false
Position Named
Accept pipeline input false
Parameter set name (All)
Aliases                   None
Dynamic false


-Description

Required false
Position Named
Accept pipeline input false
Parameter set name (All)
Aliases                   None
Dynamic false


-ExcludeFromMonitor

Required false
Position Named
Accept pipeline input false
Parameter set name (All)
Aliases                   None
Dynamic false

 

EXAMPLES

Example 1:

Add-CUFolder -Name “SQL Servers”

Creates a folder named “SQL Servers” under the organization root folder.

Example 2:

Add-CUFolder -Name “Production” -ParentPath “Organization Name\SQL Servers”

Creates a folder named “Production” under the SQL Servers folder.

Example 3:

Add-CUFolder -Name “Test” -ParentPath “Organization Name\SQL Servers” -Description “Test SQL Servers” -ExcludeFromMonitor $True

Creates a folder named “Test” under the SQL Servers folder with the specified description, and instructs ControlUp to exclude this folder from monitor connections.

RELATED LINKS

Remove-CUFolder

REMARKS

The following characters are allowed: letters, numbers, space, dash and underscore.

The following folder names are reserved and cannot be used: “Hypervisors”, “Cloud Connections”, “XenDesktop Sites”.

____________________________________________________________________________

Remove-CUFolder              

NAME

Remove-CUFolder

SYNOPSIS

Removes a folder from ControlUp real-time Console.

SYNTAX

Remove-CUFolder  -FolderPath “\Servers\Foldername” -Force $False

DESCRIPTION

Removes a folder from ControlUp real-time Console. Folder path is specified by the -FolderPath parameter.

Optional parameter - Force ignores any validation questions.

This action can be performed in batches.

PARAMETERS

-FolderPath

Required true
Position Named
Accept pipeline input false
Parameter set name (All)
Aliases                   None
Dynamic false


-Force

Required false
Position Named
Accept pipeline input false
Parameter set name (All)
Aliases                   None
Dynamic false

 

EXAMPLES

Example 1:

Remove-CUFolder -FolderPath “MyFirstCUFolder” -ParentPath “Organization Name”

Example 2:

Remove-CUFolder -FolderPath “MySecondCUFolder” -ParentPath “Organization Name\XD Folders”

Example 3:

Remove-CUFolder -FolderPath “MyThirsCUFolder” -ParentPath “Organization Name” -Force True

RELATED LINKS

Add-CUFolder

____________________________________________________________________________

Get-CUComputers              

NAME

Get-CUComputers

SYNOPSIS

Creates a list of ControlUp (windows) computers in the organization configuration.

SYNTAX

Get-CUComputers [[-FolderPath] <string>] [[-Match] <string>] [<CommonParameters>]

DESCRIPTION

Get the configured ControlUp windows agents. Optional parameters are for getting the computers under a folder subtree using the -FolderPath option, and using the -Match for limiting the results using a regex filter.

REMARKS

To see the examples, type: "get-help Get-CUComputers -examples"
For more information, type: "get-help Get-CUComputers -detailed"
For technical information, type: "get-help Get-CUComputers -full"
For online help, type: "get-help Get-CUComputers -online"

____________________________________________________________________________

Search-CUComputersFromAD

NAME

Search-CUComputersFromAD

SYNOPSIS

Query AD for computer accounts that can be added to ControlUp.

SYNTAX

Search-CUComputersFromAD [-Name] <string> [-Domain] <string> [[-OU] <string>] [<CommonParameters>]

DESCRIPTION

Query AD the for computers returning with the attributes ControlUp requires (Netbios and dnsHostName). The result set can be piped to Add-CUComputer (use batch when adding large amount of computers).

The name is the search string on computers name. Wildcards are supported.

Domain is the AD domain FQDN or netbios name. This domain must be configured on ControlUp.

OU is optional and offers the ability to limit the search.

REMARKS

To see the examples, type: "get-help Search-CUComputersFromAD -examples"
For more information, type: "get-help Search-CUComputersFromAD -detailed"
For technical information, type: "get-help Search-CUComputersFromAD -full"
For online help, type: "get-help Search-CUComputersFromAD -online"

Powered by Zendesk