Building PoshCAT Part 2 – Adding your own custom functions

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 1 Function Get-ComputerAppliedPolicies 2 { 3 $GPOPolicies = @() 4 $GPOQuery = Get-WmiObject -Namespace "ROOT\RSOP\Computer" -Class RSOP_GPLink [...]

Building PoshCAT Part 1 – Create different Client Actions lists

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 [...]

By |2013-08-13T09:34:57+01:00august 13th, 2013|Configuration Manager (SCCM), Powershell, Scripting & Development|Kommentarer lukket til Building PoshCAT Part 1 – Create different Client Actions lists

How to install PoshCAT

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!

SCCM Client Actions Tool PowerShell Edition aka PoshCAT

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 - [...]

SCO 2012 R2: System Management Automation Part 2 – The PowerShell Module

  The new preview of System Center Orchestrator 2012 R2, comes with a new part called "System Management Automation" Not much info has been released about what it is, or what it can be used for. update: more information have been released by microsoft. Start here It seems to me to be a new runbook engine, with a completely new type of runbooks. I can't wait to get more info about what it is , and what it is for. It has 3 parts which is installed seperately: Web Service Runbook Worker PowerShell Module I will try to post some [...]

By |2013-07-26T09:00:08+01:00juli 26th, 2013|Automation|Kommentarer lukket til SCO 2012 R2: System Management Automation Part 2 – The PowerShell Module

SCO 2012 R2: System Management Automation Part 1 – Overview and Setup

  The new preview of System Center Orchestrator 2012 R2, comes with a new part called "System Management Automation" Not much info has been released about what it is, or what it can be used for. update: more information have been released by microsoft. Start here It seems to me to be a new runbook engine, with a completely new type of runbooks. I can't wait to get more info about what it is , and what it is for. It has 3 parts which is installed seperately: Web Service Runbook Worker PowerShell Module I will try to post some [...]

By |2013-07-19T15:11:54+01:00juli 19th, 2013|Automation|1 Kommentar

SCO 2012 R2: System Management Automation – Using the Web Service in Visual Studio 2012

  update: more information have been released by microsoft. Start here The new preview of System Center Orchestrator 2012 R2, comes with a new part called "System Management Automation" In this article series i can been focusing on the 3 parts: Web Service Runbook Worker PowerShell Module In this article i'll show how to use the web service in Visual studio. An earlier post described more about the web service Install Browse using Internet Browser   The idea is to give you a chance to play around with it, and any kind of comments/feedback is very welcomed! Lets go!   [...]

By |2013-07-19T14:29:24+01:00juli 19th, 2013|Automation|Kommentarer lukket til SCO 2012 R2: System Management Automation – Using the Web Service in Visual Studio 2012

New Content on CM12SDK.Net

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 [...]

By |2013-07-12T14:07:30+01:00juli 12th, 2013|Configuration Manager (SCCM)|2 Comments

Coretech WMI & PowerShell Explorer Part II

As mentioned in my previous post (using the WMI feature of the tool) we have recently released a new tool – the Coretech WMI and PowerShell Explorer. For information about downloading and installing the tool checkout this blog post from Kaido Järvemets.  The second main feature of the Coretech WMI and PowerShell Explorer is the PowerShell module. The intention with this module is to help you get started with Microsoft PowerShell and especially System Center 2012 Configuration Manager SP1 and PowerShell. The feature can be used to import custom PowerShell modules as well as built-in PowerShell modules. Once imported you [...]

Coretech WMI & PowerShell Explorer–Using the WMI feature

Earlier today Coretech released a brand new tool that we call Coretech WMI and PowerShell Explorer. For information about downloading and installing the tool checkout this blog post from Kaido Järvemets.  The tool has two main features, a WMI and a PowerShell explorer. This blog post will explain how you can use the WMI feature. Working with Coretech WMI and PowerShell Explorer Connect to the local computer Root\Cimv2 Namespace Launch the Coretech WMI and PowerShell Explorer as Administrator. From the upper left corner, expand the Menu and click Connect. In the Connect dialog box, type the Namespace or use the [...]

Coretech WMI and PowerShell Browser

I´m happy to announce our first version of WMI and PowerShell Explorer tool. The main reason why I did this tool is to simplify my own work and hopefully, it will help others also who are working with Configuration Manager. Description · Coretech WMI and PowerShell Explorer is a freeware tool with two main feature sets. · A powerful WMI tool that allows you to connect to and work with WMI locally and remotely. With the tool you can browse WMI namespaces, classes, methods, properties and class instances. Besides being a WMI browser the Coretech WMI and PowerShell Explorer allows [...]

REPORT: List different Configuration Manager Packages Distribution Point Refresh dates

If you are looking a PowerShell script that can list Distribution Point Refresh Schedule dates for different content types like packages, software updates, images, boot images, driver packages, then stop looking :). I just posted a new PowerShell script on CM12SDK.net that can create these reports for you. This script can create CSV and HTML reports. You can download the script from here

By |2013-06-13T13:30:50+01:00juni 13th, 2013|Powershell, Scripting & Development|Kommentarer lukket til REPORT: List different Configuration Manager Packages Distribution Point Refresh dates

Take control of your ConfigMgr Collections part 1

If you are managing a large ConfigMgr environment, then it is important to know when your collections updating their memberships and if your collections are updating exactly the same time, then it may hit your SQL very badly. This script reads all the collections and you can specify which output you want – CSV or HTML. You can download the script from here

Slide deck from Birds of a Feather “BOF08 PowerShell – Examples from the Real Word”

First, a huge thank to all of you who decided to spend a Wednessday evening in Las Vegas with Kaido and I – we hoped for 20 and 4 times that number showed up. The slide deck from BOF sessions are not available on http://www.2013mms.com/ You can download our slide deck from the BOF08 PowerShell – Examples from the Real Word session here

By |2013-04-11T15:14:03+01:00april 11th, 2013|Configuration Manager (SCCM), General info|1 Kommentar

System Center 2012 Configuration Manager SP1 Cumulative Update 1 PowerShell Parameter Sets Excel Sheet

I just updated the SP1 RTM version of Configuration Manager 2012 SP1 RTM PowerShell Parameter Sets Excel sheet and with SP1 CU1 we have 511 CMDLETS and 1675 parametersets :)   You can download the Excel Sheet from here Happy Scripting Kaido    

By |2013-03-25T14:24:38+01:00marts 25th, 2013|Configuration Manager (SCCM), Powershell, Scripting & Development|Kommentarer lukket til System Center 2012 Configuration Manager SP1 Cumulative Update 1 PowerShell Parameter Sets Excel Sheet

SCO 2012: PS Function for parsing the result of the “Run Exchange Management Shell Cmdlet” Activity

  If you are using the Exchange Admin Integration Pack. You might have tried to use the run exchange shell cmdlet" activity and disocvered that the result is kind special in formatting.   Your result will look similar to this: [PSComputerName: ex2010.cloud.local] [RunspaceId: f30b4063-2b50-4609-9f84-91a480ac4bea] [Database: Mailbox Database 1872261918] [UseDatabaseRetentionDefaults: True] [RetainDeletedItemsUntilBackup: False] to help you , i have created a function for powershell that does it job: function ConvertTo-ExchangeOutputCollection ([String] $inputText = @(throw "Error No Input Text supplied")) { $returnCollection = @{} $keypairCollection = $inputText.Split("`n") foreach ($keypair in $keypairCollection) { $trimmedKeyPair = $keypair.Trim().TrimStart("[").TrimEnd("]") $splitPosition = $trimmedKeyPair.IndexOf(":") $propertyName = $trimmedKeyPair.Substring(0,$splitPosition).Trim() $propteryValue [...]

By |2013-03-21T15:57:19+01:00marts 21st, 2013|Automation|5 Comments

PowerShell – How to do WMIClass CreateInstance but WITH credentials

Today I was building a script to create system resources in SCCM 2012 and part of the task was to add these resources to a set of collections. The script will use from the SCCM server when finally implemented but for now I was using my laptop for editing and debugging. When I came to the point where I had to create the actual membership rules for the collections I ran into a hurdle that puzzled me. The WMI object I had to create was the SMS_CollectionRuleDirect, which often is done using this simple PowerShell snippet: $ruleClass = [WMICLASS]"\\$($server)\root\sms\site_$($sitecode):SMS_CollectionRuleDirect".CreateInstance() And [...]

PowerShell to the rescue – Clean up direct collection memberships

We where talking to a customer about how to avoid waiting for Active Directory group synchronization to occur and place a device in the correct collections faster than “until the next synchronization”. The main problem with this setup was caused by the fact that they used a group-in-group membership to identify collection memberships and apparently SCCM 2012 don’t include indirect changes to group membership as delta changes (I have not tested this in details yet). So we came up with the idea to just create a direct membership to place the device in the collections instantly to make sure that [...]

By |2013-03-12T12:31:15+01:00marts 12th, 2013|Configuration Manager (SCCM), Powershell|3 Comments

Operations Manager 2012 Maintenance Mode

  ”How can I schedule maintenance mode in SCOM 2012?” “How can I put a server in maintenance mode without using the Operations Console?” These are fairly common questions from my costumers. A lot of tools was developed to Operations Manager 2007, but not for 2012, hence this blog. Tool: SCOM Remote Maintenance Mode Scheduler 2.0 by Tim McFadden I can’t take any credit for this one, as it was developed by Tim McFadden, but it is the best (only) scheduler I can find. Furthermore, it has an UI, which makes it far easier to put servers or group in [...]

By |2017-08-22T13:06:40+01:00februar 7th, 2013|Operations Manager (SCOM)|9 Comments

CSV REPORT: Get ConfigMgr Collection Excluded or Included Collection Rules

Currently there should be no builtin report that will show you Excluded or Included collections and because of that I did two simple PowerShell scripts that queries Included or Excluded collections. Both of these scripts creates a CSV file. You can run this script on your Primary, CAS or Central site like this: Get-CMCollectionExcludedCollectionRules.ps1 -SiteCode PS1 -SiteServer Localhost -OutPut c:\Temp\ExcludedCollectionReports.csv Get-CMCollectionIncludedCollectionRules -SiteCode PS1 -SiteServer Localhost -OutPut c:\Temp\IncludedCollectionReports.csv Get-CMCollectionIncludedCollectionRules.ps1 Get-CMCollectionExcludedCollectionRules.ps1 Example Output  

By |2013-01-31T14:47:18+01:00januar 31st, 2013|Configuration Manager (SCCM), Powershell|1 Kommentar