Add-TSTMGMTFolderProfileAssignment

Add a profile to a folder within the Management Platform.

Written by Giuseppe

Last published at: July 20th, 2020

Add a profile to a folder within the Management Platform.


SYNTAX

Add-TSTMGMTFolderProfileAssignment

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


DESCRIPTION

Adds a new profile to a folder to the Management Platform. You can specify a fully qualified folder name or a relative one supplying a parent folder object or id.


EXAMPLES

1. Add a profile called 'Testing Powershell' to a folder called 'Testing Powershell'.

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


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

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



         3.  Add a profile to all the Device folders within the Managemtn Console.

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


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

foreach ($folder in $folderName)

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



PARAMETERS


-FolderName

 The fully qualified name of the folder to assign the profile to

Type: String
Required: No
Accept Pipeline Input: No


-FolderId

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

Type: Guid
Required: No
Accept Pipeline Input: No


-ProfileName

A fully qualified name of the profile to assign

Type: String
Required: No
Accept Pipeline Input: No


-ProfileId

The GUID of the profile to assign (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