Posts

Showing posts with the label PowerShell

Developer Dashbord SharePoint PowerShell

Developer Dashbord
$cs = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$dash= $cs.DeveloperDashboardSettings
$dash.DisplayLevel
$dash.DisplayLevel="Off" // Ondemand to activate
$dash.Update()


Out-GridView

hello,

in powershell , the is a good tool to check logs or output from powerShell;

Get-SPFeature -Limit ALL | Out-GridView

SharePoint XSN provisionning with WSP

Image
it's not very simple to package a form xsn in the wsp solution, specialy if you want to do a provisionning.


You probably tried to use something like: 1<elements xmlns="http://schemas.microsoft.com/sharepoint/">
2<module name="DefaultForms" rootwebonly="FALSE" url="Lists/Forms">
3<file path="DefaultForms\TestForm.xsn" type="GhostableInLibrary" url="TestForm.xsn"/>
4</module>
5</elements>
But if you just put the XSN files in a module and deploy it to a Form-library like this, or just upload the xsn file to the library, the Info Path form will not be able to render (error: form is not browser enabled).
What you have to do to fix this is adding some extra properties:  1<elements xmlns="http://schemas.microsoft.com/sharepoint/">
 2<module 
 3name="DefaultFormulieren"
 4       rootwebonly="FALSE"
 5       url="Lists/Forms">

Deploy Info path using PowerShell, SharePoint 2013

Image
INTRODUCTION This post aims to describe how to deploy infopath forms as form templates in a sharepoint site using Powershell.
SCOPE This post will not detail out how to create a custom infopath form. It will assume that there is already an existing Infopath source files that are for deployment. REQUIREMENTS Sharepoint 2010 Microsoft Infopath Designer 2010
IMPLEMENTATION
1.Locate the manifest.xml, right-click and click on Design. The Infopath Designer should load.

2.Whenever modifications have been made to the form, it is a good practice to change the version of the infopath form. This is because when you create a version 1.0 and so on for a form, all of the previous versions will be saved in Sharepoint. To do this, Click on File on the Infopath Form Designer. On the Info Ribbon tab, Click on Advanced Form Options. The Form Option dialog box should appear.

3.Change the version on the Version field. 4.[Not Required] If you would like to create another set of source files for the modified I…

Set custom level permission SharePoint PowerShell

Image
Hello,


Some time we need to apply a script on all the web application, today we can set the permission level for a specific group.

for the base permission you can use:
ViewListItems
AddListItems
EditListItems
DeleteListItems
ApproveItems
OpenItems
ViewVersions
DeleteVersions
CancelCheckout
ManagePersonalViews
ManageLists
ViewFormPages
Open
ViewPages
AddAndCustomizePages
ApplyThemeAndBorder
ApplyStyleSheets
ViewUsageData
ManageSubwebs
CreateGroups
ManagePermissions
BrowseDirectories
BrowseUserInfo
AddDelPrivateWebParts
UpdatePersonalWebParts
ManageWeb
UseClientIntegration
UseRemoteAPIs
ManageAlerts
CreateAlerts
EditMyUserInfo
EnumeratePermissions
CreateSSCSite

below the script :


$sites = get-spsite -Limit ALL –webapplication [webapp url]
ForEach ($spSite in $Sites)       
{        

$spWeb = $spSite.RootWeb

# Enter the Name of the Permission Level to Change
if ($PermissionLevel=$spWeb.RoleDefinitions["custom deinifition"])
{
Write-Host "working with : " $spSite -ForegroundColor Green
$bps = $PermissionLevel.…