SMS 2003 and ConfigMgr 2007, PowerShell, Scripting, Finance, Fitness and Fun

Shaun Cassells at MyITForum.com

Browse by Tags

PowerShell: WMI WQL Queries – made easy for remote WMI especially for SMS 2003 or ConfigMgr 2007

October 01, 2008

Once upon a time to do a WMI query you had to use one of the following: WMIC Cumbersome Must be an administrator WBEMTEST Make the popup windows stop CIM Studio Why doesn’t this save my query? http://www.microsoft.com/downloads/details.aspx?familyid=6430F853-1120-48DB-8CC5-F2ABDC3ED314&displaylang=en Now we have PowerShell. PowerShell allows a lot of formatting, but check out how easy it is to query WMI: Note : Crtl+C breaks a query in PowerShell 1) Create the Query Object $q = New-Object System...  ... Read the full post or  be the first to comment. Filed under: , , , ,

PowerShell: How do I trigger SMS 2003 Inventory Actions?

October 01, 2008

The following is a continuation of: http://myitforum.com/cs2/blogs/scassells/archive/2008/05/20/powershell-sms-2003-configmgr-2007-scripting.aspx COM object for the SMS 2003 control panel API $a = New-Object -comobject cpapplet.cpappletmgr Expose the member variables via Get-Member or GM $a | gm Name MemberType Definition GetClientActions Method IClientActions GetClientActions () GetClientComponents Method IClientComponents GetClientComponents () GetClientProperties Method IClientProperties GetClientProperties...  ... Read the full post or  be the first to comment. Filed under: , , ,

PowerShell: SMS 2003 / ConfigMgr 2007 scripting

May 20, 2008

I decided it was about time I learned more PowerShell and SMS 2003 / SCCM 2007 scripting. I hope you enjoy this series, as I fail, experiment, and learn nuances of the PowerShell language. There seem to be a lot of information about 3 ComObjects for SMS 2003 / SCCM 2007 on the internet. Those are: SMS Client Actions Microsoft.SMS.Client Control Panel Client Actions cpapplet.cpappletmgr Software Distribution UIResource.UIResourceMgr How do I use a COM Object in PowerShell? Create an Object Declare...  ... Read the full post or  be the first to comment. Filed under: , , , , ,

PowerShell: How do I connect to SMS 2003 and perform Client Actions?

May 20, 2008

The Microsoft.SMS.Client COM object exposes several client actions. PS C:\ > $a = New-Object -comObject Microsoft.SMS.Client Now what do I do with the $a variable? Let’s see what members are exposed from the COM. PS C:\> New-Object -comObject Microsoft.SMS.Client | get-member Note: the following results are contained in the SMS 2003 SDK 3.1 AutoDiscoverSite Retrieves the site code of the locally available site based on the client's current roaming situation, without assigning the client...  ... Read the full post or  be the first to comment. Filed under: , ,

PowerShell: Get A Process Owner

May 20, 2008

Today in the MSSMS email list someone asked: “how do I know who owns a process?” They wanted to know if the user account had elevated privileges. Well I can help you find the process owner in one line of code… elevated privileges will require and LDAP query J Pre-Req You will need to know the process name You will need PowerShell installed To return all the processes on a local workstation To return all the processes on a remote workstation Warning : This will usually error out. See PowerShell 2...  ... Read the full post or  be the first to comment. Filed under:

TechNet PowerShell Script Repository has only examples of Get-WMIObject and AD DirectorySearcher

May 12, 2008

I am trying to learn more about scripting of PowerShell. Along my journey of discovery I visited the Microsoft Scripting Guys website . On the front page there is a nice bold link for examples of PowerShell code . Here is what I found: 238 Total PowerShell scripts 132 Get-WMIObject scripts 106 AD Directory Searcher scripts I am very happy the Scripting Guys have examples written. However, the multitude of information could have been contained with write-host demo for get-WMIObject and a demo DirectorySearcher...  ... Read the full post or  the first comment. Filed under:

Zero sized files in the SCCM install ISO from MSDN causes fatal setup error

February 21, 2008

At the bottom of this post is a list of zero sized files on the ISO image of Microsoft System Center Configuration Manager (SCCM) 2007. Note: PowerShell command at bottom to find zero sized files. These files must be obtained in order for setup to succeed. Setup attempts 3 methods. The log file exists on C:\ root (not the drive you installed on) c:\ConfigMgrSetup.log 1) Check media source. This will fail as they are zero sized files a. Here is the log file entries i. Checking media: E:\SCCM 2007...  ... Read the full post or  be the first to comment. Filed under: ,

Make the MMS 2007 DVD playable off a network share

January 03, 2008

The following are the steps needed to modify your Microsoft Managment Summit 2007 DVD playable from a network share. Note : the content of the DVD is protected. As such make sure this content is only available to those approved to view the DVD (translation leave me alone DCMA zealots) The reason for this post, is if you do not make the change in step 6. you will get an error like \\booker\mms-2007\dvd not able to be played. Grab your trust (and now dusty) MMS 2007 DVD Create a network share somewhere...  ... Read the full post or  the first comment. Filed under: , , , , , ,

PowerShell RTM and available

November 14, 2006

http://support.microsoft.com/kb/926139 Download link http://www.microsoft.com/downloads/details.aspx?familyid=6CCB7E0D-8F1D-4B97-A397-47BCC8BA3806&displaylang=en  ... Read the full post or  be the first to comment. Filed under: