SDK and PowerShell
9 TopicsWMI for MECM Client - View Deployments
I'm running MECM 2309. I see the client installed a tonne of WMI classes. I'd like to be able to see the clients view of the collections it a membe of (perhpas it doesn't have or need this kbnowledge ) and deployments, software thats applicable to it. Reading the schema hereWMI namespaces and classes for reports - Configuration Manager | Microsoft Learnit's not apparent to me where I might find this.660Views0likes4CommentsAdminService add/delete rules in collection
Hi I'm trying to add and delete devices from a collection via AdminService onConfiguration manager 2203 from PowerShell. When I try the below command I receivean error Invoke-RestMethod -Method Post -Uri"https://<ServerName>/AdminService/wmi/SMS_Collection('<CollectionID>')/AdminService.AddMembershipRule" -Credential $Credentials -Body "{'collectionRule':{'RuleName':'<DeviceName>'}}" -ContentType "application/json" Error: Invoke-RestMethod : {"error":{"code":"500","message":"An error with description \"Could not get CCollectionRule* from instance\" occurred when performing MethodExecution operation on WMI class: SMS_Collection."}} At line:1 char:1 Error log AdminService.log Management exception caught: Could not get CCollectionRule* from instance System.Management.ManagementException: Not found at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode) at System.Management.ManagementObject.InvokeMethod(String methodName, ManagementBaseObject inParameters, InvokeMethodOptions options) at Microsoft.ConfigurationManager.AdminService.ManagementObjectAbstraction.InvokeMethod(String methodName, IManagementBaseObject inParams, InvokeMethodOptions invokeOptions, WindowsIdentity windowsIdentity) I get the same error if I try to delete a device from a collection. Anybody able to help ?? Regards Martin1.6KViews0likes1CommentSet-CMMSIDeploymentType
Hi, I'm working on a powershell script to process old applications to a retired state. As part of that, i move the files out of our production area to an "old" area. that works fine, however when I attempt to set the deployment types new content path with a command like the one below, if fails. Why is it talking about a wrong file extension? my command doesn't reference anything regarding files. App deployment type is MSI technology ( as indicated by the name) The installation program is a standard msi install with a log switch. I have copied the cmd line out and added all entries directly rather than via variables and run from an elevated PS ISE while connected to the site and still see the same message. I see nothing of use on the doco page -Set-CMMsiDeploymentType (ConfigurationManager) - Configuration Manager | Microsoft Docs This is the command I'm running. Set-CMMSIDeploymentType –ApplicationName 'ECM Classic ODBC - PROD' –DeploymentTypeName 'ECM Classic ODBC - Prod - Windows Installer (*.msi file)' –ContentLocation '\\corp\cm\LIBRARY\OLD_SupercededSoftware\1_RetiredApplications\2019\ECM\Classic-ODBC\2019.05\PRD\' -Force ********************************************************** returns this error Set-CMMSIDeploymentType : Unexpected file extension specified. Must be one of: .msi At line:1 char:5 + Set-CMMSIDeploymentType –ApplicationName 'ECM Classic ODBC - PROD ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (Microsoft.Confi...mentTypeCommand:SetMsiDeploymentTypeCommand) [Set-CMMsiDeploymentType], InvalidOperationException + FullyQualifiedErrorId : ContentValidationError,Microsoft.ConfigurationManagement.Cmdlets.AppMan.Commands.SetMsiDeploymentTypeCommand Set-CMMSIDeploymentType : Validation of input parameters failed. Cannot continue. At line:1 char:5 + Set-CMMSIDeploymentType –ApplicationName 'ECM Classic ODBC - PROD ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (Microsoft.Confi...mentTypeCommand:SetMsiDeploymentTypeCommand) [Set-CMMsiDeploymentType], InvalidOperationException + FullyQualifiedErrorId : ValidationFailed,Microsoft.ConfigurationManagement.Cmdlets.AppMan.Commands.SetMsiDeploymentTypeCommand3.2KViews0likes8CommentsProblem with CmdLet Import-CMCollection in MECM 2103
Hello, We build our Windows Server environment completely unattended, including our Microsoft Endpoint Configuration Manager (MECM). For Installing and configuring MECM, we use a PowerShell script. Until build 2002 there was no problem. When we use the latest 2103 build, we found out that the PowerShell CmdLet “Import-CMCollection” does not work anymore. We have some custom collections in .mof format we want to import with this PowerShell script, but without any success. Importing those files from the Configuration Manager User Interface, works fine. Is this a problem in the new version of MECM? Thanks in advance, Sven1.1KViews0likes2CommentsWriting API using administration service
Hello! I'm building a PowerShell library to interact with SCCM. I want this library to be as portable as possible, so I don't want to depend on the SCCM cmdlets, because they require to install the full console, and only work in Windows machines. I started using the administration service, because I thought being a REST based service would be the most portable thing possible. However, I have found that it still has many limitations. I have tried to do the following tasks using the Administration service but failed: Create a task sequence deployment, add a direct rule membership to a collection. I'm able to do this using WMI. Is it currently impossible to do these through REST? Does Microsoft plan to implement missing functionality to the admin service?552Views0likes0CommentsHow to deploy application in SCCM 2012?
Hi Folks, I am new to SCCM and want to create (deploy) my first application (exe file) with sccm 2012. I am trying via script installer option and i think i am failing at "Specify the command used to install" where i am writing application name without any switch. I am successful in install sccm client on remote machine. Please guide.1.6KViews0likes2CommentsConfiguration Manager SDK redistributables available on NuGet.org
In addition to the previously publishedClient Messaging SDK package, we are now making the following Configuration Manager SDK libraries available as packages on NuGet.org. Now you can easily consume them in your own projects and be alerted to updates. Read more about it in the Enterprise Mobility + Security blog.1.3KViews0likes0CommentsUpdate for the Configuration Manager Client Messaging SDK
The Configuration Manager team is pleased to announce that an updated version of the Configuration Manager Client Messaging SDK version 5.1710.1059.1000 is now available on NuGet.org. Notable changes in this version: Support for Cryptography Next Generation (CNG) certificates on Configuration Manager 1710 and newer Bug fixes and improvements Read about it in the Enterprise Mobility & Security blog.1.2KViews0likes0Comments