Posts mit dem Label Powershell werden angezeigt. Alle Posts anzeigen
Posts mit dem Label Powershell werden angezeigt. Alle Posts anzeigen

Dienstag, 7. August 2012

Delete Column from a SharePoint List



If you want to delete a column from a SharePoint List. Following steps on powershel can help you well.

PS> $web = Get-SPWeb -identity http://your/site/name
PS> $list = $web.Lists["Your List Name"]
PS> $column = $list.Fields["Your Column Name"]
PS> $column.Hidden = $false
PS> $column.ReadOnlyField = $false
PS > $column.Update()
PS > $list.Fields.Delete($column)

Donnerstag, 2. August 2012

Install-SPSolution Error

Install-SPSolution: Admin SVC must be running in order to create deployment timer job


When I was trying to deploy the SharePoint 2010 WSP on another server using PowerShell, I got this error when I tried to run the Install -SPSolution command saying that:
Install-SPSolution: Admin SVC must be running in order to create deployment timer job


So all you need to do is to go to the Services section in Administrative Tools and look for the service called SharePoint 2010 Administration, it was on manual start up, changed it to automatic and started it and gotten rid of this error.

Donnerstag, 29. März 2012

Changing Setting for New-Icon in SharePoint 2010


The amount of time the “New” icon is shown in SharePoint 2010 can be changed at the Web Application level using PowerShell.
Below are examples to get or change settings for the icon:

Get  the current Duration of  New-Icon

$webApp = Get-SPWebApplication "http://webAppURL/"
$webApp.DaysToShowNewIndicator

Change the duration of Displaying New-Icon

# Set to 1 Day
$webApp = Get-SPWebApplication "http://webAppURL/"
$webApp.DaysToShowNewIndicator = 1
$webApp.Update()



Prevent the New-Icon from Display

# Essentially, just set the display duration to 0 days.
$webApp = Get-SPWebApplication "http://webAppURL/"
$webApp.DaysToShowNewIndicator = 0
$webApp.Update()

Sonntag, 29. Januar 2012

Löschen einer Liste mit Powershell


Beim Etwickeln am Sharepoint brauche ich offter die Sharepointsinhalte schnell zu entfernen. Hier ist die Zwei Zeilen, wie man eine Liste aus der Sharepoint über Powershell entfernen kann:


$w = Get-SPWeb "http://sps2010"
$w.Lists.Delete([System.Guid]$w.Lists["My Custom List"].ID)

The content type is part of an application feature

Recently I had the problem in a production environment that after the deactivation of a feature I was not able to delete the content ty...