Skip to main content

Posts

Showing posts with the label Methods

PowerShell + Azure + Python : Use Project Custom Settings

Background First to set up the background [bit reaching on the Dev side] on the post, quick introduction to what is an Azure Cloud service along with some terms Dev like to throw around: Cloud Service : PaaS offering , running VMs on Microsoft Azure. You have control over these VMs as you can remote into them and customize them to run your apps. A typical cloud service contains: Web Role - Windows Server running IIS on top of it. Worker Role - Windows Server. Now using Visual Studio one can configure the Cloud Service as per ones need (Check Resources at the bottom). There are typically 2 files in your project definition which need tweaking (source : MSDN - link in Resources section) : ServiceDefinition.csdef   :  The service definition file defines the runtime settings for your cloud service including what roles are required, endpoints, and virtual machine size. None of the data stored in this file can be changed when your role is running . ServiceConfigur...

PowerShell + WMI - Static & Instance Methods

One has to get their feet wet with WMI when it comes to managing ConfigMgr with PowerShell. How ConfigMgr uses WMI ?  Not only ConfigMgr but for other products if you leverage WMI with PowerShell then understanding what are Static & Instance methods is important. But there are lot of places where People stumble ( I did too ). Below is a question asked in Hyderabad PowerShell User Group (PSHUG) showing one of the common point of confusion. If you are a ConfigMgr Admin then you already know that in SCCM client we have a lot many Client actions that can be triggered remotely. Below are the available SCCM Client actions (In CM 2012) : Going back to the question, below code will work,which is triggering "Software Inventory" on a remote $machine: 001 002 $Client1   =  $( [WmiClass] "\\$Machine\ROOT\ccm:SMS_Client" ) $Client1 . TriggerSchedule( "{00000000-0000-0000-0000-000000000021}" ) One can get more info o...