Showing posts with label sp2013. Show all posts
Showing posts with label sp2013. Show all posts

Wednesday, 15 March 2017

Powershell script: bulk add users to SharePoint group

Note - You may need to check the Claims prefix



Here's the PowerShell:

<# Instructions:

Create a Users.txt in this format (all in one column):

    i:0#.w|domain\aparnis
    i:0#.w|domain\candlandan
    i:0#.w|domain\stivj001
    i:0#.w|domain\attaj001
    i:0#.w|domain\marchorovitz
    etc

Populate the variables

#>

## Adding snap-in
Add-PSSnapin "Microsoft.SharePoint.PowerShell"

# Variables

$group = "External Readers"
$loc = "C:\scripts"        
$Users = Get-Content "$loc\Users.txt"        
$web = Get-SPWeb -identity $siteCollUrl

# code

foreach ($User in $Users) {
    $web.EnsureUser($User)        
    Set-SPUser -Identity $User -Web $siteCollUrl -Group $group         
}

# Dispose the web object


$Web.Dispose()

Tuesday, 14 February 2017

Translating SharePoint Audit log reports:

Translating Site ID and PrincipleID

I produced a Audit report for Security events and though I can see that some security events occurred on the relevant dates I couldn't find a way to translate the Site ID and the Principle ID in the Site ID and Event Data columns. 

It can be done! Enter PowerShell!!!!


Audit Log exported to Excel and downloaded: It just looks horrible



Translate the siteID:

$site = get-spsite -limit all
$site | select ID, url | ft -AutoSize | out-file C:\Scripts\siteID.txt

Then I did a find in the .txt file to match the site ID with the URL

e.g.



Translate the PrincipleID:
  
$site = new-object Microsoft.SharePoint.SPSite("http://SPWebApplication");  
$ServiceContext = [Microsoft.SharePoint.SPServiceContext]::GetContext($site);  
$ProfileManager = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($ServiceContext)    
$AllProfiles = $ProfileManager.GetEnumerator() 

$AllProfiles | select displayname,recordID | ft -autosize | out-file c:\scripts\profiles.txt

Then do a Find on the Principle ID and you will get the Display name mapping:




Translating groupid and userid

/_layouts/userdisp.aspx?id=


E.G

I’ve run a custom security report and the results show 5 permissions edits:


The Event Data column shows the user affected in group\user format











To find:

/_layouts/userdisp.aspx?id=218

/_layouts/userdisp.aspx?id=283

/_layouts/userdisp.aspx?id=8

Etc

This shows you either the user's information or the group's members depending on the entered id 

So: 
/_layouts/userdisp.aspx?id=218 - shows a user id
/_layouts/userdisp.aspx?id=8 - shows group membership


Note: The ids are unique within site collections only. So ...?id=42 within site collection A might be a different user or group in site collection B.


That's all folks - Thanks for visiting!

Sunday, 30 August 2015

SharePoint 2013 Service Accounts

Component
Description
Account
Setup user account
Master administration account used to install and initially configure the production SharePoint farms.
SPAdmin
Server farm account
This account is also referred to as the database access account.
This account has the following properties:
The application pool identity for the SharePoint Central Administration website.
The process account for the Windows SharePoint Services Timer service.
The application pool for the service application endpoint for the Security Token Service and the Application Discovery and Load Balancer Service
SPFarm
Service Application Endpoint
This account is used as the identity for the service application endpoint application pool for the following service applications:
Access Services
Business Data Connectivity
Secure Store Service
Usage and Health Data Collection
User Profile Service
Visio Graphics Service
Word Automation Services
Excel Services
Managed Metadata
PerformancePoint
App Management
PowerPoint Conversion
SPSvcApp
Unattended Service
Used for authenticating with data sources within the following content:
Excel Services
PerformancePoint
Visio
SQL Reporting Services
SPExcel
SPPerfPt
SPVisio
SS
Default Content Access
The default account for crawling content.
SPCrawl
Search Service
The Windows service account for the SharePoint Server Search service.
SPSearch
User Profile Synchronization Service
This is the Windows service account for the User Profile Synchronization Service.
SPUPSvc
Synchronization Connection
This is the account used to perform synchronization with the remote directory service.
SPUPSync
App Management Service
This account permits you to install SharePoint apps from the SharePoint Store or the App Catalog.
SPAppMgt
PowerPoint Conversion Service
This account converts Microsoft PowerPoint presentations into various formats.
SPPwrPoint
Machine Translation service
This account performs automated machine translation.
SPTrans
Access Services 2013
This account views, edits, and interacts with Access 2013 databases in a browser.
SPAccess
Work Management
This account provides task aggregation across work management systems, including SharePoint products, Microsoft Exchange Server, and Microsoft Project Server.
SPWkMgt
Cache User

SPCacheU
Cache Reader

SPCacheR
Application pool identity
The user account that the worker processes that service the application pool use as their process identity. This account is used to access content databases that are associated with the web applications that reside in the application pool.
SPWPDflt
Claims to Windows Token Service
This account will be used to perform Kerberos authentication with Service Applications in the farm.
SPC2WTS
FIM Sync Account
This account will be used by the FIM MA to populate the UPS with profile data.
SPFIMSync

SharePoint Information Architecture Diagram

Here is the template I use for Information Architecture designs. It's built using Mindjet and I flesh the nodes out with the low level d...