This VBS script will take a server or machine name form an input box and write the following disk drive information to an excel spreadsheet. System Name, Device ID, Description, File System, Volume Name, Disk Size (GB) and Free Space
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
intRow = 2
objExcel.Cells(1, 1).Value = "SystemName"
objExcel.Cells(1, 2).Value = "DeviceID"
objExcel.Cells(1, 3).Value = "Description"
objExcel.Cells(1, 4).Value = "FileSystem"
objExcel.Cells(1, 5).Value = "VolumeName"
objExcel.Cells(1, 6).Value = "Disk Size (GB)"
objExcel.Cells(1, 7).Value = "FreeSpace"
strComputer = InputBox("Enter Server Name")
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\Cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_LogicalDisk Where DriveType = 3")
For Each objItem in colItems
objExcel.Cells(intRow, 1).Value = objItem.SystemName
objExcel.Cells(intRow, 2).Value = objItem.DeviceID
objExcel.Cells(intRow, 3).Value = objItem.Description
objExcel.Cells(intRow, 4).Value = objItem.FileSystem
objExcel.Cells(intRow, 5).Value = objItem.VolumeName
objExcel.Cells(intRow, 6).Value = Int(objItem.Size / 1048576 / 1024)
intFreeSpace = objItem.FreeSpace
intTotalSpace = objItem.Size
pctFreeSpace = intFreeSpace / intTotalSpace
objExcel.Cells(intRow, 7).Value = FormatPercent(pctFreeSpace)
intRow = intRow + 1
objExcel.Selection.Interior.ColorIndex = 19
objExcel.Selection.Font.ColorIndex = 11
objExcel.Selection.Font.Bold = True
Here you will find a VBS script to create an empty or blank Microsoft Access database based on the name you specify from an input box. You will also find an additional VBS script that will perform the same function as described above but will add sample columns to the access database.
VBS Script To Create An Empty Access database
strFileName = InputBox("Enter Access File Name",, "MyAccessDatabase")
Set objCatalog = CreateObject("ADOX.Catalog")
objCatalog.Create "Provider = Microsoft.Jet.OLEDB.4.0;Data Source =" & strFileName & ".Mdb" & ";"
Set objCatalog = Nothing
Note: You do not need to add the file extension (.Mdb) for the database you want to create as the file extension is automatically added to the filename taken from the input box.
VBS Script To Create An Access Database And Add Table Columns
Set objConnection = CreateObject("ADODB.Connection")
"Provider = Microsoft.Jet.OLEDB.4.0;Data Source =" & strFileName & ".Mdb" & ";"
objConnection.Execute "Create Table MyTable(" & _
"ID Counter," & _
"TextBox Text(50)," & _
"NumberBox Integer," & _
"MemoBox Memo," & _
Set objConnection = Nothing
Note: Change the MyTable name to the name of the table you want to create.
The script above like the first script does not require you to specify the access database file extension. The samples above are designed to provide you with a few of available data types that are more common to access development such as the Counter, Text, Integer, Memo and Date-Time.
Use the SQL script below to find your last database backup time.
Select (SubString(Database_Name,1,32)) 'Database Name',
Backup_Finish_Date 'Last Backup Time Stamp'
This SQL script will return all of the SMS client machine names and their last logged on user name where their primary C: partition has less than 300 MB of remaining free disk space.
SD.Name0 'Machine Name',
SD.User_Name0 'User Name',
LD.FreeSpace0 'Free Space'
From v_R_System SD
Join v_Gs_Logical_Disk LD on SD.ResourceId = LD.ResourceId
Where LD.DeviceId0 = 'C:'
And LD.FreeSpace0 < 300
And SD.Client0 = 1
If you attempt to manually start the SMS_Executive service on an SMS 2003 site server that is not running the following error message may appear:
Error 2186 "Service is not responding to the internal control function"
Note: This error may also appear if you attempt to manually start the Sms_Site_Component_Manager service as well.
Unfortunately A site reset is in order to correct this issue. To correct this issue follow the steps below from the site server locally not from a remote machine or the SMS admin console on your workstation.
Note: Make sure that all remote SMS Admin consoles are not connected to the site server before proceeding.
1. From the Systems Management Server program group select “SMS Setup”
2. Then click “Next” at the Systems Management Server Setup Wizard task. Then select “Next” again to continue.
3. Select “Modify or reset the current installation" and then click “Next”.
4. From here follow the steps provided by the Systems Management Server Setup Wizard to reset your site.
Tip: If you are currently running in Standard security mode you can elect to switch to Advanced security mode however you cannot change your site to Standard form Advanced sectary mode.
If you want to make your Windows 2003 Server desktop icons blend in with the desktop color scheme or wallpapers like Windows XP and Vista workstations do this tip will show you how.
This tip does not require you to download utilities or hack the registry to do so however both are viable options to allow you to have transparent desktop icons. This tip uses the 2003 Server Network Operating System (NOS) to apply transparent desktop icons.
Follow the steps below to set transparent desktop icons:
1. From the Control Panel select open the System icon.
2. Next click the Advanced tab.
3. At the Performance leaf select Settings.
4. At the Performance Options page select “Adjust for best performance”.
5. To save you changes select “OK”.
6. Select “OK” once again to close the System properties and exit the control panel.
Here you will find a listing of the prerequisites that are checked when you attempt to install the SCE 2007 User Interface Management Console on a workstation or another Server.
To install the User Interface which is the Management Console the following prerequisites must be met and are check prior to installing the User Interface:
2048 MB Physical Memory
Windows Server 2003 Service Pack 1 or Windows XP Professional Service Pack 2
.NET Framework v2.0
.NET Framework 3.0 Components
User is an administrator
MSI version - Windows Installer 3.1 or later must be installed.
Windows drive is NTFS
DotNet Framework v2.0
Setup not running under WOW64
Microsoft Windows XP or later must be installed.
WSUS valid date – Checks to ensure you have the Current WSUS version.
This simple PowerShell script will return the local machines Installed memory in Megabytes.
$strComputer = $Host
$RAM = WmiObject Win32_ComputerSystem
$MB = 1048576
"Installed Memory: " + [int]($RAM.TotalPhysicalMemory /$MB) + " MB"
Before the invention of the Gas stove (Patented in 1826 by James Sharp) and later the Electric stove (Patented in 1896 by William Hadaway) wood burning stoves were the only kind available. After James Sharp patented the Gas stove the push was on to try and produce and sell as many as they could however the pricing was so that the common family could not afford the purchase. It was not until the 1950’s that advertising could be forced upon radio listeners and television watchers that the real push was on to sell as many gas stoves as possible.
There were Radio ads and television ads stating that Gas was faster, cleaner and therefore more efficient that wood burning stoves which is true and from these advertisements we get the phrase that they touted: Now you're cooking with gas!.
The Operations Manager inventory utility from Microsoft is a command line utility that also is a graphical user interface or GUI that collects current OpsMgr 2007 inventory information for the Management server it is executed on. It then saves the results into a Cab file name that you specify.
Note: The Cab file can be opened with WinZip or WinRar.
To use the utility after you download it from the directory in which the utility is extracted to run the following from a command prompt:
MomInventory /Silent /CabFile:C:\fileName.Cab
This will begin the GUI interface that creates an EventLog and Profile directory as well as creates an Inventory.Xml file which includes information about your Management server. The Inventory.Xml file include the following information among other items:
Windows Installer Information.
MOM File Information.
MOM Registry Information.
MOM Server Configuration.
Current running process.
The utility then copies the following MOM log files to the Profile directory and then creates a PrereqReport.Xl file:
The following Event logs are also copied to the EventLog directory:
The utility can also be executed by running the fowling VBS Script:
strCabName = InputBox ("Enter File Name")
Set oShell = CreateObject("WScript.Shell")
strCommand = oShell.Run("MomInventory /Silent /CabFile:" & strCabName & ".Cab", 0, True)
Note: You do not have to enter the .Cab file extension however you must enter the File Name as in the example here: C:\MyFile
Operations Manager Inventory Download
Please stop by and visit Gwen Zierdt’s Blog where she will be posting and blogging about System Center products such as Essentials 2007 as well as a host of other topics such as System Center Operations Manager 2007.
About Gwen Zierdt
Gwen is the eldest of four children and was born in the U.S. Army hospital in Waco, TX in March 1962. Educated at Boston University as an archaeologist, Gwen began her career as an import/export trade specialist. She quickly transitioned into the growing software industry in the late 80's.She took a brief break from full-time employment to move to Chicago and earn a Master's in Fine Arts. During that time she worked her first telecommuting stint for a software company in Fremont, CA. After finishing her program, she returned to the Seattle area and resumed her technical career. In the spring of 2007, Gwen began working as a freelance writer.
The Real World Is Messy:
Making Sense with Essentials at myITforum.com
Microsoft has provided the following SqlCmd 2005 Utility Tutorials that will allow you to run ad hock SQL queries against a database from the command line in an interactive mode.
Lesson 1: Starting sqlcmd
Lesson 2: Running Transact-SQL Script Files by Using sqlcmd
The System Center Configuration Manager (CfgMgr) 2007 TechNet web Forums are now avalible.
Configuration Manager – General
General Discussion on Systems Management Server 2003 and System Center Configuration Manager on topic or feature not already covered by one of the other forums.
General Anouncements on Systems Management Server 2003 and System Center Configuration Manager Forums
Discussion on the Administrator Console in Systems Management Server 2003 or System Center Configuration Manager
Discussion on the Asset Intellegence Features in Systems Management Server 2003 or System Center Configuration Manager
Backup and Recovery
Discussions on backing up and restoring System Center Configuration Manager sites
Desired Configuration Management
Discussion on the Desired Configuration Management Features in System Center Configuration Manager
Discussion on the Help and Documentation for Systems Management Server 2003 or System Center Configuration Manager
Internet Clients and Native Mode
Discussion on internet based clients and running sites in native mode, certificate and SSL issues for System Center Configuration Manager
Discussion on the Inventory Features in Systems Management Server 2003 or System Center Configuration Manager
Operating System Deployment
Discussion on the Operating Systems Deployment Features in Systems Management Server 2003 or System Center Configuration Manager
Discussion on the Software Development Kits for Systems Management Server 2003 or System Center Configuration Manager
Discussion on the Setup and Client and Server Deployment of Systems Management Server 2003 or System Center Configuration Manager
Discussion on the Software Distribution Features in Systems Management Server 2003 or System Center Configuration Manager
Software Updates Management
Discussion on the Software Updates Management Features in Systems Management Server 2003 or System Center Configuration Manager
Here you will find information on how to create an SMS Web Report for the Client Health Monitoring Tool database.
Note: This assumes that you have the SMS client health monitoring tool installed in your SMS_XXX database where XXX is your sites three letter site code. If the SMS Client Health Monitoring Tool is installed in another database you must specify the fully qualified naming convention to the database as a linked server.
First you need to create a Cleint Health View and apply the appropriate permissions using the SQL Query below:
Note: You can change the View name as needed by replacing all the instances of v_R_ClientHealth with the view name of your choice in the script below. Also change the Use SMS_XXX to your database name where XXX is your sites three letter site code.
If Exists (Select * From dbo.SysObjects Where ID = Object_ID(N'[v_R_ClientHealth]')
and ObjectProperty(ID, N'IsView') = 1)
Drop View v_R_ClientHealth
Create View v_R_ClientHealth As Select
Name 'Machine Name',
Sitecode 'Site Code',
LastUser 'Last User Name',
Type 'Client Type',
Version 'Client Version',
LastDDR 'Last DDR Recieved',
LastHW 'Last Hardware Scan Date',
LastSW 'Last Software Scan Date',
DDRState 'Last DDR State',
HWState 'Last Hardware State',
SWState 'Last Software State',
TOTState 'Last TOT State',
Active 'Active Client',
Obsolete 'Obsolete Client',
ChangeActive 'Active Status Change',
ChangeObsolete 'Obsolete Status Change',
LastPing 'Last Ping Time Stamp',
LastPolicy 'Last Policy Time Stamp',
WasOnline 'On Line',
LastPingResult 'Last Ping Status',
Classification 'Last Client State'
Grant Select On v_R_ClientHealth To smsschm_users, webreport_approle
Select * From v_R_ClientHealth
To create the Web Report follow the steps below:
Note: To use the SQL script as a web report copy and paste the Name, Category, Description and of course the SQL statement shown below to the appropriate new web report boxes or modify to your liking as needed.
Name: Client Health Results
Category: Client Health Reports
Description: Displays the current Client Health information for the site..