The contents are for reference only and need to be handled with the actual requirements. Run PS1 file in =========sharepoint environment, PS1 content is as follows =======
1set-ExecutionPolicy ByPass2add-PSSnapin Microsoft.SharePoint.PowerShell3 4Add-spsolution-literalpath"C:\Deploy_2013-08-21_v2.2\WSP\Custom_Lib.wsp"5Add-spsolution-literalpath"C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_FilterOfStaffList.wsp"6Add-spsolution-literalpath"C:\Deploy_2013-08-21_v2.2\WSP\Custom_Lookup_ListRelation.wsp"7 8Install-spsolution-identity custom_lib.wsp-webapplication Http://win2012sp2013:1000/9Install-spsolution-identity custom_wp_filterofstafflist.wsp-webapplication Http://win2012sp2013:1000/TenInstall-spsolution-identity custom_lookup_listrelation.wsp-webapplication Http://win2012sp2013:1000/ One A -Update-spsolution-identity Custom_contenttype.wsp-literalpath"C:\Deploy_2013-08-21_v2.2\WSP\Custom_ContentType.wsp"-gacdeployment -Update-spsolution-identity Custom_rb_stafflist.wsp-literalpath"C:\Deploy_2013-08-21_v2.2\WSP\Custom_RB_StaffList.wsp"-gacdeployment theUpdate-spsolution-identity Custom_wp_rbpermissionofstafflist.wsp-literalpath"C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_RBPermissionOfStaffList.wsp"-gacdeployment -Update-spsolution-identity Custom_wp_searchstafflist.wsp-literalpath"C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_SearchStaffList.wsp"-gacdeployment -Update-spsolution-identity Custom_wp_seatingplan.wsp-literalpath"C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_SeatingPlan.wsp"-gacdeployment -Update-spsolution-identity Custom_wp_staffsearch.wsp-literalpath"C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_StaffSearch.wsp"-gacdeployment +Update-spsolution-identity Custom_wp_iconandsloganbanner.wsp-literalpath"C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_IconandSloganbanner.wsp"-gacdeployment -Update-spsolution-identity Custom_wp_newandevent.wsp-literalpath"C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_NewAndEvent.wsp"-gacdeployment +Update-spsolution-identity Custom_wp_documentsharing.wsp-literalpath"C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_DocumentSharing.wsp"-gacdeployment AUpdate-spsolution-identity Custom_wp_trainingcenter.wsp-literalpath"C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_TrainingCenter.wsp"-gacdeployment atUpdate-spsolution-identity Custom_wp_imagebanner.wsp-literalpath"C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_ImageBanner.wsp"-gacdeployment -Update-spsolution-identity Custom_wp_onlinesurvey.wsp-literalpath"C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_OnlineSurvey.wsp"-gacdeployment -Update-spsolution-identity Custom_wp_newsarticles.wsp-literalpath"C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_NewsArticles.wsp"-gacdeployment
Another useful statement:
1 uninstall-spsolution–identity clone_list_scheduler.wsp2 remove-spsolution-identity Clone_list_scheduler.wsp
attaching a DLL to a SharePoint environment by using Windows Powershell ISE 64-bit
1write-Host2Write-host"Loading PowerShell Environment for SharePoint"-Foregroundcolor Green3write-Host4 #Unload & Load the SharePoint PowerShell snapin5 $snapin= Get-pssnapin | Where-object {$_. Name-eq' Microsoft.SharePoint.PowerShell '}6 if($snapin -ne $null){7Write-host"unloading SharePoint PowerShell Snapin ..."-Foregroundcolor Blue8Remove-pssnapin"Microsoft.SharePoint.PowerShell"9Write-host"SharePoint PowerShell Snapin unloaded."-Foregroundcolor GreenTen } One $snapin= Get-pssnapin | Where-object {$_. Name-eq' Microsoft.SharePoint.PowerShell '} A if($snapin -eq $null){ -Write-host"Loading SharePoint PowerShell Snapin ..."-Foregroundcolor Blue -Add-pssnapin"Microsoft.SharePoint.PowerShell" theWrite-host"SharePoint PowerShell Snapin loaded."-Foregroundcolor Green -}
SharePoint PowerShell deployment develops a good webpart to the server