I would like to get the assigned site, set it and get it again to make sure it changed. I got this from the web:
$([WmiClass]"\\ny7D20360\ROOT\ccm:SMS_Client").GetAssignedSite()| Select sSiteCode $([WmiClass]"\\ny7D20360\ROOT\ccm:SMS_Client").SetAssignedSite("exe",$null)
errors with get:
Exception calling “GetAssignedSite” : “”
At line:1 char:3
- $([WmiClass]“\ny7D20360\ROOT\ccm:SMS_Client”).GetAssignedSite()| Select sSiteCo …
-
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : WMIMethodException
error with set:
Cannot find an overload for “SetAssignedSite” and the argument count: “2”.
At line:1 char:3
- $([WmiClass]“\ny7D20360\ROOT\ccm:SMS_Client”).SetAssignedSite(“exe”,$null)
-
+ CategoryInfo : NotSpecified: (:) [], MethodException + FullyQualifiedErrorId : MethodCountCouldNotFindBest
Can some please help.