I am making the following call
new-object Microsoft.Office.Server.UserProfiles.UserProfileConfigmanager($servercontext)
And get the following error:
New-Object : Exception calling ".ctor" with "1" argument(s): "Object reference not set to an instance of an object."
At C:\Users\Administrator\AppData\Local\Temp\1\6ff1f5cc-8ca6-44b8-a721-41f7c8042848.ps1:24 char:13
+ new-object <<<< Microsoft.Office.Server.UserProfiles.UserProfileConfigmanager($servercontext)
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
Can anyone help please?