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.

Mittwoch, 1. August 2012

Windows Server 2008 R2 – Event ID 8193

VSS Error in Windows Server 2008 R2 – Event ID 8193



After installing SharePoint 2010 enterprise and  setting the managed account to the specific services i become the following error on role fileservices


————————————————————————————————————————————————————–
Event Type:    Error
Event Source:    VSS
Event Category:    None
Event ID:    8193
Date:        12/5/2009
Time:        2:18:03 PM
User:        N/A
Computer:    ServerName
Description:
Volume Shadow Copy Service error: Unexpected error calling routine RegOpenKeyExW(-2147483646,SYSTEM\CurrentControlSet\Services\VSS\Diag,…).  hr = 0×80070005, Access is denied.
.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 2d 20 43 6f 64 65 3a 20   – Code:
0008: 52 45 47 52 45 47 53 43   REGREGSC
0010: 30 30 30 30 30 31 35 36   00000156
0018: 2d 20 43 61 6c 6c 3a 20   – Call:
0020: 52 45 47 52 45 47 53 43   REGREGSC
0028: 30 30 30 30 30 31 32 39   00000129
0030: 2d 20 50 49 44 3a 20 20   – PID:
0038: 30 30 30 30 36 38 36 30   00006860
0040: 2d 20 54 49 44 3a 20 20   – TID:
0048: 30 30 30 30 39 30 39 36   00009096
0050: 2d 20 43 4d 44 3a 20 20   – CMD:
0058: 22 43 3a 5c 50 72 6f 67   “C:\Prog
0060: 72 61 6d 20 46 69 6c 65   ram File
0068: 73 5c 43 6f 6d 6d 6f 6e   s\Common
0070: 20 46 69 6c 65 73 5c 4d    Files\M
0078: 69 63 72 6f 73 6f 66 74   icrosoft
0080: 20 53 68 61 72 65 64 5c    Shared\
0088: 57 65 62 20 53 65 72 76   Web Serv
0090: 65 72 20 45 78 74 65 6e   er Exten
0098: 73 69 6f 6e 73 5c 31 32   sions\12
00a0: 5c 42 49 4e 5c 6d 73 73   \BIN\mss
00a8: 65 61 72 63 68 2e 65 78   earch.ex
00b0: 65 22 20 20 20 20 20 20   e
00b8: 2d 20 55 73 65 72 3a 20   – User:
00c0: 4e 61 6d 65 3a 20 4e 49   Name: ServiceAccountName
00c8: 48 5c 4e 49 4e 44 53 53
00d0: 50 50 52 57 53 45 41 2c   ,
00d8: 20 53 49 44 3a 53 2d 31    SID:S-1
00e0: 2d 35 2d 32 31 2d 31 32   -5-21-12
00e8: 36 30 34 32 38 36 2d 36   604286-6
00f0: 35 36 36 39 32 37 33 36   56692736
00f8: 2d 31 38 34 38 39 30 33   -1848903
0100: 35 34 34 2d 34 30 36 35   544-4065
0108: 35 31 20 20 20 20 20 20   51
———————————————————————————————————————————-
After searching throw internet i found the reason of error on this blog.The reason was a permission peroblem of my serviceAccount. The account was trying to access the VSS registry key and it was failing due to lack permissions.


So here is the fix, just type in regedit.exe in run and navigate the VSS registry key


HKLM\SYSTEM\CurrentControlSet\Services\VSS\Diag


Right click on Diag, go to permissions and give the service account listed under details tab in the error with full control permissions.
This should fix the error, you can check this by restarting the office search service by using
net stop oSearch
net start oSearch


or


stsadm -o osearch -action stop
stsadm -o osearch -action start




If you still run into the same issue, then try the following:
psconfig -cmd services -install
This will configure SharePoint search again.

Montag, 16. April 2012

Get-SPScripts : PowerShell Scripts for SharePoint: Change the content type set on files in SharePoint...

If you have to make changes to a site content type architecture, the requirement may exist to change a batch of files in a document library from one content type to another. This is usually because you either need to reclassify existing documents to a new content type or move documents to another content type so that unwanted content types can be removed from the list.
Read more in this Blog .

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()

Donnerstag, 8. März 2012

Convert Vhd to Vmdk

You can use WinImage to convert any *.vhd file to * .vmdk

You can downlowd WinImage from here.

After you installed WinImage. Go to following Steps to convert you File to vmdk.

  1. Open winImage and go to Disk:
To conversion VHD to VMDK disk

2. Select the *.vhd file and choose the file that you want to convert.
3. Select the option for Fixed Size or Dynamically Expanding size of your target disk.
4. Choose "*.VMDK" under the file type field. and give the path and name of destination file and click "Save"




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...