Add-TSTMGMTFolderPackageAssignment

Add a package to a folder within the Management Console.

Written by Giuseppe

Last published at: August 20th, 2020

Add a package to a folder within the Management Console


SYNTAX

Add-TSTMGMTFolderPackageAssignment

[[-FolderName] <string>] [[-FolderId] <guid>] [[-PackageName] <string>] [[-PackageId] <guid>] [[-UseLatest]]                             [[-PackageVersion <string>] [[-Force]] [-Interface <guid>] [-Timeout <int>]


DESCRIPTION

Adds a package to a folder. You can specify a package name or a package id.


EXAMPLES

1. Add a package called 'ThinKiosk 5.7.18' to a folder called 'Testing PowerShell'

Add-TSTMGMTFolderPackageAssignment -FolderName '\Devices\Testing PowerShell' -PackageName '\Software Packages\ThinKiosk 5.7.18' 



  1. Add a Zoom Package, using  PackageID to all of the Device Folders inside the Management Console

Connect-TSTMGMTServer -Uri "https://yourserver/TSTMgmt" -Username "Administrator" -Password "XXXXXXXXXXXX"


$allData = Get-TSTMGMTAllData
$folderName = Get-TSTMGMTFolders -FolderName '\Devices\'

foreach ($folder in $folderName)

{
Add-TSTMGMTFolderPackageAssignment -FolderName ('\Devices\' + $folder.FolderName) -PackageId '76052491-BBF2-4C2D-A25E-32ED091BDD25'
}

PARAMETERS


-FolderName

The fully qualified name of the folder to assign the package to. 

Type: String
Required: No
Accept Pipeline Input: No


-FolderId

The GUID of the folder to assign the package to (not required if FolderName is supplied). 

Type: Guid
Required: No
Accept Pipeline Input: No


-PackageName

        The fully qualified name of the package to assign.

Type: String
Required: No
Accept Pipeline Input: No


-PackageId

        The GUID of the package to assign (not required if PackageName is supplied)

Type: Guid
Required: No
Accept Pipeline Input: No


-PackageVersion

        The version of the package to assign (not required if UseLatest is supplied).

Type: String
Required: No
Accept Pipeline Input: No


-UseLatest

        Use the latest version of the package 

Type: SwitchParameter
Required: No
Accept Pipeline Input: No



-Force

If multiple objects are found with the same name, the first retrieved will be used otherwise the call will fail

Type: SwitchParameter
Required: No
Accept Pipeline Input: No


-Interface

The interface ID returned by a previously successful call to Connect-TSTMGMTServer. This parameter is only required if you are connected to 2 or more Management Platform instances at the same time. If this parameter is not specified the connection to the last successful call to Connect-TSTMgmtServer will be used.

Type: String (GUID)
Required: No
Accept Pipeline Input: No


-Timeout

The time allowed in milliseconds for the call to complete before it is deemed to have timed out and is aborted

Type: Int32
Required: No
Accept Pipeline Input: No


INPUTS

None


OUTPUTS

System.Object