Remove-TSTMGMTFolderProfileAssignment

Remove a profile from a folder within the Management Platform.

Written by Giuseppe

Last published at: August 20th, 2020

Remove a profile from a folder within the Management Platform 


SYNTAX

Remove-TSTMGMTFolderProfileAssignment

[[-FolderName] <string>] [[-FolderId] <guid>] [[-ProfileName] <string>] [[-ProfileId] <guid>] [[-Force]][-Interface <guid>] [-Timeout <int>]


DESCRIPTION

Removes a profile to a folder within the Management Platform. You can specify a fully qualified FoldName, a ProfileName or subsequently a ProfileId


EXAMPLES

1. Remove a profile called 'Testing Powershell' from a folder called 'Testing Powershell'.

Remove-TSTMGMTFolderProfileAssignment -ProfileName '\Profiles\Testing Powershell' -FolderName '\Devices\Testing PowerShell'  


        2. Remove a profile with a ProfileId to a folder called 'Testing Powershell'. 

Remove-TSTMGMTFolderProfileAssignment -ProfileId '8CF8EC43-2599-4D7A-B47D-E75D0EE59FFD' -FolderName '\Devices\Testing PowerShell'  



        3. Remove a profile with a ProfileId to all the folders

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

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

        foreach ($folder in $folderName)                                                                                                                                                                             {
         Remove-TSTMGMTFolderProfileAssignment -FolderName ('\Devices\' + $folder.FolderName) -ProfileID 'A467257C-1530-438E-91C1-BC1F2DE0BF14'
        }


PARAMETERS


-FolderName

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

Type: String
Required: No
Accept Pipeline Input: No


-FolderId

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

Type: Guid
Required: No
Accept Pipeline Input: No


-ProfileName

The fully qualified name of the profile to unassign

Type: String
Required: No
Accept Pipeline Input: No


-ProfileId

The GUID of the profile to unassign (not required if ProfileName is supplied)

Type: Guid
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: 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