.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> PowerShell >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

create a new hold using PowerShell in SharePoint 2010?

Posted By:Sagar Pardeshi       Posted Date: December 31, 2013    Points: 40    Category: PowerShell    URL: http://www.dotnetspark.com  

create a new hold using PowerShell in SharePoint 2010
 



$siteURL="http://server:1012/" 
$site=Get-SPSite $siteURL 
$web=$site.RootWeb 
$list = $web.Lists["Holds"] 
$item=$list.Items.Add() 
$item["Title"]="Dept" 
$item["Description"] = "Finance"; 
$item["Managed By"] = $web.CurrentUser; 
$item.Update(); 
$web.Dispose() 
$site.Dispose()

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend