Showing posts with label sharepoint 2010. Show all posts
Showing posts with label sharepoint 2010. Show all posts

Sunday, June 3, 2012

Set Replicating Directory Changes for Sharepoint Userprofile service


Script to Set Replicating Directory Changes for Sharepoint Userprofile service.

This covers both aspects of the Replicating AD Permissions that need to be setup for sync process to work properly.  This was written as a result of reading http://www.harbar.net/articles/sp2010ups.aspx


Function Set-replicatingChanges{
param (
$domain,
$path)

#change this for your USER PROFILE SYNC Account
$user = "sp_userprofile"
$path
$acl = get-acl ".\$path"
#get sid of user
$objUser = New-Object System.Security.Principal.NTAccount($domain, $user)
$SID = $objUser.Translate([System.Security.Principal.SecurityIdentifier])

$ReplicatingChangesGUID = new-object Guid 1131f6aa-9c07-11d1-f79f-00c04fc2dcd2
$act = [System.Security.AccessControl.AccessControlType]::Allow
$readProperty = [System.DirectoryServices.ActiveDirectoryRights]::ReadProperty
$GenericExecute = [System.DirectoryServices.ActiveDirectoryRights]::GenericExecute
$ExtendedRight = [System.DirectoryServices.ActiveDirectoryRights]::ExtendedRight

#sets permissions
$ace = New-Object System.DirectoryServices.ActiveDirectoryAccessRule -ArgumentList ($SID, $ReadProperty, $act)
$ACL.addaccessrule($ace)
$ace = New-Object System.DirectoryServices.ActiveDirectoryAccessRule ($SID, $GenericExecute, "Allow")
$ACL.addaccessrule($ace)
$ace = New-Object System.DirectoryServices.ActiveDirectoryAccessRule($SID, $ExtendedRight, "Allow",$ReplicatingChangesGUID)
$ACL.addaccessrule($ace)
Set-Acl -ACLObject $acl -Path ".\$path"

}

#ipmo activeDirectory #automate this
if (!(Get-Module -name activedirectory)){
if ((Get-Module -ListAvailable|?{$_.name -eq "activedirectory"})){ipmo activedirectory}
}
if (test-path ad:){cd ad:}else{Write-Host "I couldn't map to ad:" -ForegroundColor Red;break}

$domain =$env:USERDOMAIN
$configContainer=(gci|?{$_.Objectclass -eq "Configuration"}).DistinguishedName
$domainDN = (gci|?{$_.name -eq $domain}).DistinguishedName

set-replicatingChanges $domain $configContainer
set-replicatingChanges $domain $domainDN

Thursday, March 1, 2012

Sharepoint 2010 PrerequisiteInstaller.Arguments File

Here's a helpful tip if you create your own PrerequisiteInstaller.Arguments.txt file.  Make sure there is a space at the end of each line if you're breaking it out to make it more readable.

/unattended
/SQLNCli:PrerequisiteInstallerFiles\sqlncli.msi
/ChartControl:PrerequisiteInstallerFiles\MSChart.exe
/IDFXR2:PrerequisiteInstallerFiles\Windows6.1-KB974405-x64.msu
/NETFX35SP1:PrerequisiteInstallerFiles\dotnetfx35setup.exe
/KB976462:PrerequisiteInstallerFiles\Windows6.1-KB976462-v2-x64.msu
/Sync:PrerequisiteInstallerFiles\Synchronization.msi
/FilterPack:PrerequisiteInstallerFiles\FilterPack\FilterPack.msi
/ADOMD:PrerequisiteInstallerFiles\SQLSERVER2008_ASADOMD10.msi
/Speech:PrerequisiteInstallerFiles\SpeechPlatformRuntime.msi
/SpeechLPK:PrerequisiteInstallerFiles\MSSpeech_SR_en-US_TELE.msi
/ReportingServices:PrerequisiteInstallerFiles\rsSharePoint.msi

other resources:
http://technet.microsoft.com/en-us/library/ff686793.aspx#switcharg
http://technet.microsoft.com/en-us/library/cc262485.aspx#section5

Monday, November 22, 2010

Sharepoint 2010 update tracing service in Health Analyser

Make sure you have registered the account with Sharepoint first then run this powershell script.

$farm = Get-SPFarm
$tracingService = $farm.Services | where {$_.Name -eq "SPTraceV4"}
$managedAccount = Get-SPManagedAccount "\SPtrace"
$tracingService.ProcessIdentity.CurrentIdentityType = "SpecificUser"
$tracingService.ProcessIdentity.ManagedAccount = $managedAccount
$tracingService.ProcessIdentity.Update()
$tracingService.ProcessIdentity.Deploy()