Are you running the latest cmdlet library?

https://www.microsoft.com/en-us/download/details.aspx?id=46681

Daniel Ratliff

From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On 
Behalf Of Mote, Todd
Sent: Monday, April 24, 2017 5:25 PM
To: mssms@lists.myitforum.com
Subject: [mssms] SCCM powershell update?

So for a couple of years now, I've had a script that we've used about 500 times 
that adds device variables to CM devices using New-CMDeviceVariable for use 
during provisioning and deployment.

New-CMDeviceVariable -DeviceName device -IsMask $False -VariableName Var1 
-VariableValue "Value1"

Been working fine, like I said for years.

But now today, I get this when running the above:

New-CMDeviceVariable : ConfigMgr Error Object:
instance of SMS_ExtendedStatus
{
       CauseInfo = "-2016279279";
       Description = "CSspMachineExtProperties: The machine is not an SMS 
client.";
       ErrorCode = 1078462213;
       File = 
"e:\\cm1606_rtm\\sms\\siteserver\\sdk_provider\\smsprov\\sspmachineextprops.cpp";
       Line = 942;
       Operation = "PutInstance";
       ParameterInfo = "";
       ProviderName = "ExtnProv";
       StatusCode = 2147749889;
};
At line:2 char:1
+ New-CMDeviceVariable -DeviceName device -IsMask $False -Variable ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: 
(Microsoft.Confi...VariableCommand:NewDeviceVariableCommand) 
[New-CMDeviceVariable], WqlQueryException
    + FullyQualifiedErrorId : 
UnhandledException,Microsoft.ConfigurationManagement.Cmdlets.Collections.Commands.NewDeviceVariableCommand

I have the SCCM psd1 file load at startup in my profiles and this morning I 
noticed that it spent time contacting a MS download site to update?  I didn't 
think much of it then so I don't have the specific text.  The object doesn't 
actually have a client attached to it yet because I provision the object prior 
to installing the client.  Does New-CMDeviceVariable really care if the object 
is an SMS client now like the error seems to suggest?

Is anything new with the powerhshell cmdlets today?  My site server is still 
1606 at the moment.

Todd


The information transmitted is intended only for the person or entity to which 
it is addressed
and may contain CONFIDENTIAL material.  If you receive this 
material/information in error,
please contact the sender and delete or destroy the material/information.


Reply via email to