#SharePoint 2010 #PowerShell: How to get user permissions report

How to check who has access to a particular site in SharePoint

$urlWeb = "http://mycompany/sites/mydepartment"

Get-SPUser -Web $urlWeb | select UserLogin, @{name="Exlicit given roles";expression={$_.Roles}}, @{name="Roles given via groups";expression={$_.Groups | %{$_.Roles}}},Groups | format-Table -auto

You will get somthing like this output:

NEW VERSION: https://vlasenko.org/2014/05/07/sharepoint-2013-powershell-how-to-get-user-permissions-report/

Beyond Acceptance Testing Framework

It looks like there are several acceptance testing frameworks (ATF) available (RobotFramework, Cucumber, Fitnesse on FIT, Fitnesse on SLIMZenTest, Concordion). Not sure if each of them are really ATF, but can say that Concordion is not a great choice. Fitnesse is the best ATF I know. But it’s up to you, which way to go.

We should keep in mind the  High Level Testing (HLT) pattern and make our application ready for HLT. While performing HLT you interact with your application via Web Services, EXEs, “jobs” in the database. Test doubles are  unacceptable in the acceptance tests:

  1. We don’t need to stub “customer” environment.
  2. We don’t want to duplicate production code in the acceptance test
  3. And we don’t want to have tests for nothing

#SharePoint declarative workflow does not start automatically

This behavior occurs because a security fix in Windows SharePoint Services 3.0 SP1 (KV: assume the SharePoint 2010 do the same) prevents declarative workflows from starting automatically under the system account. After you install Windows SharePoint Services 3.0 SP1, declarative workflows do not start automatically if the following conditions are true:

  1. The Windows SharePoint Services Web application runs under a user’s domain account.
  2. The user logs in by using this domain account.
  3. The site displays the user name as System Account.

To resolve this behavior, set the application pool account to use a different user account. You may want to create a new user account specifically for this purpose.

To set the application pool account to use a different user account, follow these steps:

  1. On the server that is running one of the products that is listed in the “Applies to” section, click Start, point to All Programs, point to Microsoft Office Server, and then clickSharePoint 3.0 Central Administration.
  2. Click the Operations tab.
  3. Under Security Configuration, click Service Accounts.
  4. Click Web application pool, and then click Windows SharePoint Services Web Application in the Web service box.
  5. In the Application pool box, click the application pool that you want to change.
  6. Under Select an account for this component, click Configurable, and then type the user name and the password for the different user account.

http://support.microsoft.com/kb/947284

Re-Post: #SharePoint 2010 with Windows #PowerShell Remoting Step by Step

http://ow.ly/16JRWa

Enable Remoting support on SharePoint Server box

  1. Enable Windows PowerShell Remoting
  2. Increase memory limit for remote shell (Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 1000)
  3. Setup CredSSP support

Setup client machine for Remoting

  1. Enable CredSSP support
  2. Store and use credentials for scripting

A credential in Windows PowerShell is a object which contains username (as plain text) and password (as secure string).

First, use the following command to covert password from keyboard input to a secure string in a text file.

Read-Host -AsSecureString | ConvertFrom-SecureString | out-file C:\crd-sharepoint.txt

snap0099[5]

When you need to create a credential object, read this password (the secure string) from the file and create the credential with the following command:

$pwd = Get-Content C:\crd-sharepoint.txt | ConvertTo-SecureString

then create the credential (replace myusername with your domain\username):

$crd = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "myusername",$pwd


snap0100

Then you will be able to use this credential in the command line without any dialogue.

Enter-PSSession -ComputerName sharepoint.contoso.com -Authentication CredSSP -Credential $crd

3. Load SharePoint Windows PowerShell Snap-in

Add-PSSnapin Microsoft.SharePoint.Powershell