Article archive

List of Users Permissions

21/01/2012 21:41
[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”) > $null function EnumerateUserRolesPermissions ([string]$webURL){ $site = new-object Microsoft.SharePoint.SPSite($webURL) $web = $site.OpenWeb() $webUsers = $web.Users $groups = $web.sitegroups foreach($webUser in...

The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered

21/01/2012 21:22
1. Check execution policy to be not restrictedSet-Executionpolicy RemoteSigned2. Check admin rightsGet-SPShellAdminAdd-SPShellAdmin -username "domain\username"3. Run Powershell as administrator4. Check permission in SQL content databaseWe were not able to run powershell scripts from our account....

Deploy menu script

16/01/2012 16:53
$solutionDir="C:\avd.portal.Prototype.TFS_Lukas_Sevcik\dev\src" $webAppUrl="https://td_sp_ui:1111" $port=1111 $siteUrl="https://td_sp_ui:1111/sites/test" $Admin="avd-corp\l.sevcik" write-host "********** Current deployment parameters ************" write-host "" write-host Solution...

Import list / library function

16/01/2012 16:51
#Input PARAMETERS - calling function is on the bottom $RootUrl="https://td_sp_ui/sites/test"     function ImportLibrary {     param(          ...

Apply function against an array

14/01/2012 00:10
function vypisParametrov {     param(         [string]$url,         [string]$nodeUrl,         [string]$nodeName     )     write-host "On...

Get site url from library url

13/01/2012 23:16
Get site url from library url    $libraryUrl="https://td_sp_ui/sites/test/CategoryCards/Pages"     #take site url from library url (one level folder)     $siteUrl=$libraryUrl.substring(0, $libraryUrl.LastIndexOf("/"));    ...

How to force cmd window open

12/01/2012 18:38
set stop= set /p stop=Koniec %=%

Remove, Add and Deploy Single solution

12/01/2012 00:46
#Uninstall and remove one solution, later adds new one $webAppUrl="https://td_sp_ui" $solutionName=read-host "Input solution name to remove (e. g. sitecollection.wsp)" $solution=Get-SPSolution | Where-Object {$_.Name -eq $solutionName} if($solution -eq $null)    ...

Deployment settings script

12/01/2012 00:07
$solutionDir="C:\avd.BuyingPortal.Prototype.TFS_Lukas_Sevcik\dev\src\Scripts" $webAppUrl="https://td_sp_ui" $port=80 $siteUrl="https://td_sp_ui/sites/test" $Admin="avd-corp\l.sevcik" write-host "********** Current deployment parameters ************" write-host "" write-host Solution...

Run powershell script (batch file) from another powershell script

11/01/2012 22:50
I found out, it dependes, if we are running powershell script from powershell ISE or powershell console.   When I need to call prepinac.ps1, or hop.bat from MasterScript.ps1.. for PS console use in MasterScript.ps1, (run as .\MasterScript.ps1 in console) . .\prepinac.ps1 ....
Items: 351 - 360 of 384
<< 34 | 35 | 36 | 37 | 38 >>