0

I am getting this error while trying to get the list name

Cannot index into a null array.
+       $clientlist = $web.Lists["Shared Documents"];
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray

Thanks.

3
  • 1
    Are you sure $web is properly set? As in what happens if you run $web.Lists or even $web.Title?
    – eirikb
    Commented Feb 27, 2015 at 7:22
  • please paste your code where you are setting $web
    – Anuja
    Commented Feb 27, 2015 at 7:32
  • $webNew=Get-Spweb $web $clientlist = $webNew.Lists["Shared Documents"]
    – Ishani
    Commented Feb 27, 2015 at 7:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.