Removing checkbox from SharePoint view using PowerShell

At times there is a need to remove the selection checkboxes in SharePoint list/library views. The following PowerShell code does that for you $OpenWeb = Get-SPWeb
$OpenList = $OpenWeb.Lists["My Library"]
$OpenView = $OpenList.Views["All Documents"]
$OpenView.TabularView = $false

Word Automation Service – Missing Images

Word Automation Services (WAS) is a SharePoint Server service application that enables unattended, server-side conversion of documents that are supported by the Microsoft Word client application. This section provides a general overview of Word Automation Services and reviews common business scenarios that the service was designed to support.

Whenever you are using WAS to save documents in various formats like .docx, .docm etc. and if the conversion output has missing images with the following message
The image part with relationship id was not found in the file
This could be because the Word Automation Service (WAS) is running in a sand-boxed mode. Disable the sand-boxed mode and it should resolve the issue
The following power shell script should do the job
$sa = Get-SPServiceApplication | where $_.TypeName.Equals("Word Automation Services")}
$sa.DisableSandbox = $true

Checking if psconfig needs to be run on a SharePoint server

While updating SharePoint 2010 server there is need to run psconfig to update the SharePoint databases. By any chance you defer the update and at a later date you need to know that whether you need to run psconfig on the server. You could do so by running the following PowerShell command.

(get-spserver $env:computername).NeedsUpgrade

It returns a Boolean value True/False. If the result of this command is True, then you need to run psconfig. If the result is False then no further action is needed.

Stsadm to Windows PowerShell mapping

For the ones who are well versed with stsadm and switching to PowerShell, the following table provides a mapping of stsadm commands to their PowerShell counterparts

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

Windows PowerShell Command Builder Silverlight Application

The Windows PowerShell Command Builder for Microsoft SharePoint 2010 Products and Microsoft Office 365 is a Silverlight4 application that is designed to help IT professionals and power users learn how to use Windows PowerShell for administrative tasks. The Windows PowerShell Command Builder enables IT professionals and power users to visually assemble commands related to SharePoint 2010 Products and Office 365 in the browser and take those commands to their respective products. URL: While it is recommend that you run the application online, the Windows PowerShell Command Builder can be optionally used in an offline mode to take advantage of Silverlight 4 Outside the Browser. To use the Windows PowerShell Command Builder in offline mode, right-click anywhere in the application and select Install Windows PowerShell Command Builder.