Add-KFAPermissonSets

Syntax

Add-KFAPermissionSets
  [-Workflow <path>]
  [-WebUrl <url>]
  [-Debug]
  [-Verbose]
  [-JsonOutput]

Add-KFAPermissionSets
  -ForceSubSite
  [-Workflow <path>]
  [-WebUrl <url>]
  [-Debug]
  [-Verbose]
  [-JsonOutput]

Add-KFAPermissionSets
  -ForceSiteCollection
  [-Workflow <path>]
  [-WebUrl <url>]
  [-Debug]
  [-Verbose]
  [-JsonOutput]

Support

>= kenaflow 5.0.26

Return

This cmdlet will return log messages as JSON objects if -JsonOutput is specified. Otherwise it returns nothing.

Description

This cmdlet only works for SharePoint related workflows!

This cmdlet is executed in the context of a workflow: On option is to execute the cmdlet inside the workflow folder (where _wfconfig.ps1 is located) or you specify parameter -Workflow <path> where <path> is the full path to a workflow folder or workflow config file.

With this cmdlet you can create the permission levels configured in _wfconfig.ps1 inside the configured SharePoint web(s).

If you run the cmdlet for a workflow with a configured SharePoint site that is not the root site of a site collection, you must specify -ForceSiteCollection to instruct the cmdlet to create the permission levels in the parent site collection. This is necessary because the SharePoint object model on the client side does not support creating permission levels in the subsite. - However, you can try using -ForceSubSite to create the permission levels at the subsite level. This will fail, though.

If the workflow is configured to run on multiple SharePoint webs you can tell the cmdlet only to run on a single SharePoint web by using -WebUrl <url>. If not specified and the workflow is configured to run on multiple SharePoint web, the permission levels are created in each configured web.

Parameters

-ForceSubSite

Please read the description above.

-ForceSiteCollection

Please read the description above.

[-Workflow <path>]

If the workflow is not executed inside a workflow folder, that contains a workflow config file _wfconfig.ps1, this parameter needs to be specified, eigther with a path that contains a workflow (_wfconfig.ps1) or a full path of a _wfconfig.ps1 file.

All administrative Cmdlets support the following parameters:

[-WebUrl <url>]

If the workflow is configured to run on multiple SharePoint webs you can tell the cmdlet only to run on a single SharePoint web by using this parameter.

[-Debug]

This optional parameter enables or disables debug level log messages.

If not specified the default configuration for log messages of kenaflow will be used.

[-Verbose]

This optional parameter enables or disables verbose level log messages

If not specified the default configuration for log messages of kenaflow will be used.

-JsonOutput:[$false]

This will return all log messages as JSON objects that can be captured while PowerShell execution.

If not specified the log messages are written to the PowerShell log targets, depending on the level of the log message.

Examples

Add-KFAPermissionSets -Workflow "C:\kenaflow\workflows\My-First-Workflow\_wfconfig.ps1"