Today I tried to modify Hardware Inventory Schedule client setting and it didn't work. First I thought that I did something wrong or the cmdlet is broken. Here is the cmdlet Verbose output Then I thought that, lets disable the HW client setting and then enable the HW client setting with correct schedule and Bingo it worked correctly. [crayon-5b2f5a88254e4329330731/] If you compare the verbose outputs, then you will see the difference - first time it didn’t query the SMS_SCI_ClientComp WMI instance but second time it did. Now If I try to modify the schedule again I don’t need to [...]
This script allows to export out specific collection UDA Relationships to a CSV file. Here is the script it self. Run it on your Primary Site Server and then open the CSV file with Excel. [crayon-5b2f5a8826e87266519729/]
Last week I saw one blog post how to list specific folder objects and I believe that actually there is much easier way to list the objects in specific folder. First we need to figure out the ContainerNodeID which is the folder unique ID. We have several ways to find out the folder unique ID, for example we can run the ConfigMgr Admin console in developer mode or we can use a WMI tool. There are different WMI tools that you can find from the internet or you can simple use the WBEMTEST tool also which is already built-in in [...]
Starting with Configuration Manager 2012 R2 we have a cmdlet called Move-CMObject. This cmdlet allows to move different objects in Admin Console. We still don't have a cmdlet that allows to create ConfigMgr Admin Console folders but if necessary you can use this code to create folders. Here are 6 different examples How to move objects in ConfigMgr Admin Console [crayon-5b2f5a882881d389475576/] As you see it is really easy to move objects. You can use –InputObject or -ObjectId parameter. Best
Here is a really simple Configuration Manager Client installation PowerShell workflow. This workflow queries all the clients where ClientType property is NULL. You can easily add logging, scheduling etc. [crayon-5b2f5a882982e401775865/] This workflow generates following output.
There are multiple ways how you can add a network printer to a PC and of course you can do that also with Compliance Settings in Configuration Manager. In PowerShell we can use Add-Printer cmdlet and if you don’t have the latest PowerShell version, then you can use Win32_Printer WMI class to add the Printer. If you don’t want to depend on a specific PowerShell version, then maybe the easiest way is to use Win32_Printer WMI Class. Here are the scripts/cmdlets that you can use Discovery Scripts Option 1 Win32_Printer WMI Class query Get-WmiObject -Class Win32_Printer -Filter "Name='\\\\CTTERM\\CTColorPrint01'" | Measure-Object [...]
I just posted on CM12SDK Windows Azure Pack command-lets excel sheet. You can download the excel sheet from here Cheers :)
Let’s assume that you installed some time ago one Windows Server 2012 R2 Server Core and you have installed also latest Windows Updates to that server and this server does not have an internet connection. Here are the updates that are installed In one day you discover that you need to add graphical user interface and you execute the following command [crayon-5b2f5a882a473417525171/] You will see that it reaches to 68% and fails with following error Install-WindowsFeature : The request to add or remove features on the specified server failed. Installation of one or more roles, role services, or features failed. [...]
In my previous post I showed how you can install Active Directory Domain Services on Windows Server Core and in this post I´m going to show how you can add an additional Domain Controller to your environment because best practice recommends that you have at least two of them. To add an additional Domain Controller we need to do following: 1. Rename the server 2. Set the IP and DNS address 3. Join the server to domain 4. Install Active Directory Domain Services Server Role 5. Deploy the Domain Controller Before you continue I recommend to read my first [...]
Installing Active Directory Domain Services on Windows Server Core is really easy. You only need to run 8 commands and your Domain Controller is ready. These steps are: 1. Rename the server 2. Set the IP and DNS address 3. Install Active Directory Domain Services Server Role 4. Promote the server to a Domain Controller Let’s Get Started :) I assume that you already have one Windows Server Core installed. If you log in, then it automatically runs command prompt. To get to PowerShell, then just type PowerShell.exe and you are ready to configure your Domain Controller. I don’t like [...]
If you are trying to add a Configuration Manager Distribution Point remotely you may end up with issue: WARNING: The self-signed certificate could not be created successfully Validation of input parameters failed. Cannot Continue Code example [crayon-5b2f5a882ccc9470235200/] If you take same code and run it locally on your Primary Site Server, then it works correctly but what is the problem then? The problem is that you haven’t enabled CredSSP on your site server and your admin PC. There are so many different posts in internet that explains the second hop scenario and I will not explain it in this but [...]
One of the new features in Configuration Manager 2012 R2 is that you can configure Maintenance Windows only for Software Updates We can configure all these new stuff with ConfigMgr cmdlets also :) [crayon-5b2f5a882dbe6944790762/] Happy Scripting :)
Configuration Manager 2012 R2 PowerShell module contains now New-CMMaintenanceWindow cmdlet :) [crayon-5b2f5a882e347769472772/] Happy scripting :)
Here are the new cmdlets in Configuration Manager 2012 R2. Now we have totally 560 cmdlets [crayon-5b2f5a882ef67975569562/]
I just finished one PowerShell script that queries all the Admin Console XML files and it creates automatically Admin Console Extension. You can use this script to locate correct place for you right-click tool. There are totally 655 Console GUIDs. You can download the script from here
Last week I discovered that you can create a Refresh Schedule with New-CMSchedule cmdlet and then you can easily use that object with Get-WmiObject cmdlet to query and modify for example Device Collection Refresh Schedule. [crayon-5b2f5a882fdbf629310629/] You can create the Device Collection with correct Refresh Schedule but Set-CMDeviceCollection cmdlet does not allow to change the Refresh Schedule. [crayon-5b2f5a882fdce579151498/] Set-CMDeviceCollection cmdlet parameters I tested this on Windows Server 2012 R2 RTM and with System Center Configuration Manager 2012 R2.
Here is one simple PowerShell WPF Treeview example. You can use this example in different PowerShell tools. You can download the code from here
I just published PoshCAT 0.2 version and the changes are as follows: · New Client Actions o Desired Configuration Manager Cycle o Application Machine Policy Cycle o Application Global Evaluation Cycle o Install ConfigMgr Client o Get App-V Client Packages o Get App-V Client Configuration o Get App-V Client Version o Enable App-V Client Package Scripts o Get ConfigMgr Client Available Applications o Get Applied Group Policies o Refresh Group Policies o Get Free Disk Space · Alternate Credentials Support – you can specify only one account · Active Directory Connector · Better error handling · Separate folder for reports [...]
You may want to read these posts before: · How to install PoshCAT · Building PoshCAT Part 1 – Create different Client Actions lists · Building PoshCAT Part 2 – Adding your own custom functions One of the most important thing you need to know before you start using PoshCAT is that it relies on PowerShell remoting. If you don’t configure PowerShell remoting on your computers, then the Client Actions will fail. In this post I will show how you can enable PowerShell remoting through Group Policy but you can also configure it manually. To enable PowerShell remoting manually you [...]
Last week I showed how you can create different Client Actions lists for different support groups in your organization and in this post I will show how you can add/create your own custom functions for PoshCAT So let’s assume that you would like to query applied Computer Group Policy objects. If you want that your custom function returns some kind of information, then it must return PSObject. Here is the function that I use in this example. This function queries only applied/enabled policies [crayon-5b2f5a8830548813254396/] This function creates the following output To add this function to PoshCAT 1. Open WorkerFunctions.ps1 file [...]
Last week I published our new tool PoshCAT and in the upcoming weeks I will cover different things. In this blog post I will show how to create different Client Action lists for different support groups. PoshCAT uses XML based configuration file for different Client Actions that you can execute through UI. One of the main ideas was that the tool should be customizable: · Ability to add and remove commands from UI · Ability to add your own custom actions/functions By default there are over 30 commands that are ready for use. Commands.xml configuration · TASK – Client Action [...]
1. Download and Unzip PoshCAT_v0.2.zip 2. Right-Click Start-PoshCAT.ps1, WorkerFunctions.ps1, SharedFunctions.ps1 and Commands.xml and select properties. 3. Unblock the files if needed and click OK. 4. Right-click Start-PoshCAT.ps1 and choose Run with PowerShell 5. If you don’t have administrative permissions, this message will be shown. Enjoy!
Updated 28.08.2013 Description SCCM Client Actions Tool PowerShell Edition aka PoshCAT is a practical and simple PowerShell application for performing most common day-to-day administrative tasks on System Center 2012 Configuration Manager Clients. The tool allows running actions remotely on one or more computers simultaneously. A list of computers can be provided either from a file (CSV, TXT) or loaded from Configuration Manager Collection importer or through Add Computer prompt. You can find the old version from here SCCMCAT - https://sccmcat.codeplex.com/ by Christjan Schumann. Please read the documentation first and blog posts! Please read this post how to install PoshCAT - [...]
I just posted new content on CM12SDK.net How to modify Configuration Manager Client Cache Size How to Create a Software Update Deployment Template How to Create/Add Alerts for Software Update Deployments How to invoke Client Notification actions Configuration Manager 2012 Developer Excel Sheet – I removed all the old Excel sheets and now I have only one Excel sheet which contains all the necessary things. If you are working with Configuration Manager, then a few weeks ago we released our first version of WMI and PowerShell Explorer and there is one special feature for Configuration Manager administrators which allows you [...]