powershell - get columns and create column
-
2012年7月27日 9:46
Hi,
1. How can I get all the existing columns of a list?
2. How can I create a new column in the list. The column should be a "Yes/No (check box) and default No and added in the default view, like this:
全部回复
-
2012年7月27日 10:04版主
Hi,
see below article to add checkbox field in list
http://adicodes.com/adding-fields-to-list-with-powershell-in-sharepoint-2010-part2/
To retrieve column name:
$webUrl = Get-SPWeb http://site $listName = $web.Lists["test"] $columnName = $list.Fields
Hope it could help
Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"
- 已编辑 Hemendra AgrawalMicrosoft Community Contributor, Moderator 2012年7月27日 10:35 change link
- 已标记为答案 endeka 2012年7月27日 11:55
-
2012年7月27日 10:16
Hi Hemendra Agrawal,
Tnx for your reply but your link is for adding an item if I'm right, I want to create an extra column...
-
2012年7月27日 10:35版主
Hi,
Yaa sorry..i have change the link. Check it now.
Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"
-
2012年7月27日 11:55
indeed, now I found the solution.
tnx!

