Let's Share

My personal place to share knowledge about Sitecore, Powershell, Amazon Web Services and .NET

Manage User Access Control in convenient way with Powershell

posted by Robert Senktas   | 16-01-2017


image

Now Sitecore PowerShell Extensions provides a User Account Control (UAC) feature akin to that of Microsoft Windows. Security is very important, but can be annoying. Elevated session state is required to run the script. Each time when elevated session state expires then you will be prompt for credentials. Fortunatelly there are settings in 'Cognifide.PowerShell.config' file where default settings can be changed. For me the most inconvinience is that I need to edit file. Sometimes I do not have access to the server but only to the Sitecore client. Powershell will help a little :-)





I wrote a simple functions to get/set tokens in 'Cognifide.PowerShell.config' file.
Note: This command restarts Sitecore

# Download module from Powershell Galery
Install-Module sitecore-automation

Import-Module sitecore-automation

Set-UAC4SPE -Token Console -Expiration '00:06:00'

Set-UAC4SPE -Token Console -Expiration '00:06:00' -Action Allow
image


This script below is part of Sitecore Automation Module

Sitecore Powershell SPE Security
Comments
This is a personal blog. All opinions here are my own opinions and do not represent my employer’s view in anyway.

Sitecore Automation Module