Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
New-SPOTermGroup (v16) broken #120
If you connect to an O365 tenant with an appropriately permissioned account and try to create a new term group ala:
the term group is created, however it looks like there is something wrong with the object returned.
Other term group related commands are also not working, but I'm guessing this is the root cause. It looks to me as if the collection returned is throwing an error.
This is actually expected behaviour and is due to the way CSOM works. The Client Side Object Model that the cmdlets use behind the scenes do not load all properties by default. This is to reduce the payload that goes over the 'wire' and make the server perform faster. PowerShell however wants to resolve all properties when an object is returned and there is where this error message comes from. You can suppress this error message by simply putting the result of the cmdlet in a variable. For instance
$field = Add-SPOTaxonomyField -GroupName "Test01" etc. etc.
The $field variable you can then simply ignore, or use later in retrieving additional property with
Get-SPOProperty -ClientObject $field -Property "ThePropertyToLoad"