Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## <redacted boilerplace> ##
- # Load the List
- $Context.Load($rootWeb)
- $Context.Load($List)
- $Context.Load($ListItems)
- $Context.Load($fields)
- $Context.ExecuteQuery()
- # create a hastable of listdata for casting into JSON
- $listArray = New-Object System.Collections.Generic.List[System.Object]
- foreach ($item in $ListItems)
- {
- $listArray.Add([hashtable]@{
- Filename = $item["Name"];
- DisplayTitle=$item["Title"].ToString();
- Settings= $item["Setting"];
- Description= $item["File_x0020_Description"];
- HealthAreas= $item["Health_x0020_Area"];
- ResourceType= $item["Resource_x0020_Type"];
- Active= $item["Currently_x0020_active_x003f_"];
- ExternalURL= $item["External_x0020_file_x0020_path"];
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement