1. List all the lists Titles
(Get-SPWeb -identity "http://intranet.contoso.com/sites/contoso").Lists | select title,basetemplate |out-gridview
2. Display the CAML query or the XML field information of a List
(Get-SPWeb -identity "http://intranet.contoso.com/sites/contoso").Lists["Announcements"].Items.Xml
3. Display the 3rd listitem's Title
(Get-SPWeb -identity "http://intranet.contoso.com/sites/contoso").Lists["Sample2"].Items[2]["Title"]
4. Display the GUID of a List
((Get-SPWeb -identity "http://intranet.contoso.com/sites/contoso").Lists["Sample2"]).ID
5. Display the number of items in a list
((Get-SPWeb -identity "http://intranet.contoso.com/sites/contoso").Lists["Sample2"]).Itemcount
(Get-SPWeb -identity "http://intranet.contoso.com/sites/contoso").Lists | select title,basetemplate |out-gridview
2. Display the CAML query or the XML field information of a List
(Get-SPWeb -identity "http://intranet.contoso.com/sites/contoso").Lists["Announcements"].Items.Xml
3. Display the 3rd listitem's Title
(Get-SPWeb -identity "http://intranet.contoso.com/sites/contoso").Lists["Sample2"].Items[2]["Title"]
4. Display the GUID of a List
((Get-SPWeb -identity "http://intranet.contoso.com/sites/contoso").Lists["Sample2"]).ID
5. Display the number of items in a list
((Get-SPWeb -identity "http://intranet.contoso.com/sites/contoso").Lists["Sample2"]).Itemcount
No comments:
Post a Comment