Powershell script to enable Sandbox solution on Domain Controller
By namwar - Last updated: Monday, July 26, 2010 - Save & Share - Leave a Comment
If your SharePoint 2010 development machine is also a domain controller then by default Sandbox solutions are disabled on it. To enable it, you need to run the following powershell script:
$acl = Get-Acl HKLM:\System\CurrentControlSet\Control\ComputerName $person = [System.Security.Principal.NTAccount]“Users” $access = [System.Security.AccessControl.RegistryRights]::FullControl $inheritance = [System.Security.AccessControl.InheritanceFlags]“ContainerInherit,ObjectInherit” $propagation = [System.Security.AccessControl.PropagationFlags]::None $type = [System.Security.AccessControl.AccessControlType]::Allow $rule = New-Object System.Security.AccessControl.RegistryAccessRule($person, $access,$inheritance, $propagation, $type) $acl.AddAccessRule($rule) Set-Acl HKLM:\System\CurrentControlSet\Control\ComputerName $acl
Just copy the above code in a text file and save it as EnableSandbox.ps1.
Execute the file through powershell.
Enjoy!
Posted in Information, Installation, PowerShell, SP2010, Troubleshooting • Tags: Installation, Management, PowerShell, Sharepoint, SP2010 • Top Of Page
