Showing posts with label Web Application. Show all posts
Showing posts with label Web Application. Show all posts

Wednesday, November 23, 2016

How to retrieve a List of Application Pools in a Server

From the UI

1. Open IIS Manager. For information about opening IIS Manager, see Open IIS Manager (IIS 7).

2. In the Connections pane, click Application Pools in the tree.

From Command Line

1. Open command prompt.

2. Type "cd C:\Windows\System32\inetsrv" [Appcmd.exe exists at the location %systemroot%\system32\inetsrv\]

3. Type "appcmd list apppool"

Tuesday, June 28, 2016

How to add a user to Web Application User Policy using PowerShell

To add a user to web application user policy using PowerShell , use the below PowerShell script

$userOrGroup = "i:0#.w|domain\user"
$displayName = "User-NTLM"

$webApp = Get-SPWebApplication("URL")
$policy = $webApp.Policies.Add($userOrGroup, $displayName)
$policyRole = $webApp.PolicyRoles.GetSpecialRole([Microsoft.SharePoint.Administration.SPPolicyRoleType]::FullControl)
$policy.PolicyRoleBindings.Add($policyRole)
$webApp.Update()