Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. ## <redacted boilerplace> ##
  2. # Load the List
  3. $Context.Load($rootWeb)
  4. $Context.Load($List)
  5. $Context.Load($ListItems)
  6. $Context.Load($fields)
  7. $Context.ExecuteQuery()
  8.  
  9. # create a hastable of listdata for casting into JSON
  10. $listArray = New-Object System.Collections.Generic.List[System.Object]
  11. foreach ($item in $ListItems)
  12. {
  13. $listArray.Add([hashtable]@{
  14. Filename = $item["Name"];
  15. DisplayTitle=$item["Title"].ToString();
  16. Settings= $item["Setting"];
  17. Description= $item["File_x0020_Description"];
  18. HealthAreas= $item["Health_x0020_Area"];
  19. ResourceType= $item["Resource_x0020_Type"];
  20. Active= $item["Currently_x0020_active_x003f_"];
  21. ExternalURL= $item["External_x0020_file_x0020_path"];
  22. })
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement