Error Cannot Find An Spsite Object With Id Or Url
Contents |
(עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) Home20132010Other VersionsLibraryForumsGallery Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Cannot find an SPSite object backup-spsite cannot find an spsite object with id or url with Id or Url in PowerShell over HTTPS SharePoint > SharePoint
Get-spweb : Cannot Find An Spweb Object With Id Or Url
2010 - General Discussions and Questions Question 0 Sign in to vote So I've setup a
Get-spcontentdatabase Cannot Find An Spsite Object With Id Or Url
web application that runs on https://hostname:10433. This website is only accessible via https and I'm thinking that this may be what is causing the problem in PowerShell
New-spprofileserviceapplication : Cannot Find An Spsite Object With Id Or Url
but I'm not sure. So when I run... Get-SPSite https://hostname:10433 ...I get "Cannot find an SPSite object with Id or Url https://hostname:10433". I'm running this command via PowerShell on the server logged in with an account that is a Farm Administrator and Site Collection Administrator for this site so all of the necessary permissions add-spshelladmin are in place. I am able to connect to other web applications on this server just fine that are accessible over http (not https). What am I missing? Wednesday, September 19, 2012 9:12 PM Reply | Quote Answers 1 Sign in to vote Very strange thing happened a little bit after I posted this question. I went in to Central Administration and created an alternate access mapping to http://hostname:10433 in the Default zone. I was then able to run... Get-SPSite http://hostname:10433 ...without any problems and got back an object. Very strange. And to answer @Roger... When I ran... Get-SPWebApplication
have given me enough permissions for executing the sharepoint powershell get-spweb command, but I forgot to specify the content database. This is powershell get-spsite crucial if you want to create PowerShell objects that are existing within these content databases. Finding the contentdatabase of a https://social.technet.microsoft.com/Forums/office/en-US/68bd3305-d251-4f09-abf2-1a0bc6a30b35/cannot-find-an-spsite-object-with-id-or-url-in-powershell-over-https?forum=sharepointgeneralprevious web application can be done quickly with Get-SPContentDatabase. Here's a sample script that will create a contentdatabase object, which is used as a parameter for the Add-SPShellAdmin cmdlet. $db = Get-SPContentDatabase -site http://sharepoint Add-SPShellAdmin -UserName SPSP_User -database $db The http://bramnuyts.be/2011/06/08/get-spweb-cannot-find-an-spweb-object-with-id-or-url/ error could've been a bit more descriptive than "Cannot find" in my opinion. TAGS: Add-SPShellAdmin - Get-SPWeb - PowerShell - SharePoint - SharePoint 2010 2 Comments Ross Currie February 14, 2013 at 6:47 am My bad luck, I get "Get-SPContentDatabase : Cannot find an SPSite object with Id or Url: xxxxx". And, deeper down the rabbit hole I go reply Yuval October 17, 2013 at 10:57 am you should run Powershell as administrator reply Leave a Reply Cancel reply Your email address will not be published. Required fields are marked * Name * Email * Website Comment Notify me of follow-up comments by email. Notify me of new posts by email. © 2015 Bram Nuyts
following Id or Url Problem You are attempting to execute a Get-SPWeb, Get-SPSite or similar commandlet in an elevated SharePoint Management shell, but each time experience an http://alstechtips.blogspot.com/2015/07/sharepoint-2013-get-spweb-cannot-find.html error of type, Get-SPWeb : Cannot find an SPSite object that contains the following Id or Url: htp://[yoursite] One possible cause for this error is the SecurityTokenService. Solution In IIS, stop http://chakkaradeep.com/index.php/error-handling-in-sharepoint-2010-powershell-cmdlets/ and start the SecurityTokenServiceApplicationPool. References None Posted by Al at Monday, July 06, 2015 Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest Labels: SharePoint 2013 No comments: Post a Comment Newer cannot find Post Older Post Home Subscribe to: Post Comments (Atom) Search This Blog Blog Archive ► 2016 (38) ► October (1) ► September (4) ► August (4) ► July (8) ► June (3) ► May (5) ► April (3) ► March (3) ► February (4) ► January (3) ▼ 2015 (98) ► December (6) ► November (5) ► October (8) ► September (9) ► cannot find an August (5) ▼ July (6) SharePoint 2013 TIP: how to remove a user from a s... SharePoint 2013: attempting to share a file return... SharePoint 2013: Workflow 2013: Sorry, something w... SQL Server 2012: The application-specific permissi... SharePoint 2013 TIP: how to get list of all docume... SharePoint 2013: Get-SPWeb : Cannot find an SPSite... ► June (10) ► May (5) ► April (12) ► March (12) ► February (7) ► January (13) ► 2014 (122) ► December (12) ► November (3) ► October (5) ► September (9) ► August (5) ► July (10) ► June (17) ► May (15) ► April (13) ► March (8) ► February (11) ► January (14) ► 2013 (88) ► December (12) ► November (4) ► October (23) ► September (24) ► August (1) ► June (11) ► May (2) ► April (1) ► March (2) ► February (3) ► January (5) ► 2012 (18) ► December (1) ► November (3) ► October (2) ► September (2) ► August (2) ► April (4) ► March (2) ► February (2) ► 2011 (42) ► August (4) ► July (1) ►
PowerShell Cmdlets I love SharePoint 2010 PowerShell Cmdlets. If you are lazy to open Visual Studio and write code (yea right!) then PowerShell is a great tool for you! For a full list of SharePoint 2010 PowerShell Cmdlets, visit here - http://msdn.microsoft.com/en-us/library/ee534955.aspx Now that you have started using these SharePoint 2010 cmdlets, how do you handle errors? The same rules of error handling which applies to normal PowerShell also applies to SharePoint 2010 Cmdlets. If you are still not aware of those basic error handling in PowerShell (like me), then here is a quick introduction of how you can easily handle errors in PowerShell Basic Example Below is a simple cmdlet: $spSite = Get-SPSite “http://chaks” If there is no site “http://chaks”, PowerShell will throw an error: Get-SPSite : Cannot find an SPSite object with Id or Url: http://chaks. At C:UsersAdministratorDocumentsscript.ps1:1 char:21 + $spSite = Get-SPSite <<<< "http://chaks" + CategoryInfo : InvalidData: (Microsoft.Share…SPCmdletGetSite: SPCmdletGetSite) [Get-SPSite], SPCmdletPipeBindException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletGetSite Since you have used a local variable $spSite , you can also check whether it is Null: if($spSite -eq $Null) { Write-Host "Cannot find http://chaks" } else { Write-Host "Connected to http://chaks" } This is fine, but PowerShell will still print the error message and then proceed to check whether $spSite is Null and display the appropriate message. Using ErrorAction and ErrorVariable Using these two common parameters – ErrorAction and ErrorVariable – PowerShell makes it easy to handle errors. So, our example now becomes: $spSite = Get-SPSite “http://chaks” -ErrorAction SilentlyContinue -ErrorVariable err if($spSite -eq $Null) { Write-Host "Cannot find http://chaks" } e