Powershell - Assign System Account Folder Rights (Prompt for Path)
Log In or Register to download the BES file, and more.

0 Votes

Description


Property Details

ID26609
StatusBeta - Preliminary testing ready for more
TitlePowershell - Assign System Account Folder Rights (Prompt for Path)
DomainSYST
CategorySoftware Distribution
Download Size9046533
SourceOSD
Source ID<Unspecified>
Source Severity<Unspecified>
Source Release Date2/21/2019 12:00:00 AM
KeywordsPowershell, File Rights
Is TaskTrue
Added by on 3/5/2019 10:21:19 AM
Last Modified by on 3/5/2019 10:21:19 AM
Counters 53 Views / 0 Downloads
User Rating 1 star 2 star 3 star 4 star 5 star * Average over 0 ratings. ** Log In or Register to add your rating.

Relevance

Used in 359 fixlets   * Results in a true/false
Show indented relevance
(if( name of operating system starts with "Win" ) then platform id of operating system != 3 else false) AND (if exists property "in proxy agent context" then ( not in proxy agent context ) else true )

Actions

Action 1 (default)

Action Link Click  here  to deploy this action
Script Type BigFix Action Script
// Disable wow64 redirection on x64 OSes
action parameter query "Path" with description "Please enter full path of the folder"




action uses wow64 redirection {not x64 of operating system}

delete __createfile

// CREATEFILE
createfile until END_OF_FILE

set-executionpolicy unrestricted
takeown /f {parameter "Path" of action} /R /D Y /A
icacls {parameter "Path" of action} /Grant ‘System:(OI)(CI)F’ /T



get-help | Out-File "{(pathname of folder "__BESData\__Global\Logs" of parent folder of client)}\config_powershell.log"


END_OF_FILE

delete powershell.ps1
move __createfile powershell.ps1

waithidden { pathname of file ((it as string) of value "Path" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" of native registry) } -ExecutionPolicy unrestricted -File powershell.ps1
Success Criteria

This action will be considered successful when the applicability relevance evaluates to false.


Sharing

Social Media:
Share this page on Yammer

Comments

Log In or Register to leave comments!