Posts Tagged ‘SharePoint 2013; PowerShell’

Fixing “The user has not been granted the requested logon type at this computer” for SharePoint 2013 AutoSPInstaller

September 18, 2014

We are deploying SharePoint 2013 using the AutoSPInstaller PowerShell scripts in our Development environment and were getting the following issue:

Start-Process : This command cannot be run due to the error: Logon failure: the user has not been granted the requested logon at this computer.

We are using service accounts to manage security for our SharePoint 2013 applications and services, and the configuration for AutoSPInstaller includes which service accounts are applied to the various SharePoint components.

You can test a particular service account using the following PowerShell script:

Start-Process -FilePath cmd.exe -ArgumentList "/C" -LoadUserProfile -NoNewWindow -Credential Get-Credential

which will prompt you for the account credentials you want to test and then try and create a command prompt with the users profile.

The issue we found was as follows:
1. The Local Security Policy setting for Allow Log On Locally included Administrators, Users and Backup Operators. The service accounts are members of the Users group which should have allowed the required permissions.
2. The Local Security Policy setting for Deny log on locally was set to a specific security group, of which the service account was a member.

The Deny log on locally setting overrides the Allow log on locally setting. Once we removed the service account from the Deny log on locally setting, the AutoSPInstaller process worked perfectly!

Advertisements

Fixing SharePoint 2013: Sideloading of apps is not enabled on this site

December 7, 2013

I am using Visual Studio 2012 to develop SharePoint Apps for my on-premise SharePoint 2013 environment. I wanted to set up a simple dev environment for one of my host-header site collections, but when I tried to deploy my SharePoint App I got the error:

Sideloading of apps is not enabled on this site

The feature required to enable sideloading is as follows:

DisplayName: EnableAppSideLoading

Id: ae3a1339-61f5-4f8f-81a7-abd2da956a7d

CompatibilityLevel: 15

To enable sideloading, use the following PowerShell commands:


$site = Get-SPSite "http://your.site.url"

$sideLoadingId = new-object System.Guid "ae3a1339-61f5-4f8f-81a7-abd2da956a7d"

$site.Features.Add($sideLoadingId)