Tag Info

New answers tagged

1

Use the following PowerShell script for getting all users for each SP group for given SPWeb $web = Get-SPWeb "http://YourWebURL/" foreach ($group in $web.groups){ write-host -foregroundcolor white "----Collecting users from group:"$group.Name "..." foreach($user in $group.users) { if ($user.Loginname.StartsWith("SHAREPOINT\")) {continue} if ...


1

Display security permissions for site collection, subsites, and lists/libraries in each site. To use it, you must modify the $site variable to point to your site collection. Syntax: <script name>.ps1 | out-file c:\permissions.txt Here is script #Add SharePoint PowerShell SnapIn if not already added if ((Get-PSSnapin ...


0

You can use below script as a starting point $webApps = Get-SPWebApplication foreach($webApp in $webApps) { foreach($site in $webApp.Sites) { foreach($web in $site.AllWebs) { foreach($assignment in $web.RoleAssignments) { if(-not [string]::IsNullOrEmpty($assignment.Member.Xml)) ...


0

I hope you dont mind but I decided to have a go at writing the code. This is what I came up with using promises. var ITSP = ITSP || {}; ITSP.SharePoint = ITSP.SharePoint || {}; ITSP.SharePoint.Init = function() { var deferred = $.Deferred(); ITSP.SharePoint.Context = SP.ClientContext.get_current(); var context = ITSP.SharePoint.Context; ...


0

Why do you have break in else? else { break; } Just remove it as it is allowing you to loop through only once in any case. Let me know if you have any questions


1

In order to make a lookup column work for a user with contribute permission level on one list, that same user need to have at least read permission level on the list to lookup. Probably, this is a system list which is intended to be used for functionality rather than content. To save admins from unintended edits, the permission inheritance was broken on the ...


2

function CheckMemberInAdminGroup() { var clientContext = new SP.ClientContext.get_current(); this.currentUser = clientContext.get_web().get_currentUser(); clientContext.load(this.currentUser); this.userGroups = this.currentUser.get_groups(); clientContext.load(this.userGroups); clientContext.executeQueryAsync(success, failure); } ...


4

You can use below code to extract the SPUser object string valueField2 = item[fieldID2].ToString(); SPFieldUserValue userField = (SPFieldUserValue)item.Fields[fieldID2].GetFieldValue(valueField2); SPUser user= userField.User; Now you can access all properties of SPUser Object Example user.LoginName


1

Yes both can be possible, For Calendar A, choose group calendar while creating the calendar. For calendar B, use filter Me in the calendar view. Hope this can fulfill your purpose..



Top 50 recent answers are included