Pages

Subscribe:

Friday, March 30, 2012

Developer tools not working in IE8

Check that there is no icon in the task bar for 'Developer Tool'.

There is a known issue that if you minimize or maximize the Devloper Tool window and then close the browser, the next time you start the Developer Tool it will open with the saved Window State (ie. The window won't be visible, but there will be a icon in the task bar).

To fix this right click on the Developer Tool icon in the Tasks bar and select Maximize from the context menu to maximize the Developer Tool window and then resize to your preferences. Close the browser to save the window size preferences of the Developer Tool and browser.

The next time you start IE8 the Developer Tool should open with the saved size and position preferences.

Thursday, March 29, 2012

PowerShell to deploy SharePoint Solutions


Working with Solutions

The following stsadm command could be used to add a SharePoint solution to SharePoint:
stsadm –o addsolution –filename “E:\WSP\CreateProject.wsp
We used the following command to deploy the solution once installed to a specific web application:
stsadm –o deploysolution –name CreateProject.wsp –url http://sp2010 –allowgacdeployment –immediate
If we would upgrade an existing solution, we would use the following:
stsadm –o upgradesolution –name CreateProject.wsp  –filename “E:\WSP\CreateProject.wsp” -immediate
And finally, we used the following commands to retract and delete a specific solution from the web application:
stsadm –o retractsolution –name CreateProject.wsp  –url http://sp2010 –immediate
stsadm –o deletesolution –name 
CreateProject.wsp 
Now, let us see how we could do above operations with PowerShell. For this, we use the following PowerShell commands:
Add-SPSolution E:\WSP\CreateProject.wsp
Install-SPSolution –Identity 
CreateProject.wsp –WebApplication http://sp2010 –GACDeployment
If you would like to add the solution as sandboxed, you would use the Install-SPUserSolution command instead. To upgrade a solution, we specify which solution is to be updated and with which new solution file:
Update-SPSolution –Identity CreateProject.wsp –LiteralPath “E:\WSP\CreateProject.wsp” –GacDeployment
To retract and remove a solution, we use the following commands:
Uninstall-SPSolution –Identity CreateProject.wsp –WebApplication http://sp2010
Remove-SPSolution–Identity
 CreateProject.wsp

Working with features

Similarly, commands exist for working with features. The stsadm equivalents:
stsadm –o activatefeature –name FeatureName –url http://sp2010
stsadm –o deactivatefeature –name 
FeatureName –url http://sp2010
Needless to say, there are easy equivalents in PowerShell:
Enable-SPFeature –Identity FeatureNameOrGuid –url http://sp2010
Disable-SPFeature –Identity 
FeatureNameOrGuid –url http://sp2010

STSADM and PowerShell Cmdlet

stsadm Operation                                 SharePoint 2010 Management Shell Cmdlet

A Operations

Activatefeature                                      Enable-SPFeature
Activateformtemplate                             Enable-SPInfoPathFormTemplate
Addalternatedomain                               New-SPAlternateUrl
Addcontentdb                                        Mount-SPContentDatabase
                                                             New-SPContentDatabase
Adddataconnectionfile                             Install-SPDataConnectionFile
Add-ecsfiletrustedlocation                       New-SPExcelFileLocation
Add-ecssafedataprovider                         New-SPExcelDataProvider
Add-ecstrusteddataconnectionlibrary       New-SPExcelDataConnectionLibrary
Add-ecsuserdefinedfunction                    New-SPExcelUserDefinedFunction
Addexemptuseragent                           Add-SPInfoPathUserAgent
Addpath                                              New-SPManagedPath
Addsolution                                         Add-SPSolution
Addtemplate                                        Install-SPWebTemplate
Adduser                                              New-SPUser
Addwppack                                         Install-SPWebPartPack
Addzoneurl                                          New-SPAlternateUrl
Allowuserformwebserviceproxy              Set-SPInfoPathWebServiceProxy
Allowwebserviceproxy                          Set-SPInfoPathWebServiceProxy
Authentication                                     Set-SPWebApplication

B Operations

Backup                                               Backup-SPConfigurationDatabase
                                                          Backup-SPFarm
                                                          Backup-SPSite
Backuphistory                                     Get-SPBackupHistory

C Operations

Createadminvs                                      New-SPCentralAdministration
Createsite                                             New-SPSite
Createsiteinnewdb                                 New-SPSite
Createweb                                             New-SPWeb

D Operations

Deactivatefeature                                  Disable-SPFeature
Deactivateformtemplate                         Disable-SPInfoPathFormTemplate
Deletealternatedomain                           Remove-SPAlternateUrl
Deleteconfigdb                                     Remove-SPConfigurationDatabase
Deletecontentdb                                    Dismount-SPContentDatabase
Deletepath                                            Remove-SPManagedPath
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
Displaysolution                                                 Get-SPSolution

E Operations
Editcontentdeploymentpath                   Set-SPContentDeploymentPath
Enumalternatedomains                          Get-SPAlternateURL
Enumcontentdbs                                   Get-SPContentDatabase
Enumdataconnectionfiledependants       Get-SPDataConnectionFileDependent
Enumdataconnectionfiles                       Get-SPDataConnectionFile
Enumexemptuseragents                        Get-SPInfoPathUserAgent
Enumformtemplates                              Get-SPInfoPathFormTemplate
Enumservices                                       Get-SPServiceInstance
Enumsites                                             Get-SPSite
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

G Operations
Getadminport                                             Get-SPWebApplication
Getdataconnectionfileproperty                     Get-SPDataConnectionFile
Getformtemplateproperty                             Get-SPInfoPathFormTemplate
Getproperty                                                Get-SPFarmConfig
                                                                 Get-SPTimerJob
                                                                 Disable-SPTimerJob
                                                                 Enable-SPTimerJob
                                                                 Set-SPTimerJob
                                                                 Start-SPTimerJob
Getsitelock                                               Get-SPSiteAdministration
Geturlzone                                                Get-SPAlternateURL

I Operations
Import                                                       Import-SPWeb
Installfeature                                             Install-SPFeature

L Operations
Listlogginglevels                                       Get-SPLogLevel
Listregisteredsecuritytrimmers                Get-SPEnterpriseSearchSecurityTrimmer

M Operations
Mergecontentdbs                                  Move-SPSite
Migrateuser                                           Move-SPUser

O, P, and Q Operations
Osearch                                                SPEnterpriseSearchService
SPEnterpriseSearchServiceInstance
Osearchdiacriticsensitive                       SPEnterpriseSearchServiceApplication
Provisionservice                                    Start-SPServiceInstance
Quiesceformtemplate                            Stop-SPInfoPathFormTemplate

R Operations
Reconvertallformtemplates                             Update-SPInfoPathFormTemplate
Registersecuritytrimmer                                New-SPEnterpriseSearchSecurityTrimmer
Removedataconnectionfile                            Uninstall-SPDataConnectionFile
Remove-ecsfiletrustedlocation                      Remove-SPExcelFileLocation
Remove-ecssafedataprovider                        Remove-SPExcelDataProvider
Remove-ecstrusteddataconnectionlibrary       Remove-SPExcelDataConnectionLibrary
Remove-ecsuserdefinedfunction                    Remove-SPExcelFileLocation
Removeexemptuseragent                            Remove-SPInfoPathUserAgent
Removeformtemplate                                Uninstall-SPInfoPathFormTemplate
Renameserver                                       Rename-SPServer
Renamesite                                           Set-SPSite
Renameweb                                          Set-SPWeb
Restore                                                 Restore-SPFarm
                                                                 Restore-SPSite
Retractsolution                                      Uninstall-SPSolution
Runcontentdeploymentjob                     Start-SPContentDeploymentJob

S Operations
Scanforfeatures                                    Install-SPFeature
Setadminport                                        Set-SPCentralAdministration
Setconfigdb                                          Connect-SPConfigurationDatabase
Setcontentdeploymentjobschedule         Set-SPContentDeploymentJob
Setdataconnectionfileproperty               Set-SPDataConnectionFile
Set-ecsexternaldata                               Set-SPExcelFileLocation
Set-ecsloadbalancing                            Set-SPExcelServiceApplication
Set-ecsmemoryutilization                       Set-SPExcelServiceApplication
Set-ecssecurity                                                 Set-SPExcelServiceApplication
Set-ecssessionmanagement                  Set-SPExcelServiceApplication
Set-ecsworkbookcache                                     Set-SPExcelServiceApplication
Setformtemplateproperty                       Set-SPInfoPathFormTemplate
Setlogginglevel                                                 Set-SPLogLevel
Setproperty                                           SPFarmConfig
                                                                SPTimerJob
Setsitelock                                            Set-SPSiteAdministration
Setsiteuseraccountdirectorypath                        Get-SPSiteSubscription
                                                                 v -SPSiteSubscription
Remove-SPSiteSubscription
Setworkflowconfig                                Set-SPWorkflowConfig
Siteowner                                              Set-SPSiteAdministration
Syncsolution                                         Install-SPSolution

U Operations
Unextendvs                                           Remove-SPWebApplication
Uninstallfeature                                     Uninstall-SPFeature
Unquiesceformtemplate                         Start-SPInfoPathFormTemplate
Unregistersecuritytrimmer                       Remove-SPEnterpriseSearchSecurityTrimmer
Updateaccountpassword                       Set-SPManagedAccount
Upgradeformtemplate                            Install-SPInfoPathFormTemplate
Upgradesolution                                    Update-SPSolution
Uploadformtemplate                              Install-SPInfoPathFormTemplate
                                                                 Userrole SPUser

V Operations
Verifyformtemplate                                Test-SPInfoPathFormTemplate