2

i am using below code the extract all lists and libraries under a site collection . However i need to get the lists and libraries URL too. all other properties return coorect information except URL, its just empty!! Can you please help?

(get-spsite -identity http://uatsp11/sites/harristest).allwebs.lists | select  title, URL ,  LastItemModifiedDate, itemcount | Expo-Csv -Path C:\temp.csv

Regards

3

You could use DefaultViewUrl property.

(get-spsite -identity http://sp13).allwebs.lists | select  title, DefaultViewUrl ,  LastItemModifiedDate, itemcount

Update:

(get-spsite -identity http://sp13).allwebs.lists | select {$_.ParentWeb.Url}, title, DefaultViewUrl ,  LastItemModifiedDate, itemcount
  • @harris - The above should work as it displays the URL of the default view. There is no property called "URL" and hence returning empty. – Arvi Jun 24 at 5:20
  • thanks for your reply, it helped me a lot, is there any way i can add associated site to each list and libraries too? – Harris Jun 24 at 6:04
  • Check whether my update meets your requirement. – Lee_MSFT Jun 24 at 8:01
  • Thanks Lee_MSFT, it solved my problems – Harris Jun 25 at 2:16
  • You could accept it as answer so it may help others. – Lee_MSFT Jun 25 at 2:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.