Cannot index into a null array.


  • i have a powershell script that creates a Site Collection, SharePoint Permission Levels, SharePoint Groups and adds users to group
    sequentially, enables the essential features in the Site Collection, uploads the master page, and the site template 

    when i run the script it creates user groups with the names in a csv file attached and referred to also it gets the user names in each group from the same csv file i already added the users but when i run the script it returns the following error:

    AD User ADMAPAPP\cma.administrator does not exists

    Cannot index into a null array

    At C:\ADSSC\Deployment\Application\CMA_Script.ps1:979 char:35

    + $groupexists = $weburl.SiteGroups[ <<<<  $line.GroupName]

    +CategoryInfo                  :  InvalidOperation:  <CMA_Customer:String> [], RuntimeException

    +FullyQualifiedErrorId : NullArray

    Sunday, November 04, 2012 11:57 AM