Article archive

Run PS script with parameter from batch file

11/01/2012 19:55
**************** file hop.bat ***************   @echo off set curdir=%cd% set name="Lukino" echo "Pustam sa....z windows command liny" cd\ rem path to PS script cd C:\GBP.Install  powershell .\pozdrav.ps1 %name% cd\ cd...

Run powershell script from batch file

11/01/2012 19:46
@echo off set curdir=%cd% echo "Pustam sa....z windows command liny" cd\ rem path to PS script cd C:\GBP.Install  rem path to PS script powershell .\pozdrav.ps1 cd\ rem setting path to original path cd %curdir%

Remove, Add and Deploy solution

11/01/2012 14:15
Basic task against solution   List of solutions get-spsolution   If is deployed, uninstall it Uninstall-spsolution solutiionName.wsp -webapplication https://tdspui Remove-spsolution solutionName.wsp   Add new solution Add-SPSolution...

Create Managed Metadata Property and Mapping

10/01/2012 20:58
$searchAppName="Enterprise Search Service Application" $searchapp = Get-SPEnterpriseSearchServiceApplication $searchAppName $category = Get-SPEnterpriseSearchMetadataCategory –Identity SharePoint -SearchApplication $searchapp    #Creating Metadata...

Create and Remove Search Scope function

10/01/2012 20:41
#input parameters $siteUrl="https://td_sp_ui/SITES/TEST5" $searchAppName="Enterprise Search Service Application" #calling function CCSearchScope -siteUrl $siteUrl -searchAppName $searchAppName function CCSearchScope {     param(        ...

Add or remove tab from Global Navigation

10/01/2012 19:27
 #input parameters #in case of issues with displaying welcome page tab, we have to create link as external (set IsExternal property to true in constructor) # New-Object Microsoft.SharePoint.Navigation.SPNavigationNode($nodeName, $nodeUrl, $true)       ...

An error occurred during the compilation of the requested file, or one of its dependencies. The type 'Microsoft.SharePoint.Portal.WebControls.WebPartLoc' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Sha

10/01/2012 11:49
An error occurred during the compilation of the requested file, or one of its dependencies. The type 'Microsoft.SharePoint.Portal.WebControls.WebPartLoc' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.SharePoint.Portal, Version=14.0.0.0,...

Get server and site name from url

09/01/2012 21:53
function GetServerNameFromUrl(     [string]$url ) { $server=$url.split("/") return $server[2] } function GetServerFromUrl(     [string]$url ) { $first=$url.IndexOf('/') $short=$url.substring($first+2,$url.length-$first-2) $server=$url.substring(0,...

Create and Remove Search Scope of Web Address Type

09/01/2012 13:01
#input parameters $server="https://portalint.dcs.avd.com" $site="/test" $scopeUrl= $server + "/sites" + $site+"/CategoryCards/Pages" #write-host $scopeUrl $scopeName="category cards" $scopeDescription="Category Card library" $searchAppName="Enterprise Search Service...

Verify Term store access

08/01/2012 19:32
#Verify access to termstore by follownig steps #SecurityTokenApplication Pool is running #Managed Metadata Service is running #Termstore is set as default #verify if user running script is     #Farm Administrator in CA     #Local...
Items: 361 - 370 of 384
<< 35 | 36 | 37 | 38 | 39 >>