How To: List Task Sequence Environment Variables and Values

(another encore presentation from my old blog site…)

From the TechNet forums, this is an example for how to display Task Sequence Environment Variables and Values using VBScript:

Set oTSEnv = CreateObject(“Microsoft.SMS.TSEnvironment”)
For Each oVar In oTSEnv.GetVariables
WScript.Echo oVar & “=” & oTSEnv(oVar)
Next

You could save those two lines of code to “ShowTSVars.vbs”, and then when you want, simply run “cscript //nologo ShowTSVars.vbs >vars.txt” to write all variables to vars.txt.

Fix for error in IIS log on MP – (bits_error:,501,0×80070005)

On one of my accounts, we found that hw/sw inventory seems to no longer update.

We found this error in IIS logs on the MP:

(bits_error:,501,0×80070005)

We also noticed that if you go to Server Manager, and open Roles->Web Server (IIS), and select Default Web Site (or the WSUS Administration site), then select BITS Uploads, and then Open Feature, you receive the following message:

“BITS server was unable to read from the IIS Meta-base as it is corrupt. The settings for this virtual Directory have been reset to the BITS defaults. Parameter count mismatch.”

I installed KB2587894, but the error still occurred.

Next, I decided to follow the wisdom of the myITforum and TechNet forums, and reinstall BITS on the server (restart required).  After reinstall, I confirmed that I can open the BITS properties on each web site, and then had to launch mp.msi to get the MP configured properly (the WSUS site seemed to be working OK).  All is well now – inventory is reprorting fine.

Greg

ConfigMgr 2012 SP 1 Announced

Visit Kent’s blog for the highlights.

http://blog.coretech.dk/kea/configmgr-2012-sp1-announced-teched-2012/

Download the .pdfs – Windows PowerShell 3.0 and Server Manager Quick Reference Guides

The title says it all. Download here.

Windows 8 – A simple start screen button

I’ve been spending some time testing Windows 8 and Server 2012 lately, mostly on virtual machines. If you’ve worked with either OS in a VM (or even Remote Desktop), you may have noticed the challenge in hitting the start screen button. . .er orb.   It is very easy on a real monitor, because you simply move the mouse to the bottom-left corner of the screen. But on a VM, you can quickly move from the bottom-left corner of the VM to the applications on ‘the real’ system.  So to make this a little easier for myself, I created a  shortcut to launch the start screen:

Task bar in Windows 8 CP

All that’s required is a simple VBScript using my all-time non-favorite method “Sendkeys.” Here’s the code:

Set WshShell = WScript.CreateObject(“WScript.Shell”)
WshShell.SendKeys “^{ESC}”

That’s it – just pressing [CTRL]+[ESC] will launch the start screen (as well as the start menu on previous versions of windows). So all you need to do is create a shortcut to run that VBScript.

Of course I wanted to automate this a little, so attached is a .zip file that you can deploy in a ConfigMgr/MDT task sequence. Simply run “InstallStart.cmd” and it will configure everything for you.

Download the install source.

As you may  know, these shortcuts are part of the user profile, that’s why we went to the extra trouble to set this shortcut for every profile. There are some handy examples in the code. ConfigureActiveSetup.reg shows you how to launch a command to run one time for each user that logs on (kind-of like a runonce per user) – this will call the PintoTaskBar.vbs to pin the shortcut to the task bar (note, if Windows is configured to a different setting than English, you may need to modify PinToTaskBar to find the equivalent action for your language). ShowStart.vbs executes the SendKeys command.  **After running the script, logoff/on for the icon to appear.

Greg

Here’s information for how to create a ”Shutdown” tile in Metro.

Follow

Get every new post delivered to your Inbox.

Join 1,044 other followers