Remove-TSTMGMTFolderPackageAssignment

Remove a package assigned to a folder within the Management Platform.

Written by Giuseppe

Last published at: November 9th, 2022

Removes a package assigned to a folder within the Management Platform


SYNTAX

Remove-TSTMGMTFolderPackageAssignment

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


DESCRIPTION

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


EXAMPLES

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

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


        2. Remove a package using a PackageId' from a folder called 'Testing PowerShell' 

Remove-TSTMGMTFolderPackageAssignment -FolderName '\Devices\Testing PowerShell' -PackageId 'C18C36F9-1647-4028-AF81-E8C04846E467'


    3.Remove a Package using a PackageID to all the Device Folders.

        Connect-TSTMGMTServer -Uri "https://yourserver/TSTMgmt" -Username "Administrator" -Password "XXXXXXXXXXXX"
        $allData = Get-TSTMGMTAllData
        $folderName = Get-TSTMGMTFolders -FolderName '\Devices\'

        foreach ($folder in $folderName){

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

PARAMETERS


-FolderName

          The fully qualified name of the folder to unassign the package from

Type: String
Required: No
Accept Pipeline Input: No


-FolderId

        The GUID of the folder to unassign the package from (not required if FolderName is supplied)

Type: Guid
Required: No
Accept Pipeline Input: No


-PackageName

         The fully qualified name of the package to unassign

Type: String
Required: No
Accept Pipeline Input: No


-PackageId

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

Type: Guid
Required: No
Accept Pipeline Input: No


-PackageVersion

        The version of the package to unassign (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


-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
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


-Force

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

Type: SwitchParameterString
Required: No
Accept Pipeline Input: No


INPUTS

None


OUTPUTS

System.Object