Tagged: SharePoint Online
- June 22, 2016 at 1:20 am #44265
SharePoint Online– Update a site owner with csv file. The two column headers are simply: url and owner. The url can vary between parent and child and even child of the child (ie google.com ; google.com/sites/page1 ; google.com/after/hero/superman/cape)
Thanks in advance folksJune 24, 2016 at 4:39 pm #44709
So, which are you having a problem with – the command to update a site owner, or reading in and enumerating the contents of a CSV file?June 24, 2016 at 4:52 pm #44717
Hey there Don! I am a bit green to SharePoint powershell. After further digging, I was not looking to change the owner per se. The end result was being able to use my csv file to update the access request email for each site and subsite. This is particularly tricky in SPOnline being that the SPOWeb cmdlet was not included in the management shell. I have since knocked out most of what I needed to do however my spreadsheet is only applied to the target sites if they are in parent child order in the spreadsheet. Meaning, row 1 has to be site.com/sites/Hello while row two must be site.com/site/Hello/Goodbye OR ELSE no dice. Any clue on how I can make this work irregardless of order?June 24, 2016 at 4:59 pm #44724
None whatsoever – I'm not a SharePoint guy at all. You could probably sort the CSV on that field, though, to get them in order.June 24, 2016 at 5:29 pm #44736
Thanks for the suggestion Don. I initially tried '-descending' (no ascending available) but this output a child to parent order which changed the parent sites and pushed the parent email down to the child. I ended up using 'Sort-Object' to get this done.June 24, 2016 at 5:35 pm #44742
Ascending is the default. -Descending flips it.June 24, 2016 at 5:42 pm #44744
True but I am talking about using -descending as such:
Import-Csv file.csv | sort URL -Descending
Import-Csv file.csv | Sort-Object
June 24, 2016 at 5:49 pm #44755
- This reply was modified 3 months, 1 week ago by Macsamust.
You've been a big help Don! Your time and assistance has been greatly appreciated.
You must be logged in to reply to this topic.