SP2010 list in SP2013

Hi,
I am trying to create an app in SP 2013 using a list template obtained from SP2010. 
First i did download the list template from SP2010 and uploaded that list template to the List Template Gallery of SP2013.
Now, I am trying to create an App from Site contents. After giving a name for 'Adding Custom List' under 'Pick a name' and clicking 'Create' i am getting an error as below.
Please help me how can i make available the list template from SP2010 in our SP2013? - Thanks in Advance!
--------------------------- Radhai Krish | Golden Age is no more far | --------------------------

check this
http://absolute-sharepoint.com/2013/08/how-to-move-a-list-from-sharepoint-2010-to-sharepoint-2013.html
Im sorry for marking that as 'Not an answer'....also sorry for the delay as i had gone for a week whole training so didn't get time to follow up the thread..
Fine...
Hi sk2014!
The link which you had given, i tried to check if any one option would work for me ..
But none of those met my scenario of migrating a list from 2010 to 2013. 
I am trying to replicate a list form which we had created in one of our sharepoint 2010. But that sharepoint is accessed globally by many users. And none of our team have any rights / access details to the central administration of that sharepoint. But we
have the rights to modify / delete / add anything to that list form from sharepoint login.
In this case we are tried to download the template of that SP 2010 list and we had got that template. Also was able to import that template under list gallery of our local SP 2013. But when i tried to create an App out of it ... im facing this issue ..
Im purely from SQL BI background ...so i don't know anything ABC of SharePoint...So request you to kindly guide me if my way of migrating SP 2010 list form to SP 2013 is correct or wrong ..?
If wrong please let me know how to achieve this.?
Thank you very much in advance !!
--------------------------- Radhai Krish | Golden Age is no more far | --------------------------

Similar Messages

  • How to edit email address present in a SP2010 list

    HI,
    In the SP2010 list "Request Page", whenever a user submits a request an automated email goes to a specific email id reagrding the submission of request.
    I donot know how the internal procedure is done as i am totally new to SP . I tried going to List permission and checking the "Manage Access Request" for any presence of email id. But, i did not find any.
    The current requirement is that i have to change that email id and put mine . I have no clue as to where i should go and change the email id.
    I donot have the dev environment. Whatever i have to do , i need to do OOTB as no coding whatsoever has been done during designing this site.
    Please let me know how i can do this OOTB .
    Regards,
    Anena

    It sounds like there is a workflow in place, if I'm understanding the scenario correctly. When viewing the List, go to Workflow Settings in the ribbon and see if there are any workflows attached to the List.
    If there are, you can edit them with SharePoint Designer 2010 (http://www.microsoft.com/en-us/download/details.aspx?id=16573). If the workflow was developed in Visual Studio, then you will need to find the author with the source code.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Can I upgrade from SP2010 SP1 to Sp2013 Sp1 without upgrading to SP2010 SP2 first

    Hi
    I have a farm currently on Sp2010 Sp1 running on Windows 2008 R2.
    I want to upgrade to Sp2013 SP1 running on Windows 2012 R2.
    Do I need to upgrade the Sp2010 SP1 farm to SP2010 SP2 before I upgrade to Sp2013 SP1.
    The plan is to build SP2012 R2 first followed by installing SP2013 Sp1.
    The we will then move the content database (119 GB with  500GB of Remote Blob Storage) from Sp2010 environment to the Sp2013 Sp1 environment and use the PowerShell command Upgrade-SPContentDatabase to do the upgrade.  But do I need to upgrade
    SP2010 SP1 to SP2010 Sp2 before moving the content database to Sp2013 SP1 environment.
    Thanks
    Nigel
    Nigel Price NJPEnterprises

    Yes, you can actually go from SharePoint 2010 RTM to SharePoint 2013 (any build). The only exception to that is if you're using RBS on SharePoint 2010, then you must have applied SharePoint 2010 SP1 first.
    The December 2012 CU for SharePoint 2010 does have a wide list schema check, so it may be a good idea to apply that prior to the upgrade to 2013, but it isn't a requirement.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Display SP2010 list items on a non-SP site

    I want to display items from a SharePoint list on an internal non-SP site. This would be read-only access, and the other site doesn't use Windows authentication. For security reasons, I would prefer not to allow anonymous access for anything on the
    SharePoint site. Can I create a dummy account that has only read access to just the specific list? If so, would that interfere with the standard authentication if the user goes to SP to add a list item? Or can the list be set up as a data source for a script
    on the non-SP site?

    Hi,
    I would suggest you create a new application based out of CSOM or JSOM / REST API and display information in your internal Non-SP Site. Else,you can use Iframe to display information within your internal site, however to get this working you may have
    to break inheritance and define permission level for users who need to do CRUD operation and for those accessing the list within internal non sp site readonly access.
    If you are ok with custom app model, then I would suggest these links -
    http://msdn.microsoft.com/en-us/library/ff798388.aspx
    http://msdn.microsoft.com/en-us/library/office/ee539350(v=office.14).aspx
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

  • Javascript API, Get List PropertyBag, SP2013 Persmissions Bug?

    Hey,
    i want to read the propertybag out of a SPLIST Object via javascript api.
    The PropertyBag is stored in the rootfolder, so you can access it, but NOT! when the user has only read permissions on the website.
    The exact List Permission to read a PropertyBag for Lists is "Manage Lists" for the javascript API
    var listInfoCollection = clientContext.loadQuery(oWebsite.get_lists(), "Include(Title,Id,ParentWebUrl,BaseTemplate,RootFolder.ServerRelativeUrl, RootFolder.Properties)");
    Can anyone tell me another way to retrieve List PropertyBag via javascript?

    Did you try using export import method in property bag setting?
    http://pbs2013.codeplex.com/

  • Calling sp2010 workflow from within sp2013 workflow

    Hi,
    I have created a sp2010 workflow on a list in sp2013 through designer. The workflow has just one step in it - "Send an email".
    Now I have a 2013 workflow as well on the same list. I inserted a ""start a sp2010 workflow"" step in it. Now when I try to select the sp2010 workflow after selecting the list, the corresponding sp201 workflow doesn't appear.
    I have saved, and published the sp2010 w/f. But it still doesn't appear to select here.
    Is there anything else to be done ? Please let me know experts.
    Thank you !
    Regards

    Hi Prajk,
    After creating and publishing the 2010 workflow in SharePoint Designer, we need to refresh the workflows.
    Click the Refresh button or click F5 to do a refresh in SharePoint Designer and then do will see the 2010 list workflow listed in the Start a List Workflow step.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Differences between SP2010 and SP2013 REST API?

    Hi Folks,
    Does anyone know the differences between the SharePoint 2010 and 2013 REST APIs. 
    I am making a call on SP2013 using the below format to get documents out of a document library.
    "{0}/_api/web/lists/getByTitle('{1}')/items?$select=FileLeafRef"
    When I try and use the above to call SP2010 it fails, so I am wondering what the correct call ought to be?
    (Note: Once I have a handle to a file in the doc library I then need to copy it as a SPFile object).
    Regards
    Andy

    Hi folks,
    Thanks everyone for replying.
    One issue,  when calling the listdata.svc, would I not have to create some form of a service reference?
    The connection string is provided by a user at runtime  - it is a web-part that prompts for the source list to get the data from, so I need to be able to create the service connection dynamically (I cant create predefined service references and proxies). 
    Regards
    Andy
    Update:  I am making the call to SP2010 from a SP2013 server, it appears that the call to SPSite is returning null. When I paste the URL into the browser window I get the document library in what appears to be ATOM format.  I suspect that I need to
    implement an entirely different access mechanism rather than use SP2013 techniques.

  • How to send bulk email to contacts stored in SharePoint 2010 lists

    How do I send a group email to contacts stored in SP2010 List? I have a very large Customer List with various categories(supervisors, employees..etc). I would like to filter the list(say all supervisors) and send them an email directly from sharepoint?
    Thanks
    Cec
    nothing for members to see

    You can send email from javascript in an content editor web part or HTML Form webpart  (if someone is doing this interactively in the browser AND they have an email client installed) by changing the current page ref to a mailto: reference.
    location.href="mailto:"+emailTo+emailSub+emailBody;
    var emailSub = "?subject=xxxxx";
    var emailBody = "&body=xxxxx";
    That will pop up an email window. Build up the emailTo by using Javascript/JQuery to pick up selected people on the page, or all rows on the page, or use something like SPServices or web service calls to pick up all items in a specific view. Depends totally
    on how you want the UI to work. Not sure I'd do this on an external facing SP site since you wouldn't want any emails addresses in the clear to harvest, but inside a company intranet should be fine.
    For example, you could read all records in the Supervisors view, build up the emailTo var with the correct addresses or names that your email client needs, then set location.href to the correct mailto: link.
    Robin

  • Error in migrating SharePoint 2010 list fields to Office 365 list [CSOM]

    Hi,
    I am trying to migrate a SharePoint 2010 list to Office 365. I created a new ListCreationInfo for a new list in O365. But when i am to trying add fields from SP2010 list, its giving me an error after list.update()  -
    A duplicate field name "fa564e0f-0c70-4ab9-b863-0177e6ddd247" was found.
    if (!l.Hidden)
    ListCreationInformation creationInfo = new ListCreationInformation();
    creationInfo.Title = l.Title;
    creationInfo.TemplateType = l.BaseTemplate;
    List list = web.Lists.Add(creationInfo);
    //Fields in the list
    ctxOnPrem.Load(l.Fields);
    ctxOnPrem.ExecuteQuery();
    foreach (Field f in l.Fields)
    list.Fields.AddFieldAsXml(f.SchemaXml, true, AddFieldOptions.DefaultValue); list.Update();
    Note- l is the SharePoint 2010 List.

    Answer given on StackExchange -
    http://sharepoint.stackexchange.com/questions/128875/error-in-migrating-sharepoint-2010-list-fields-to-office-365-list-csom/129015#129015
    Thanks,
    Thomas

  • How to enable Gant view for migrated Task Lists in SharePoint 2013

    We recently migrated several Task type Lists from an old SharePoint environment (WSS on SP 2003) to SharePoint Enterprise 2013.  I do not see the Timeline, Calendar and Gant View options available for the migrated Views of the migrated lists like
    I see for newly created Task Lists in SP2013. Is there a way to enable this feature for these migrated Task Lists?

    Hi,
    For this issue, I'm trying to involve someone familiar with this topic to further look at it.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback
    for TechNet Subscriber Support, contact [email protected]
    Wendy Li
    TechNet Community Support

  • SharePoint 2013 site collection 'upgrade completed with errors'

    Hi All, 
    I am in process to upgrade SharePoint 2010 to SharePoint 2013 with all steps as mentioned in TechNet. 
    I was able to get all the SP2010 UI in SP2013 environment. However, when I navigated to top level site and clicked on “Site
    Collection health checks”. In SP2010 environment I never used (as Farm Admin) any Video content type. It belongs
    to out-of-the-box "digital asset content types" and cannot be deleted.
    Therefore I changed the name of Video to our department name like "Video - Company" and ran the site collection health check again. This time there was no conflict for content types. 
    After ran the site collection upgrade I got following error. 
    -------------------------------------------START------------------------------------------
    05/05/2014 14:34:28.66 OWSTIMER (0x1474)
    0x123C SharePoint Foundation Upgrade
    SPFeatureDefinition aj2bj
    ERROR Feature upgrade action 'AddContentTypeField' threw an exception upgrading Feature 'CTypes' (Id: 15/'695b6570-a48b-4a8e-8ea5-26ea7fc1d162') in Site 'http://sp13fe01-dev': Field type
    Rating is not installed properly. Go to the list settings page to delete this field.
    32d48d9c-70d4-f09a-6073-526808f844be
    05/05/2014 14:34:53.04 OWSTIMER (0x1474)
    0x123C SharePoint Foundation Upgrade
    SPSiteWssSequence2 ajy6m
    ERROR Feature upgrade incomplete for Feature 'CTypes' (Id: 15/'695b6570-a48b-4a8e-8ea5-26ea7fc1d162') in Site 'http://sp13fe01-dev'. Exception: Field type Rating is not installed properly. Go to the list settings
    page to delete this field. 32d48d9c-70d4-f09a-6073-526808f844be
    05/05/2014 15:18:43.95 OWSTIMER (0x1474)
    0x123C SharePoint Foundation Upgrade
    SPManager ajxoe
    ERROR RunUpgradeSiteSession [SPSite Url=http://sp13fe01-dev] failed.
    32d48d9c-70d4-f09a-6073-526808f844be
    05/05/2014 15:18:44.16 OWSTIMER (0x1474)
    0x123C SharePoint Foundation Upgrade
    SPManager ajxoe
    ERROR Exception: Upgrade completed with errors.  Review the upgrade log file located in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS\SiteUpgrade-20140505-143330-61.log.  The
    number of errors and warnings is listed at the end of the upgrade log file.
    32d48d9c-70d4-f09a-6073-526808f844be
    05/05/2014 15:18:44.16 OWSTIMER (0x1474)
    0x123C SharePoint Foundation Upgrade
    SPManager ajxoe
    ERROR   at Microsoft.SharePoint.Upgrade.SPUpgradeSession.CheckPoint()     at Microsoft.SharePoint.Upgrade.SPUpgradeSession.LogEnd()     at Microsoft.SharePoint.Upgrade.SPManager.RunUpgradeSiteSessionCore(Object
    lockObject, SPSite site, SPUpgradeOperationFlags upgradeOperationFlags, Boolean checkConcurrentSiteUpgradeSessi
    32d48d9c-70d4-f09a-6073-526808f844be
    -----------------------------------END-------------------------------------
    Feature ID 695b6570-a48b-4a8e-8ea5-26ea7fc1d162 is Standard Content Type Definitions  https://social.technet.microsoft.com/wiki/contents/articles/7695.sharepoint-2010-list-of-features-id-displayname-and-scopes.aspx. 
    Any expert to solve the issue?? 
    Thank you. 
    regards, 
    Aroh Shukla

    Hi All and Inderjeet,
    Thanks for your reply and pointers. 
    I did follow the steps as mentioned in the links above. I used some third party solutions but not for any Video solution. I was able to successfully migrated the SP2010 (WSS_Content) to SP2013 (WSS_Content) environment a few weeks back with exactly same
    third party solutions and no site collection error:
    I renamed the default and out-of-the box video site content type as shown:
    I ran the "Site Collection Health Check" and did not receive any error as in my second screenshot. 
    But, after upgrade the Site Collection Upgrade and got the same errors. 
    I don't know if there is any SharePoint Server 2013 patch gave this error as I keep run the Windows Server 2012 (not running R2) and SharePoint Server 2013 regularly.  
    Can suggest how to resolve this error?
    Many Thanks!!
    --Aaroh 
    Aroh Shukla
    The same here. Opening a support ticket with MS.

  • Connected webpart filterd by previous selection

    Hi,
    I have upgraded an SP2010 farm to SP2013 and im running into a strange issue.
    On a page I have to connected webparts (both xslt list viewers).
    The strange thing is :
     select item a in list x  nothing happens.
    Select item b in  list x, list y is filtered by item a
    Select item c (or a) in list x, list y is filtered by item b and so on.
    It looks like the setting from list x is set after list y is renderd. But i have no idea how to change that order.
    Already tried to remove the connection and rebuild it. Tried al different ajax settings and server render options
    List y is below list x, so would probably renderd first.
    Am i missing a setting so i can fix the rendering?
    It al okay in the SP2010 page. (im running in 2013 mode)
    Kind regards,
    Lennard

    Hi Lennard,
    According to your description, my understanding is that the connection between the two list view web parts work incorrectly after migrating to SharePoint 2013.
    How did you set the connection between the two web parts?
    I recommend to create a new page and re-add the two list view web parts, then configure the connection between the web parts to see if the issue still occurs.
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Is SharePoint 2010 Supported on Windows 2012 R2

    Hi
    I have read Trevor Seward's responses to various questions on this subject :-
    http://social.technet.microsoft.com/Forums/en-US/ad4e17ee-83de-41d6-a974-244ceccb8a63/is-sharepoint-2010-sp1-is-supported-by-windows-server-2012-currently-i-have-os-version-of-server?forum=sharepointadminprevious
    http://social.technet.microsoft.com/Forums/en-US/e7539d34-aaa2-4d9c-a44c-e65d388d8944/support-for-sharepoint-foundation-2010-on-windows-server-2012-r2?forum=sharepointadminprevious
    However, we have a farm which is currently SP2010 SP1 which we are about to upgrade to SP2010 SP2 running on Windows Server 2008R2 and SQL Server 2008 R2. So the farm is currently not supported by Microsoft.
    We are now looking to upgrade this farm to SP2013 SP1 running Windows Server 2012 R2 and SQL Server 2012.
    We plan to start this process of by upgrading Windows Server 2008 R2 to Windows Server 2012 R2.
    Will SharePoint 2010 SP2 run on Windows 2012 R2 (or will we need Windows 2012) ?
    Once Server 2012 R2 (or Server 2012) is up and running, we will upgrade SP2010 SP2 to Sp2013 SP1.
    Finally upgrade SQL Server 2008R2 to SQL Server 2012.
    So the part I don't know is will SharePoint 2010 SP2 run on Windows 2012 R2 or Windows 2012 ?
    Thanks
    Nigel
    Nigel Price NJPEnterprises

    Not a question for the Windows Server people.  This is a question for the SharePoint people.  You may want to try asking in a SharePoint forum like
    http://social.technet.microsoft.com/Forums/en-US/home?forum=sharepointadminprevious
    . : | : . : | : . tim

  • Disaster Recovery set-up for SharePoint 2013

    Hi,
    We are migrating our SP2010 application to SP2013. It would be on-premise setup using virtual environment.
    To handle disaster recovery situation, it has been planned to have two identical farms (active, passive) hosted in two different  datacenters.
    I have prior knowledge of disaster recovery only at the content DB level.
    My Question is how do we make two farm identical and how do we keep Database of both the farm always in sync.
    Also if a custom solution is pushed into one of the farm, how does it replicate to the other farm.
    Can someone please help me in understanding this D/R situation. 
    Thanks,
    Rahul

    Metalogix Replicator will replicate content, but nothing below the Web Application level (you'd still have to configure the SAs, Central Admin settings, deploy solutions, etc.).
    While AlwaysOn is a good choice, do remember that ASync AO is not supported across all of SharePoint's databases (see
    http://technet.microsoft.com/en-us/library/jj841106.aspx). LogShipping is a good choice, especially with content databases as they can be placed in a read only mode on the DR farm for an
    active crawl to be completed against them.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Powershell Script to find out Orphan Users ( Who are no longer available in AD but SharePoint) in SharePoint 2013

    Hi,
    Can you please on the above issue? I have one script which works fine for sp2010 but not sp2013 below,
    Script
    function Check_User_In_ActiveDirectory([string]$LoginName, [string]$domaincnx)
    $returnValue = $false
    #Filter on User which exists and activated
    #$strFilter = "(&(objectCategory=user)(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2)(samAccountName=$LoginName))"
    #Filter on User which only exists
    #$strFilter = "(&(objectCategory=user)(objectClass=user)(samAccountName=$LoginName))"
    #Filter on User and NTgroups which only exists
    $strFilter = "(&(|(objectCategory=user)(objectCategory=group))(samAccountName=$LoginName))"
    $objDomain = New-Object System.DirectoryServices.DirectoryEntry($domaincnx)
    $objSearcher = New-Object System.DirectoryServices.DirectorySearcher
    $objSearcher.SearchRoot = $objDomain
    $objSearcher.PageSize = 1000
    $objSearcher.Filter = $strFilter
    $objSearcher.SearchScope = "Subtree"
    #$objSearcher.PropertiesToLoad.Add("name")
    $colResults = $objSearcher.FindAll()
    if($colResults.Count -gt 0)
    #Write-Host "Account exists and Active: ", $LoginName
    $returnValue = $true
    return $returnValue
    function ListOrphanedUsers([string]$SiteCollectionURL, [string]$mydomaincnx)
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null
    $site = new-object Microsoft.SharePoint.SPSite($SiteCollectionURL)
    $web = $site.openweb()
    #Debugging - show SiteCollectionURL
    write-host "SiteCollectionURL: ", $SiteCollectionURL
    Write-Output "SiteCollectionURL - $SiteCollectionURL"
    $siteCollUsers = $web.SiteUsers
    write-host "Users Items: ", $siteCollUsers.Count
    foreach($MyUser in $siteCollUsers)
    if(($MyUser.LoginName.ToLower() -ne "sharepoint\system") -and ($MyUser.LoginName.ToLower() -ne "nt authority\authenticated users") -and ($MyUser.LoginName.ToLower() -ne "nt authority\local service"))
    #Write-Host "  USER: ", $MyUser.LoginName
    $UserName = $MyUser.LoginName.ToLower()
    $Tablename = $UserName.split("\")
    Write-Host "User Login: ", $MyUser.LoginName
    $returncheck = Check_User_In_ActiveDirectory $Tablename[1] $mydomaincnx 
    if($returncheck -eq $False)
    #Write-Host "User not exist: ",  $MyUser.LoginName, "on domain", $mydomaincnx 
    Write-Output $MyUser.LoginName 
    $web.Dispose()
    $site.Dispose()
    function ListOrphanedUsersForAllColl([string]$WebAppURL, [string]$DomainCNX)
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null
    $Thesite = new-object Microsoft.SharePoint.SPSite($WebAppURL)
    $oApp = $Thesite.WebApplication
    write-host "Total of Site Collections: ", $oApp.Sites.Count
    $i = 0
    foreach ($Sites in $oApp.Sites)
    $i = $i + 1
    write-host "Collection N° ", $i, "on ", $oApp.Sites.Count
    if($i -gt 0)
    $mySubweb = $Sites.RootWeb
    $TempRelativeURL = $mySubweb.Url
    ListOrphanedUsers $TempRelativeURL $DomainCNX
    function StartProcess()
    # Create the stopwatch
    [System.Diagnostics.Stopwatch] $sw;
    $sw = New-Object System.Diagnostics.StopWatch
    $sw.Start()
    #cls
    ListOrphanedUsersForAllColl "http://portal" "LDAP://DC=Srabon,DC=com" 
    ListOrphanedUsersForAllColl "http://portal/sites/Test" "LDAP://DC=Srabon,DC=com"  
    $sw.Stop()
    # Write the compact output to the screen
    write-host "Time: ", $sw.Elapsed.ToString()
    StartProcess
    # Can be executed with that command : "Check-SharePoint-Orphaned-Users.ps1 > orphaned_users.txt"
    srabon

    Hi Srabon,
    Try this it works in SP2007, SP2010, and SP2013.
    Mod line 70: $WebAppURL="http://intranet.contoso.com" to your "http://WebApp"
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
    #Functions to Imitate SharePoint 2007, 2010, 2013
    function global:Get-SPWebApplication($WebAppURL)
    return [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup($WebAppURL)
    function global:Get-SPSite($url)
    return new-Object Microsoft.SharePoint.SPSite($url)
    function global:Get-SPWeb($url)
    $site= New-Object Microsoft.SharePoint.SPSite($url)
    if ($site -ne $null)
    $web=$site.OpenWeb();
    return $web
    #Check if User exists in ActiveDirectory
    function CheckUserExistsInAD()
    Param( [Parameter(Mandatory=$true)] [string]$UserLoginID )
    #Search the User in ActiveDirectory
    $forest = [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest()
    foreach ($Domain in $forest.Domains)
    $context = new-object System.DirectoryServices.ActiveDirectory.DirectoryContext("Domain", $Domain.Name)
    $domain = [System.DirectoryServices.ActiveDirectory.Domain]::GetDomain($context)
    $root = $domain.GetDirectoryEntry()
    $search = [System.DirectoryServices.DirectorySearcher]$root
    $search.Filter = "(&(objectCategory=User)(samAccountName=$UserLoginID))"
    $result = $search.FindOne()
    if ($result -ne $null)
    return $true
    return $false
    $WebAppURL="http://intranet.contoso.com"
    #Get all Site Collections of the web application
    $WebApp = Get-SPWebApplication $WebAppURL
    #Iterate through all Site Collections
    foreach($site in $WebApp.Sites)
    #Get all Webs with Unique Permissions - Which includes Root Webs
    $WebsColl = $site.AllWebs | Where {$_.HasUniqueRoleAssignments -eq $True} | ForEach-Object {
    $OrphanedUsers = @()
    #Iterate through the users collection
    foreach($User in $_.SiteUsers)
    #Exclude Built-in User Accounts , Security Groups & an external domain "corporate"
    if (($User.LoginName.ToLower() -ne "nt authority\authenticated users") -and
    ($User.LoginName.ToLower() -ne "sharepoint\system") -and
    ($User.LoginName.ToLower() -ne "nt authority\local service") -and
    ($user.IsDomainGroup -eq $false ) -and
    ($User.LoginName.ToLower().StartsWith("corporate") -ne $true) )
    $UserName = $User.LoginName.split("\") #Domain\UserName
    $AccountName = $UserName[1] #UserName
    if ( ( CheckUserExistsInAD $AccountName) -eq $false )
    Write-Host "$($User.Name)($($User.LoginName)) from $($_.URL) doesn't Exists in AD!"
    #Display Orphaned users
    $OrphanedUsers+=$User.LoginName
    # <<<UNCOMMENT to Remove Users#
    # Remove the Orphaned Users from the site
    # foreach($OrpUser in $OrphanedUsers)
    # $_.SiteUsers.Remove($OrpUser)
    # Write-host "Removed the Orphaned user $($OrpUser) from $($_.URL) "
    $web.Dispose()
    $site.Dispose()
    -Ivan

Maybe you are looking for