Saturday, October 27, 2012

Useful sp2010 _layouts locations

So you have a broken WebPart on a page, how do you remove it?

Easy, simply add '?contents=1' to the URL as a querystring parameter.
e.g. http://contoso/default.aspx?contents=1

It will take you to the 'Maintenance: Web Part Page' from where you can remove the problematic WebPart(s).



Update (2013/02/07):

URL Description
?contents=1Open web part
_layouts/settings.aspx Site Settings
_layouts/user.aspx Manage users for site
_layouts/create.aspxPage to create content. (useful if you have a Silverlight problem)
_layouts/AreaWelcomePage.aspx Welcome page settings
_layout/addgallery.aspxDirect link to Silverlight creation page.
_layouts/storman.aspx Storage metrics for your SharePoint site
/_catalogs/users/simple.aspxUser information list for all users in SharePoint.
_admin/CNTDBADM.aspxManage content databases. (Central administration)
_admin/ServiceApplications.aspxService Application settings. (Central administration)
_layouts/viewscopesView search scopes. (Central administration)
Generalapplicationsettings.aspxGeneral application settings. (Central administration)  

Thnx to:
http://technicallead.wordpress.com/2012/07/20/good-to-knowlayout-pages-in-sharepoint-2010/

Wednesday, October 17, 2012

STSADM to Windows PowerShell equivalent mapping


This article lists Stsadm operations and their equivalent Windows PowerShell cmdlets. Where there is no one-to-one mapping between the operations and cmdlets, the table lists the specific Windows PowerShell parameters you must use to get the same functionality.

Stsadm operation Windows PowerShell cmdlet
Activatefeature Enable-SPFeature
Addalternatedomain New-SPAlternateUrl
Addcontentdb Mount-SPContentDatabase
New-SPContentDatabase
Addpath New-SPManagedPath
Addpermissionpolicy None
Addsolution Add-SPSolution
Addtemplate Install-SPWebTemplate
Adduser New-SPUser
Addwppack Install-SPWebPartPack
Addzoneurl New-SPAlternateUrl
Authentication Set-SPWebApplication
Use the AuthenticationMethod or AuthenticationProvider parameters.
Backup Backup-SPConfigurationDatabase
Backup-SPFarm
Backup-SPSite
Backuphistory Get-SPBackupHistory
Binddrservice None
Blockedfilelist None
Canceldeployment None
Changepermissionpolicy None
Copyappbincontent None
Createadminvs New-SPCentralAdministration
Creategroup None
Createsite New-SPSite
Createsiteinnewdb New-SPSite Use the ContentDatabase parameter.
New-SPContentDatabase
Createweb New-SPWeb
Databaserepair None
Deactivatefeature Disable-SPFeature
Deleteadminvs None
Deletealternatedomain Remove-SPAlternateUrl
Deleteconfigdb Remove-SPConfigurationDatabase
Deletecontentdb Dismount-SPContentDatabase
Deletegroup None
Deletepath Remove-SPManagedPath
Deletepermissionpolicy None
Deletesite Remove-SPSite
Deletesolution Remove-SPSolution
Deletetemplate Uninstall-SPWebTemplate
Deleteuser Remove-SPUser
Deleteweb Remove-SPWeb
Deletewppack Uninstall-SPWebPartPack
Deletezoneurl Remove-SPAlternateUrl
Deploysolution Install-SPSolution
Deploywppack Install-SPWebPartPack
Disablessc None
Displaysolution Get-SPSolution
Email None
Enablessc None
Enumalternatedomains Get-SPAlternateURL
Enumcontentdbs Get-SPContentDatabase
Enumdeployments None
Enumgroups None
Enumroles None
Enumservices Get-SPServiceInstance
Enumsites Get-SPSiteAdministration (To run this cmdlet, you must be a member of the Farm Administrators group.)
Get-SPSite (To run this cmdlet, you must be a local administrator on the computer where SharePoint 2010 Products is installed.)
Enumsolutions Get-SPSolution
Enumsubwebs Get-SPWeb
Enumtemplates Get-SPWebTemplate
Enumusers Get-SPUser
Enumwppacks Get-SPWebPartPack
Enumzoneurls Get-SPAlternateURL
Execadmsvcjobs Start-SPAdminJob
Export Export-SPWeb
Extendvs New-SPWebApplication
Extendvsinwebfarm New-SPWebApplicationExtension
Forcedeletelist None
Getadminport Get-SPWebApplication
Use the following syntax:
  • Get-SPWebApplication -IncludeCentralAdministration | ? {$_.IsAdministrationWebApplication -eq $true}
Getproperty Get-SPFarmConfig
Get-SPTimerJob
Disable-SPTimerJob
Enable-SPTimerJob
Set-SPTimerJob
Start-SPTimerJob
Getsitelock Get-SPSiteAdministration
Geturlzone Get-SPAlternateURL
Import Import-SPWeb
Installfeature Install-SPFeature
Listlogginglevels Get-SPLogLevel
Localupgradestatus None
Managepermissionpolicylevel None
Mergecontentdbs Move-SPSite
Migrateuser Move-SPUser
Provisionservice Start-SPServiceInstance
Refreshdms None
Refreshsitedms None
Registerwsswriter None
Removedrservice None
Removesolutiondeploymentlock None
Renameserver Rename-SPServer
Renamesite Set-SPSite
Use the Url parameter.
Renameweb Set-SPWeb
Use the RelativeUrl parameter.
Restore Restore-SPFarm
Restore-SPSite
Retractsolution Uninstall-SPSolution
Retractwppack None
Scanforfeatures Install-SPFeature
Use the Scanforfeatures parameter.
Setadminport Set-SPCentralAdministration
Setapppassword None
Setconfigdb Connect-SPConfigurationDatabase
Setlogginglevel Set-SPLogLevel
Setproperty Set-SPFarmConfig
Get-SPTimerJob
Disable-SPTimerJob
Enable-SPTimerJob
Set-SPTimerJob
Start-SPTimerJob
Setsitelock Set-SPSiteAdministration
Use the LockState parameter.
Setworkflowconfig Set-SPWorkflowConfig
Siteowner Set-SPSiteAdministration
Spsearch Get-SPSearchService
Set-SPSearchService
Get-SPSearchServiceInstance
Set-SPSearchServiceInstance
Spsearchdiacriticsensitive None
Syncsolution Install-SPSolution
Use the Synchronize parameter.
Unextendvs Remove-SPWebApplication
Uninstallfeature Uninstall-SPFeature
Unregisterwsswriter None
Updateaccountpassword Set-SPManagedAccount
Updatealerttemplates None
Updatefarmcredentials None
Upgrade None
Upgradesolution Update-SPSolution
Upgradetargetwebapplication None
Userrole Get-SPUser
Move-SPUser
New-SPUser
Remove-SPUser
Set-SPUser


TECHNET - stsadm to Windows PowerShell mapping (SharePoint Foundation 2010)
http://technet.microsoft.com/en-us/library/ff621081.aspx


Sunday, October 7, 2012

SP2007 timer job stuck


So there I was happily deploying my latest Contoso masterpiece when I realized my solution is deploying forever and ever.

So I check that the admin and timer services are running, but for good measure I restart them.... still nothing.



STSADM -o execadmsvcjobs

happy coding.



Update (2013/02/07):
PowerShell equivalent 'Start-SPAdminJob'
http://technet.microsoft.com/en-us/library/ff607833.aspx