Quantcast
Channel: SharePoint 2013 - Setup, Upgrade, Administration and Operations forum
Viewing all 21070 articles
Browse latest View live

SharePoint 2013 Standalone Installation prerequisites

$
0
0

Hello,

I need to create Standalone Azure VM of SharePoint 2013 installation. It will host one intranet site. I will be installing:

1. SQL Server

2. SharePoint Server 2013

3. Active Directory

I want to know other software & Hardware prerequisites for the same.

TIA.


SharePoint user groups

$
0
0

Hi,

Can we access a user group - created in one site collection - from a different site collection?


SA

New query suggestions are not added automatically SP2013

$
0
0

Hello,

I just want to know if there is any way we can add the query suggestion automatically. I know we have to do import/export query suggestion test file.

but Is there a way if the keyword is search for X time then It automatically adds up in the query suggestion list without doing manually  import?

Thanks.

login failed for any user defined in secure store service

$
0
0

Hi ,every body

I configured Secure Store Service in my sharepoint 2013 farm. 

I want to create external content type in sharepoint designer 2013 and connect to sql server database. I'm going to use secure store target application for authentication.

for that matter I do below things:

I have 4 users to check that matter:sharepoint1,sharepoint2,sharepoint3,sqldbaccess

my database is: testdb. I grant the public and read permission in my database to sqldbaccess user

I created one target application with this steps and settings:

target application type :group

I set these user for these settings in definition of my target application

Target Application Administrators:sharepoint3

Members:sharepoint1,sharepoint2

after I created target application, I set credential for the sqldbaccess user

then I go to sharepoint designer 2013 and create external content type and connect to my database with these settings:

I set mydatabase server and database name in own textbox.

I checked connect with Impersonated windows Identity and I set secure store application ID textbox  exactly to what i created before.

but I didn't connect to my database with any user :sharepoint1,sharepoint2,sharepoint3 and these error appeared:

cannot connect to the sql server databse defined in datasource connection ???

message from external system"'login failed for user ????

what is my mistake ? 

I expected the users can connect to secure store and then access to my database.

The page you selected contains a list that does not exist. It may have been deleted by another user

$
0
0

Hi Team,

I am facing following issue while checking the SharePoint Pages Library Page Version history.

List does not exist.
The page you selected contains a list that does not exist.  It may have been deleted by another user and in the logs found the error as

Application error when access /_layouts/15/Versions.aspx, Error=List does not exist. 
The page you selected contains a list that does not exist. 
It may have been deleted by another user.   at
Microsoft.SharePoint.Library.SPRequestInternalClass.GetListsWithCallback
(String bstrUrl, Guid foreignWebId, String bstrListInternalName, Int32 dwBaseType, Int32 dwBaseTypeAlt, Int32 dwServerTemplate,
UInt32 dwGetListFlags, UInt32 dwListFilterFlags, Boolean bPrefetchMetaData, Boolean bSecurityTrimmed, Boolean bGetSecurityData,
Boolean bPrefetchRelatedFields, ISP2DSafeArrayWriter p2DWriter, Int32& plRecycleBinCount)    
at Microsoft.SharePoint.Library.SPRequest.GetListsWithCallback(String bstrUrl, Guid foreignWebId, String bstrListInternalName,
Int32 dwBaseType, Int32 dwBaseTypeAlt, Int32 dwServerTempl...

Please let me know how to resolved this issue.

Advance Thanks


Srinivas


Updating External Content Type (BCS)

$
0
0

I have an existing external content type that I built in SP Designer. Its purpose is to allow me to map certain user properties in the User Profile application to our HR LOB system. I now need to add a new field/column to map to everyone's user profile, birthdate. I have updated the external content type in SP Designer and have added the new column to the list of columns. I then saved it and updated the model in the BCS. I can also see that new column listed in the list of fields.

The problem I'm having is that when I go into the User Profile application and create my new property, I cannot see that new column in the list of fields I can map to. It's showing me all the columns that were available at the time I first published the external content type. Is there an easy way to get the User Profile application to recognize my new list of fields so I can map to it? My fear is that I would have to delete the BCS object, re-publish and then re-do all of my user profile property mappings.

Any help is greatly appreciated!

Full control user unable to log into 'Site Permissions' page

$
0
0

Hi,

Issue -

One of our users is facing a weird issue. He is Site owner to a subsite. When he tried to access 'Site Permissions' page he gets Access denied page.

Action

He create a new SharePoint group (A) and assigned it Full control permission. Then he delete the default owner group (B), created when a site is created. Since then he is getting Access denied on thesite permission page.

Remedy -

From some blog I found that sometimes by delete the group B, permission from Access Request list is removed. So I granted the group A (to which he is a member of) full control to the Access request list. Now he can access the page directly using this link and work on user permissions

http://myteam.team.com/sites/IT/cls/C-P/_layouts/15/start.aspx#/_layouts/15/user.aspx

However if he goes to Site settings > Site Permissions, he still gets Access denied.

What might be causing this issue?

Need Power Shell Script to export Term Set - Term Store Management

$
0
0

Dear All,

I need to export Term Set which I am using for Site Navigation. I have used the script mentioned in the below link but when imported the file, I get errorNot all terms were imported successfully. Also, the navigation url too missing for the terms.

Please advise, if you are aware of this error and there is a better Power Shell Script to export the term set.

Link I used to get the script for exporting the term set is 

https://gallery.technet.microsoft.com/office/PowerShell-for-SharePoint-a838b5d0/view/Reviews?tduid=(8c2ccd28dc04358ecb6df6e46f1d8b5f)(256380)(2459594)(TnL5HPStwNw-v1Y5El8KTw2FNfMlrtU73Q)()

Appreciate your response and thank you very much for the support.


Narayana Reddy G


change distributed cache service account error

$
0
0

The Healthy Analyzer is throwing an error:

The server farm account should not be used for other services.

doman\farmadmin, the account used for the SharePoint timer service and the central administration site, is highly privileged and should not be used for any other services on any machines in the server farm.  The following services were found to use this account: Distributed Cache Service(Windows Service)

I found this information on distributed cache in the technet library http://technet.microsoft.com/en-us/library/jj219613.aspx

Change the service account

When the server farm is first configured, the server farm account is set as the service account of the AppFabric Caching service. The Distributed Cache service depends on the AppFabric Caching service. To change the service account of the AppFabric Caching service to a managed account:

1. Create a managed account.

2. Set the Managed account as the service account on the AppFabric Caching service. At the Windows PowerShell command prompt, run the following command

$farm = Get-SPFarm
$cacheService = $farm.Services | where {$_.Name -eq "AppFabricCachingService"}

$accnt = Get-SPManagedAccount -Identity domain_name\user_name $cacheService.ProcessIdentity.CurrentIdentityType = "SpecificUser" $cacheService.ProcessIdentity.ManagedAccount = $accnt $cacheService.ProcessIdentity.Update() $cacheService.ProcessIdentity.Deploy()

Where Domain_name\user_name is the domain name and user name of the managed account.

When I run the last command I get the following error:

PS C:\users\farmadmin> $cacheService.ProcessIdentity.Deploy()

Exception calling "Deploy" with "0" argument(s). "This operation uses the SharePoint Administration service (spadminv4), which could not be contacted. If the service is stopped or disabled, start it and try the operation again."

        

        


davidh

Library view for folder content type not shown.

$
0
0

Hi!

I have a minor problem with using views in a document library. Here's the starting info:

- document library, content types enabled.
- 3 ctypes available: document, person (inherited from document set), project (inherited from folder)
- 3 views: all items, person, project, each displaying different website columns

First level entries are only persons, under each person are different projects, and each projects has documents in it.

- The library's default view is "all items", everything allright.
- I managed to map the "person" view as default view for the document set, so only columns with info about projects are shown => perfect
- I edited the "project" view, where I want to show only columns of the "document" ctype. Made it the "default view" and set 'Show in folders of content type "project"'

Everything works fine for the first and second level: "All items" shows the columns of the persons in this level, when I enter a person (docset) I see all the colums for the projects inside of this person.

But when I click on the project (folder content type) SharePoint still keeps the person view with columns of the project folder and never enters the "project" view.

Any idea, if it is even possible, to use folder-content-type specific views inside of document sets?

EDIT: I tried to put a "project" folder directly in the root of the library, to see, if it's related to docsets. But there it keeps the default "all items" view and does not switch to the "project" view. I can switch to the project view later without problems.
In the root folder I cannot change to the project view (since I'm not in a folder of content-type "project", obviously).

thx and greetings
michi


Managing Permissions Issue after SharePoint 2007 to 2013 Migration

$
0
0

I am really struggling with this and any input would be appreciated.

After SharePoint Migration (with the Database Attach method) from 2007->2010->2013multiple sub-sites in a site collection are having Problems.

Managing Permissions from Site Settings is not possible:

  • /domain/sitecollection/subsiteA/_layouts/15/people.aspx
  • /domain/sitecollection/subsiteA/_layouts/15/user.aspx

The Two Pages are Throwing the following Error     

An unexpected error has occurred:    Log:    Application error when access /_layouts/15/people.aspx, Error=Index was out of range. Must be non-negative and less than the size of the collection.  Parameter name: index   at Microsoft.SharePoint.WebControls.ListSiteMapPath.CreateControlHierarchy()     at System.Web.UI.WebControls.SiteMapPath.CreateChildControls()     at System.Web.UI.Control.EnsureChildControls()     at System.Web.UI.WebControls.CompositeControl.get_Controls()     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlB...	a042ca9d-e5a1-3092-22c7-5be152697ad2    ...yWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalking(Control namingContainer, String id)     at Microsoft.SharePoint.WebControls.Menu.set_TemplateId(String value)     at Microsoft.SharePoint.WebControls.Menu.InitializeControlIds(Control namingContainerScope)     at Microsoft.SharePoint.WebControls.Menu.OnLoad(EventArgs eventArgs)     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at Sys...	a042ca9d-e5a1-3092-22c7-5be152697ad2    ...tem.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)	a042ca9d-e5a1-3092-22c7-5be152697ad2    System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.  Parameter name: index    at Microsoft.SharePoint.WebControls.ListSiteMapPath.CreateControlHierarchy()     at System.Web.UI.WebControls.SiteMapPath.CreateChildControls()     at System.Web.UI.Control.EnsureChildControls()     at System.Web.UI.WebControls.CompositeControl.get_Controls()     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control roo...	a042ca9d-e5a1-3092-22c7-5be152697ad2    ...tControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalking(Control namingContainer, String id)     at Microsoft.SharePoint.WebControls.Menu.set_TemplateId(String value)     at Microsoft.SharePoint.WebControls.Menu.InitializeControlIds(Control namingContainerScope)     at Microsoft.SharePoint.WebControls.Menu.OnLoad(EventArgs eventArgs)     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRe...	a042ca9d-e5a1-3092-22c7-5be152697ad2    ...cursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)	a042ca9d-e5a1-3092-22c7-5be152697ad2    Getting Error Message for Exception System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.  Parameter name: index     at Microsoft.SharePoint.WebControls.ListSiteMapPath.CreateControlHierarchy()     at System.Web.UI.WebControls.SiteMapPath.CreateChildControls()     at System.Web.UI.Control.EnsureChildControls()     at System.Web.UI.WebControls.CompositeControl.get_Controls()     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu....	a042ca9d-e5a1-3092-22c7-5be152697ad2    ...FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalkingInner(Control rootControl, String id)     at Microsoft.SharePoint.WebControls.Menu.FindControlByWalking(Control namingContainer, String id)     at Microsoft.SharePoint.WebControls.Menu.set_TemplateId(String value)     at Microsoft.SharePoint.WebControls.Menu.InitializeControlIds(Control namingContainerScope)     at Microsoft.SharePoint.WebControls.Menu.OnLoad(EventArgs eventArgs)     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive(...	a042ca9d-e5a1-3092-22c7-5be152697ad2    ...)     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)	a042ca9d-e5a1-3092-22c7-5be152697ad2


What I've figured out so far:

 1. Groups are there:
-/domain/sitecollection/subsiteA/_layouts/15/people.aspx?MembershipGroupId=3898 throws the same Error
-/domain/sitecollection/_layouts/15/people.aspx?MembershipGroupId=3898 but direct in sitecollection the group is found
 2. Subsites where permissions are working:
-/domain/sitecollection/subsiteB/_layouts/15/people.aspx?MembershipGroupId=6618 is displayed correctly,
but when I change the list view from the Default Detail View to another View, the same error occurs.


Sharepoint 2013 - Remove "Recent" from left menu

$
0
0

Hello All -

My client has requested that she be able to remove (or hide) the "Recent" menu header from the left menu in Sharepoint 2013. This is for specified site collections/sites/pages, not farm-wide.

So far, I've tried to do this via JQuery by adding the following code

<script type="text/javascript">
jQuery(document).ready(function() {
 jQuery(".ms-core-listMenu-item:contains('Recent')").parent().hide();
});
</script>

via both a script web-part and via a content editor web-part (using embed code), but to no avail. I've also tried adding the code above to a .js file (without the script tags) and calling it as

<script type="text/javascript" src="/_layouts/15/menu.remove.recent.js"></script>

instead, but it still doesn't work.

I've checked the page source and I can see the script is included. The "Recent" menu item however, is still there. My prefered solution would be to hide the menu item rather than remove it - I suspect removing it will probably cause issues as Sharepoint likely expects it to be there.

There's no requirement to use JQuery - it just seemed to me to be the best way. I would also rather not edit master pages unless there's no other choice.

Any ideas?


sysadmin

Webpart - Meta refresh

$
0
0

Hi - I'm dealing with a Webpart that include a wrapper.html page - in that wrapper.html there's this 


<META http-equiv="refresh" content="5; http://www.example.com/newpage">

Only problem is that it "jumps out" of the webpartand loads the http://www.example.com/newpage

In a full browser window....

How can I prevent this?  


Host Named Site Collection confusion

$
0
0

Greetings,

Been tasked with creating a new site on my SharePoint 2013. It needs to have a different domain name than my other sites. So, for instance, most all the sites are in domain "first.com", this site needs to be in "second.com". When this farm was first built, new web apps were used when a new "top level" site name was needed, like "main.first.com", "next.first.com", rather than "main.first.com/sites/next". This was about 4 years ago, and that's how I had done this sort of domain naming thing in SP 2007. Of course, after doing all that, all I seem to read about is HNSCs, and using those instead of new web apps. I get the part about conserving resources, etc by not spinning up multiple web apps.

So last year I tried a HNSC. I created a new web app for the HNSC, assigned it a new port number since 2 web apps won't share the same port (443) without host headers. And I was able to create a HNSC under that web app with a different domain name. Now, I know I shot myself in the foot when I did this, because the web app was created with one domain (first.com) but the HNSC was created with the second domain (second.com). Had to "adjust" the SSL cert for the site a bit, so I get SSL warnings on the "main" site but not on the "second" site. And, being incredibly short sighted I didn't purchase a wildcard cert either. :-(

Now I need to add another HNSC. I used the same steps I did to create the first. It creates fine, at least it shows up in the list of sites with Get-SPSite.

New-SPSite https://new.second.com:8443 -owneralias "blah" -hostheaderwebapplicationhttps://host.main.com:8443 -name "NEW SITE" -owneremail blah@blah.com -secondaryowneralias "blahblah" -secondaryemail blahblah@blah.com -template "sts#0" -language 1033

But, I can't browse the site. Now, I've read a bunch of stuff, and it could be the SSL cert (?). But, I can browse the "main" site and get the SSL cert error. But not this site.

So, I know I've made mistakes here. I need to get this site going, but, I need to do it right as well, as there could be other occasions for additional HNSCs.

I've got other WebApps, with the first web app created without a host header. Can I/should I be adding my HNSCs there? (Assuming I get a proper wildcard SSL, which is being worked on.) I guess I just haven't learned how to read Microsoft yet, but the tech notes I've read from them confuse me. I've seen a number of helpful posts here (and elsewhere), at least I can read and (mostly) understand them (I think), but still confused.

Recommendations??? Help???

Thanks much.

Steven.

Cannot hide 'Choose your settings' field from User Profile Edit Page

$
0
0

When ever I change the 'Choose your settings' property to not be displayed on users' edit profile page, all of the users' My Site edit profile pages display an error, 'Sorry, something went wrong'.  The log file shows the following entries.

ProfileUI: Unhandled exception inside DisableReadOnlyRegionalControls: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.Portal.WebControls.ProfileUI.DisableReadOnlyRegionalControls() 

ProfileUI: Unhandled exception inside LoadProfileTable: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.Portal.WebControls.ProfileUI.DisableReadOnlyRegionalControls()     at Microsoft.SharePoint.Portal.WebControls.ProfileUI.LoadProfileTable() 

ProfileUI: Unhandled exception inside LoadControl: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.Portal.WebControls.ProfileUI.DisableReadOnlyRegionalControls()     at Microsoft.SharePoint.Portal.WebControls.ProfileUI.LoadProfileTable()     at Microsoft.SharePoint.Portal.WebControls.ProfileUI.LoadControl(Object sender, EventArgs e) 

Application error when access /_layouts/15/EditProfile.aspx, Error=Object reference not set to an instance of an object.   at Microsoft.SharePoint.Portal.WebControls.ProfileUI.DisableReadOnlyRegionalControls()     at Microsoft.SharePoint.Portal.WebControls.ProfileUI.LoadProfileTable()     at Microsoft.SharePoint.Portal.WebControls.ProfileUI.LoadControl(Object sender, EventArgs e)     at System.EventHandler.Invoke(Object sender, EventArgs e)     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Page.ProcessRequest... 

I've encountered this on 3 different SharePoint 2013 farms, and it also works correctly on another.  I can't figure out why or what the differences are.

We want to be able to hide the vast majority or fields from the user edit profile page and only show a handful of them, e.g. Name, Department, Job Title, Office and Mobile.

Anyone else seen this or have a solution?

Matt



Sharepoint Slow on Submit

$
0
0

I'm running into an issue where updating metadata in a Document library is slow to complete.  Sometimes up to 60 seconds to complete. 

Here are some details:

The Document Library has about 6000 documents in it.  I've upped the item limit for the site and removed throttling from the list.

Example:
$webapp.MaxItemsPerThrottledOperation = 10000
$list.EnableThrottling=$false

Details from : https://blogs.msdn.microsoft.com/adamding/2015/11/20/why-your-sharepoint-list-is-so-slow-when-it-has-more-than-5000-items-with-separate-permissions/

I've removed the throttling because I thought it might have had something to do with load time after hitting submit and returning to the list.  It doesn't seem to have done anything.

I haven't customized the editform.aspx at all.

Sometimes there are no issues and sometimes it takes forever.  I've not been able to find a reason.


David Jenkins

Adding AD Group users to SharePoint groups Using PowerShell

$
0
0

Hi All,

We have a requirement to add Active Directory users from a security group to an SP group

Eg. AD Security Group 'ABC' to SP group called 'SP ABC' using powershell

To achieve this, I'm importing the AD module to the SP Management Shell and executing the below mentioned script. 

function main()
{

    Write-host "Adding SharePoint Snapin"
    $Host.Runspace.ThreadOptions = "ReuseThread"
    Add-PSSnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue
    Write-host "Importing AD module"
    import-module activedirectory

    write-host "Starting work..."
    #Hard coded variables for testing,
    # we need the name of the AD Group, the name of the corresponding group in Sharepoint to sync with, and the URL of the SPWeb where the SP group resides.
    $ADgroupname = "The AD Group"
    $SPGroupName = "The SP Group"
    $spweburl = "http://sharepoint2013/sites/sitecollectionname/subsitename"
    #note that it's reasonably easy to turn this hardcoded list into a CSV import and then loop through multiple groups

    #get a list of the AD Users in the AD Group
    #$ADGroupMembers = get-adgroupmember -Identity $ADgroupname | select @{name="LoginName";expression={$_.samaccountname}}
    $ADGroupMembers = get-adgroupmember -Identity $ADgroupname | select @{name="LoginName";expression={$(getDomain($_.distinguishedName)) + "\" +  $_.samaccountname.toupper()}}
    if ($ADGroupMembers -eq $null)
    {
        write-host "The AD Group we're syncing with is empty - this is usually a problem or typo - the SP group will be left alone" -foregroundcolor red
        exit
    }


    #get the list of users in the SharePoint Group
    $web = get-spweb $spweburl
    $group = $web.groups[$SPGroupName]
    if ($group -eq $null) {write-host "SPGroup Not found" ; exit }
    $spusers = $group.users | select @{name="LoginName";expression={$_.LoginName.toupper()}}

    write-host "Debug: at this point we should have a list of user ID's from SharePoint in domain\user format, uppercase"
    foreach($x in $spusers)
    {
        write-host $x.LoginName -foregroundcolor green
    }

    if($spusers -eq $null)
    {
      write-host "The SPgroup is empty" -foregroundcolor cyan
      write-host "Adding all AD group members to the SP group"
      foreach ($ADGroupMember in $ADGroupMembers)
      {
            #add the AD group member to the SP group
            write-host "Adding $($ADGroupMember.LoginName)"
            write-host "new-spuser -useralias $($ADGroupMember.LoginName) -web $($web.url) -group $SPGroupName" -foregroundcolor green
            new-spuser -useralias $ADGroupMember.LoginName -web $web.url -group $SPGroupName
           # $web.site.rooteweb.ensureUser($ADGroupMember.loginname)
            set-SPuser -identity $ADGroupMember.LoginName -web $web.url -group $spgroupname

      }
      write-host "Done adding users - script will now exit" -foregroundcolor magenta
      exit
I get an error when I execute the script (refer to the attached image)

We are on SharePoint 2013 using claim based authentication. I tried Set-SPUser -Identity "i:0#.w|domain\username" -Web http://example.com with no success

Can anyone tell me why new-spuser cmdlet is unable to find the user

Same with the Set-SPUser command aswell. 

Please Help

Cheers,

D



is it possible to create copies of site-collection

$
0
0

we have a site-collection "A". We want to create 2 more site collection's ( B & C ) with content and structure almost similar to "A".

I was wondering if there is a way we can clone/create copies of "A" to avoid building everything from scratch. The idea is once we have copies of A, we will simply make small changes to content and structure whereever necessary.

If possible then how much time should that take usually ?

Kindly suggest.

Thanks.
prajk

Javascripts not working after applying SP CU of June 2016

$
0
0

Hi, we have a few javascripts on libraries for some reasons and after applyting the CU of June 2016, those stopped working. Those were working previously. I have re-added those JS using Content Editor webpart but those still not to work and also change the version of JS but no luck. Any ideas?

These are the codes: adding a default value for the people column;

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

<script type="text/javascript">

$(document).ready(function () {

var userid = _spPageContextInfo.userId;

function GetCurrentUser() {

var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/getuserbyid(" + userid + ")";

var requestHeaders = { "accept" : "application/json;odata=verbose" };

$.ajax({

  url : requestUri,

  contentType : "application/json;odata=verbose",

  headers : requestHeaders,

  success : onSuccess,

  error : onError

});

}

function onSuccess(data, request){

var loginName = data.d.Title;

SetUserFieldValue("People",jcartin);

}

function onError(error) {

  //alert(error);

}

function SetUserFieldValue(fieldName, userName) {

var _PeoplePicker = $("div[title='" + fieldName + "']");

var _PeoplePickerTopId = _PeoplePicker.attr('id');

var _PeoplePickerEditer = $("input[title='" + fieldName + "']");

_PeoplePickerEditer.val(userName);

var _PeoplePickerOject = SPClientPeoplePicker.SPClientPeoplePickerDict[_PeoplePickerTopId];

_PeoplePickerOject.AddUnresolvedUserFromEditor(true);

}

GetCurrentUser();

});

</script>

To add formula and colors to three columns;

<script language="javascript" type="text/javascript">

function RenderColorForModified(x,y)
{
    var strDate = x.innerText || x.textContent;
    var today = new Date();
    var dateDiff = (Date.parse(today) - Date.parse(strDate)) / 86400000;
    if (y=="1")
    {
        if (dateDiff < 90)
        {  
            x.innerHTML = "<div style='color:black;'>" + x.innerHTML + "</div>";
            x.style.backgroundColor='green';
        }
        else
        {
            if (dateDiff < 120)
            {  
                x.innerHTML = "<div style='color:black;'><b>" + x.innerHTML + "</b></div>";
                x.style.backgroundColor='yellow';
            }
            else
            {  
                x.innerHTML = "<div style='color:black;'><b>" + x.innerHTML + "</b></div>";
                x.style.backgroundColor='red';
            }
        }
    }
    if (y=="2")
    {
        if (dateDiff < 120)
        {  
            x.innerHTML = "<div style='color:black;'>" + x.innerHTML + "</div>";
            x.style.backgroundColor='green';
        }
        else
        {
            if (dateDiff < 180)
            {  
                x.innerHTML = "<div style='color:black;'><b>" + x.innerHTML + "</b></div>";
                x.style.backgroundColor='yellow';
            }
            else
            {  
                x.innerHTML = "<div style='color:black;'><b>" + x.innerHTML + "</b></div>";
                x.style.backgroundColor='red';
            }
        }
    }
    if (y=="3")
    {
        if (dateDiff < 180)
        {  
            x.innerHTML = "<div style='color:black;'>" + x.innerHTML + "</div>";
            x.style.backgroundColor='green';
        }
        else
        {
            if (dateDiff < 270)
            {  
                x.innerHTML = "<div style='color:black;'><b>" + x.innerHTML + "</b></div>";
                x.style.backgroundColor='yellow';
            }
            else
            {  
                x.innerHTML = "<div style='color:black;'><b>" + x.innerHTML + "</b></div>";
                x.style.backgroundColor='red';
            }
        }
    }
    if (y=="4")
    {
        if (dateDiff < 355)
        {  
            x.innerHTML = "<div style='color:black;'>" + x.innerHTML + "</div>";
            x.style.backgroundColor='green';
        }
        else
        {
            if (dateDiff < 536)
            {  
                x.innerHTML = "<div style='color:black;'><b>" + x.innerHTML + "</b></div>";
                x.style.backgroundColor='yellow';
            }
            else
            {  
                x.innerHTML = "<div style='color:black;'><b>" + x.innerHTML + "</b></div>";
                x.style.backgroundColor='red';
            }
        }
    }
}
function RenderColorForCompleteness(x)
{
    var percentageString = x.innerText || x.textContent;
    var percentageNumber = parseFloat(percentageString.substring(0, percentageString.length - 1));

    if (percentageNumber < 51)
    {  
        x.innerHTML = "<div style='color:black;'>" + x.innerHTML + "</div>";
        x.style.backgroundColor='red';
    }
    else
    {
        if (percentageNumber < 76)
        {  
            x.innerHTML = "<div style='color:black;'><b>" + x.innerHTML + "</b></div>";
            x.style.backgroundColor='yellow';
        }
        else
        {  
            x.innerHTML = "<div style='color:black;'><b>" + x.innerHTML + "</b></div>";
            x.style.backgroundColor='green';
        }
    }
}
function RenderColorForCorrectness(x)
{
    var correctnessString = x.innerText || x.textContent;
    if (correctnessString.indexOf("Final") >-1)
    {
        x.innerHTML = "<div style='color:black;'>" + x.innerHTML + "</div>";
        x.style.backgroundColor='green';
        x.style.color='black';
        x.getElementsByTagName('a')[0].style.color='black';
        x.getElementsByTagName('a')[0].onmouseover = function(){this.style.color='black';};
    }
    if (correctnessString.indexOf("Pending Review") >-1)
    {
        x.innerHTML = "<div style='color:black;'>" + x.innerHTML + "</div>";
        x.style.backgroundColor='yellow';
        x.style.color='black';
        x.getElementsByTagName('a')[0].style.color='black';
        x.getElementsByTagName('a')[0].onmouseover = function(){this.style.color='black';};
    }
    if (correctnessString.indexOf("Draft") > -1)
    {
        x.innerHTML = "<div style='color:black;'>" + x.innerHTML + "</div>";
        x.style.backgroundColor='red';
        x.style.color='black';
        x.getElementsByTagName('a')[0].style.color='black';
        x.getElementsByTagName('a')[0].onmouseover = function(){this.style.color='black';};
    }
}
function isDeletedOrRetired(x)
{
    var correctnessString = x.innerText || x.textContent;
    if (correctnessString.indexOf("Retire") > -1 || correctnessString.indexOf("Delete") > -1)
    {
        return false;
    }
    else
    {
        return true;
    }
}
function getTier(x)
{
    return x.innerText || x.textContent;
}

var tables = document.getElementsByTagName("TABLE");
var columns = new Array();
for (var t in tables)
{
    if (tables[t].className == "ms-listviewtable")
    {
        var rows = tables[t].childNodes[0].childNodes;
        var hRow = rows[0].getElementsByTagName("TH");
        var correctnessColumnIndex = -1;
        var modifiedColumnIndex = -1;
        var completenessColumnIndex = -1;
        var tierColumnIndex = -1;
        for (i=0; i<hRow.length;i++)
        {
            if (hRow[i].innerHTML.indexOf("Audited for Correctness") > -1)
            {
                correctnessColumnIndex = i;
            }
            if (hRow[i].innerHTML.indexOf("Modified")>-1 && hRow[i].innerHTML.indexOf("Modified By")==-1)
            {
                modifiedColumnIndex = i;
            }
            if (hRow[i].innerHTML.indexOf("Audited for Completeness")>-1)
            {
                completenessColumnIndex = i;
            }
            if (hRow[i].innerHTML.indexOf("AppLookup:Tier")>-1)
            {
                tierColumnIndex = i;
            }
            columns[i] = (hRow[i].innerText || hRow[i].textContent) + "";   
            columns[i] = columns[i].replace(/\n/,"");  
        }
        for (r=1;r<rows.length;r++)
        {
            var changeColor = false;
            try
            {
                changeColor = isDeletedOrRetired(rows[r].childNodes[correctnessColumnIndex]);
            }
            catch (e)
            {
            }
            if (changeColor)
            {
                for (c=0;c<columns.length;c++)
                {   
                    if (c==correctnessColumnIndex)
                    {
                        try
                        {
                            RenderColorForCorrectness(rows[r].childNodes[c]);
                        }
                        catch (e)
                        {
                        }
                    }
                    if (c==modifiedColumnIndex)
                    {
                        try
                        {
                            RenderColorForModified(rows[r].childNodes[c], getTier(rows[r].childNodes[tierColumnIndex]));
                        }
                        catch (e)
                        {
                        }
                    }
                    if (c==completenessColumnIndex)
                    {
                        try
                        {
                            RenderColorForCompleteness(rows[r].childNodes[c]);
                        }
                        catch (e)
                        {
                        }
                    }
                }
            }
        }
    }
}</script>

Site feed not showing for all users

$
0
0

Hello,

I'm creating a new site for a client, which includes a Site Feed app on the home page. I'm able to add the app, configure it, save it, etc.

However it is not visible at all to me upon saving the page. Just an empty space with no errors or messages. This is 2013 on-premise, I am a Site Collection Admin, a Farm admin, and have all the necessary credentials to see this. Luckily all the other users can see it, but not being visible to me a very odd.

I've tried removing it and re-inserting, an IIS Reset, and there are no warnings in the Central Admin site.

Any suggestions are welcome and most appreciated.

thanks!

Viewing all 21070 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>