I'm using PowerShell with CSOM to add an enterprise resource to a project on Project Server 2016 (on premisse).
I found some examples with C# that guide me, but it's doesn't looks like a common thing on internet.
It is so frustrating don't get more clue to the error/problem. Some times I think that is a kind of bug on this library to PowerShell.
Could any one help me?
The message erro:
format-default : The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested. + CategoryInfo : NotSpecified: (:) [format-default], CollectionNotInitializedException + FullyQualifiedErrorId : Microsoft.SharePoint.Client.CollectionNotInitializedException,Microsoft.PowerShell.Commands.FormatDefaultCommand
The code I wrote:
# User do add $To = "ValidUserName"; $AD = "ActiveDirectory";