This VBS Script will allow you to enter a site server name and site code into input dialog boxes and will write basic site server information to a word document. The script as written will allow you to document your site server information and save the results for your reference.
VBS Script:
strComputer = InputBox ("Enter Site Server Name")
strSiteCode = InputBox ("Enter SMS Site Code")
Const NUMBER_OF_ROWS = 17
Const NUMBER_OF_COLUMNS = 2
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Add()
Set objRange = objDoc.Range()
objDoc.Tables.Add objRange, NUMBER_OF_ROWS, NUMBER_OF_COLUMNS
Set objTable = objDoc.Tables(1)
objTable.Cell(1,1).Range.Text = "System Information For: "
objTable.Cell(2,1).Range.Text = "Manufacturer"
objTable.Cell(3,1).Range.Text = "Model"
objTable.Cell(4,1).Range.Text = "Domain"
objTable.Cell(5,1).Range.Text = "Domain Type"
objTable.Cell(6,1).Range.Text = "Total Physical Memory"
objTable.Cell(7,1).Range.Text = "Processor Manufacturer"
objTable.Cell(8,1).Range.Text = "Processor Name"
objTable.Cell(9,1).Range.Text = "Processor Clock Speed"
objTable.Cell(10,1).Range.Text = "Server Name"
objTable.Cell(11,1).Range.Text = "Site Name"
objTable.Cell(12,1).Range.Text = "Site Code"
objTable.Cell(13,1).Range.Text = "Type"
objTable.Cell(14,1).Range.Text = "Build Number"
objTable.Cell(15,1).Range.Text = "Version"
objTable.Cell(16,1).Range.Text = "Install Directory"
objTable.Cell(17,1).Range.Text = "Parent"
' Machine Information
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")
For Each objItem in colItems
objTable.Rows.Add()
objTable.Cell(1, 2).Range.Text = UCase(strComputer)
objTable.Cell(2, 2).Range.Text = objItem.Manufacturer
objTable.Cell(3, 2).Range.Text = objItem.Model
objTable.Cell(4, 2).Range.Text = objItem.Domain
Select Case objItem.DomainRole
Case 0 strComputerRole = "Standalone Workstation"
Case 1 strComputerRole = "Member Workstation"
Case 2 strComputerRole = "Standalone Server"
Case 3 strComputerRole = "Member Server"
Case 4 strComputerRole = "Backup Domain Controller"
Case 5 strComputerRole = "Primary Domain Controller"
End Select
objTable.Cell(5, 2).Range.Text = strComputerRole
objTable.Cell(6, 2).Range.Text = FormatNumber(objItem.TotalPhysicalMemory/1024/1024,1) & " MB"
Next
' Processor Information
Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor")
objTable.Cell(7, 2).Range.Text = objItem.Manufacturer
objTable.Cell(8, 2).Range.Text = objItem.Name
objTable.Cell(9, 2).Range.Text = Round(objItem.MaxClockSpeed) & " MHz"
' Site Information
Set objWMIService = GetObject("winmgmts://" & strComputer & "\root\sms\site_" & strSiteCode)
Set colItems = objWMIService.ExecQuery("Select * from SMS_Site")
objTable.Cell(10, 2).Range.Text = objItem.ServerName
objTable.Cell(11, 2).Range.Text = objItem.SiteName
objTable.Cell(12, 2).Range.Text = objItem.SiteCode
If objItem.Type = 1 Then
objTable.Cell(13, 2).Range.Text = "Secondary"
Else
objTable.Cell(13, 2).Range.Text = "Primary"
End If
objTable.Cell(14, 2).Range.Text = objItem.BuildNumber
objTable.Cell(15, 2).Range.Text = objItem.Version
objTable.Cell(16, 2).Range.Text = objItem.InstallDir
objTable.Cell(17, 2).Range.Text = objItem.ReportingSiteCode
objTable.AutoFormat(23)
This SQL Query will count the total number of client machine resources by their Network Operating System (NOS) name that are in a specified collection.
Note: If you would rather not type in the SMS consoles collection name you can change the line that reads: Where Col.Name = 'All Windows NT Systems' to: Where COL.CollectionId = 'SMS000CS'.
SQL Query:
Select
SD.Operating_System_Name_and0 NOS,
Count (SD.Operating_System_Name_and0) 'Total',
COL.CollectionId,
COL.Name
From v_R_System SD
Join v_FullCollectionMembership FCM on SD.ResourceID = FCM.ResourceID
Join v_Collection COL on FCM.CollectionID = COL.CollectionID
Where Col.Name = 'All Windows NT Systems'
Group By SD.Operating_System_Name_and0, COL.CollectionId, COL.Name
Order By SD.Operating_System_Name_and0, COL.CollectionId, COL.Name
Here you will find a list of SMS 2003 Documentation translated into German, Japanese and French.
German
SMS 2003 Scenarios and Procedures: Maintenance, Backup, and Recovery
http://www.microsoft.com/downloads/details.aspx?FamilyID=d2562e2b-640b-4ab7-ab5a-37995acf2458&displaylang=de
SMS 2003 Scenarios and Procedures: Security
http://www.microsoft.com/downloads/details.aspx?familyid=3d81b520-a203-4376-a72d-fd34a6c4a44c&displayLang=de
SMS 2003 Scenarios and Procedures: Planning and Deployment
http://www.microsoft.com/downloads/details.aspx?FamilyId=E0644BB4-2336-4254-8A18-9BC180713F7E&displaylang=de
SMS 2003 Core Documentation
http://www.microsoft.com/downloads/details.aspx?displaylang=de&FamilyID=959f495f-8cca-4c8f-a37a-a461111ecf94
Japanese
http://www.microsoft.com/downloads/details.aspx?FamilyId=E0644BB4-2336-4254-8A18-9BC180713F7E&displaylang=ja
http://www.microsoft.com/downloads/details.aspx?familyid=3d81b520-a203-4376-a72d-fd34a6c4a44c&displayLang=ja
http://www.microsoft.com/downloads/details.aspx?FamilyID=d2562e2b-640b-4ab7-ab5a-37995acf2458&displaylang=ja
Active Directory Schema Modification and Publication
http://www.microsoft.com/downloads/details.aspx?displaylang=ja&FamilyID=d1de764c-8e26-455f-bee5-34fb1ca9f2c4
http://www.microsoft.com/downloads/details.aspx?displaylang=ja&FamilyID=959f495f-8cca-4c8f-a37a-a461111ecf94
French
http://www.microsoft.com/downloads/details.aspx?FamilyID=d2562e2b-640b-4ab7-ab5a-37995acf2458&displaylang=fr
http://www.microsoft.com/downloads/details.aspx?FamilyId=E0644BB4-2336-4254-8A18-9BC180713F7E&displaylang=fr
http://www.microsoft.com/downloads/details.aspx?familyid=3d81b520-a203-4376-a72d-fd34a6c4a44c&displayLang=fr
http://www.microsoft.com/downloads/details.aspx?displaylang=fr&FamilyID=959f495f-8cca-4c8f-a37a-a461111ecf94
Use these pages to compare editions, features, roles and specifications for the upcoming release of Windows Server 2008.
http://www.microsoft.com/windowsserver2008/editions/overview.mspx
OpsMgr 2007 unlike its counterpart SCE 2007 comes with a PowerShell Command Shell console built in by default. However if you have PowerShell for Windows 2003 server installed on your SCE Management Server you can access the PowerShell (.Net) binaries by loading them into your PowerShell profile.
Located in the Program Files\System Center Essentials 2007\SDK Binaries directory are two Dll files that allow you to use PowerShell similar to using the Command Shell in OpsMgr 2007:
Microsoft.EnterpriseManagement.OperationsManager.Common.dll
Microsoft.EnterpriseManagement.OperationsManager.dll
Add the following to your PowerShell profile to create a SCE 2007 PowerShell environment:
Note: If you have not yet created your profile from the PowerShell command window enter the following to create your personal profile: New-Item -Path $Profile -ItemType File –F then set the Execution policy by running the following: Set-ExecutionPolicy RemoteSigned. Finally copy and paste the following to your profile by running the following: Notepad $Profile to add the content below to your Microsoft.PowerShell_profile.Ps1
SCE 2007 PowerShell Profile
# Loads The Assembly File
Write-Host "Loading The Assembly Binaries...Please Wait...." -Fore Cyan
[System.Reflection.Assembly]::LoadFile("C:\Program Files\System Center Essentials 2007\SDK Binaries\Microsoft.EnterpriseManagement.OperationsManager.Common.dll")
$Null
[System.Reflection.Assembly]::LoadFile("C:\Program Files\System Center Essentials 2007\SDK Binaries\Microsoft.EnterpriseManagement.OperationsManager.dll")
# Management Group Connection String
$SCE = [Microsoft.EnterpriseManagement.ManagementGroup]::Connect("LocalHost")
Clear
# Creates The Command Prompt
function Prompt
{Write-Host ("SCE:") $SCE.Name -NoNewLine
return " "}
To test your profile run the following: $SCE
View the Windows PowerShell help (including cmdlet help and the About topics) in a fully-searchable, graphical format (a standard Windows .chm file). Also included in the help file is the VBScript to Windows PowerShell Conversion Guide and a collection of PowerShell Tips of the Week.
PowerShell 1.0 Help File Download:
http://www.microsoft.com/downloads/details.aspx?FamilyId=3B3F7CE4-43EA-4A21-90CC-966A7FC6C6E8&displaylang=en
PowerShell 2.0 CTP Help File Download:
http://www.microsoft.com/downloads/details.aspx?FamilyId=FEFB2572-559A-46FE-978D-5A00490B20FA&displaylang=en
The saying “Above Board” is an old gambling house term that is meant to imply that something was done honestly or in plain sight and not concealed or hidden. The Board in the saying refers to a sideboard table or a gambling table where you are expected to keep your hands above the table or board and therefore have a clean and honest game.
Here you will find information on how to view or enumerate members of a specified OpsMgr 2007 management group.
Follow the steps below:
1. Open the Command Shell and issue a “Dir” command to list all of the available groups:
Dir | FL DisplayName, PathName
2. Next select one such as the “Root Management Server Computers Group”
3. Next change to the group root by issuing the CD command:
Cd Microsoft.SystemCenter.RootManagementServerComputersGroup
4. Then reissue the Dir command to list the resources in the group:
Dir | FL DisplayName, ManagementGroup, HealthState
Note: You can also issue just the Dir command and the following information will be displayed: Id, PathName, DisplayName, ManagementMode, ManagementGroup, HealthState and the OperationalState
I have a friend (Sometimes I use that term lightly in referring to him) that is much taller than me and stands 6’3 in his bare feet. In fact as many of you who have met me know that most people (Other than my wife and mother) are taller than me including my father, brother, son and grandson because I only stand 5’6 or 5’7 in my boots. Anyway one day I ran into my friend at a horse fun show and opened my mouth and as usual I should have chosen my words more wisely. I said “Hey Treetop how’s the weather up there?” to which he replied “It’s raining” as he pretended to spit down on me.
The weather as you know can be unpredictable or fickle and sometimes changes in an instant depending on which part of the North American continent you happen to be standing on. Here on the farm we have a 1 acre “Weather Pond” about 90 meters from the house that we use to get our daily or hourly weather forecast.
When we look out the windows toward the pond if there is snow on it we know it is snowing. If it is rainy we see the drops as they hit the surface. If it is windy we can gauge how strong the wind is blowing by how fast the waves are rolling across the pond and we can also tell what direction the winds are blowing from.
If you do not have a “Weather Pond” like we do you could use a bird feeder or a large rock located near your abode as your personal weather forecaster and call it your ‘Weather Rock” or your “Weather Feeder”. On the other hand (Where you have more fingers) if you need a more accurate or precise weather source just Google it.
To see your current weather and upcoming short range forecast point your browser to Google.Com and enter “Weather Yellowknife Canada” or “Weather 33101” and press enter. Here you can see your current temperature, cloud conditions, wind speed and direction as well as your current humidity percentage. You can also see a graphical representation for the current day and the next 3 days with their projected lows and highs.
Try it and see if you are colder than Yellowknife or warmer than Miami.
By default in SQL 2005 line numbers are not shown in the Query pane. You can however add them if you need them quite easily.
Follow the steps below to toggle the line numbers on or off as needed.
1. Select “Tools” from the menu bar and then select “Options”.
2. Then expand the “Text Editor” option.
3. Next expand the “All Languages” option.
4. Finally select the “General” option and in the lower Display leaf of the screen place a check in the box “Line Numbers”.
Now when you open a “New Query” line numbers will appear. Reverse the steps to remove the line numbers.
This script will allow you to choose a collection name from a drop down menu list and list the collection member names to the active window.
Note: Change the following to reflect your site:
strComputer = "SiteServerName"
strSiteCode = "XXX"
strSqlServer = "SqlDatabaseServer"
strDatabase = "XXX"
HTA Script:
<Html>
<Head>
<Title>HTA Script</Title>
<Style>
Body {Background-Color: CornSilk}
</Style>
<HTA:Application
Caption = Yes
Border = Thick
ShowInTaskBar = No
MaximizeButton = Yes
MinimizeButton = Yes>
<script Language = VBScript>
Sub ListItems(ItemList)
Window.Document.Title = "List Collection Members"
Set colItems = objWMIService.ExecQuery("Select * from SMS_Collection")
Document.Write "<select name=""" & ItemList & """>"
Document.Write "<option value=""" & objItem.Name & """>"
Document.Write objItem.Name
Document.Write "</option>"
Document.Write "</select>"
End Sub
Sub DisplayItems
strHTML = "<table border='1' style='border-collapse: collapse' bordercolor='SaddleBrown' id='Table1' >"
strHTML = strHTML & "<tr>"
strHTML = strHTML & "<br>"
strHTML = strHTML & "<td width='10%' bgcolor = 'SeaShell'><font color = 'Blue'><b>Collection Name</td>"
strHTML = strHTML & "<td width='10%' bgcolor = 'SeaShell'><font color = 'Blue'><b>Member Name</td>"
strHTML = strHTML & "</tr>"
strCollectionName = GetItems.Value
Const adOpenStatic = 3
Const adLockOptimistic = 3
Set objConnection = CreateObject("ADODB.Connection")
Set objRecordSet = CreateObject("ADODB.Recordset")
objConnection.Open "Provider=SQLOLEDB;Data Source =" & strSqlServer & ";" & _
"Trusted_Connection=Yes;Initial Catalog =SMS_" & strDatabase
objRecordSet.Open "Select C.CollectionName, M.Name FROM Collections C " & _
"Join CollectionMembers M ON C.SiteID = M.SiteID " & _
"Where C.CollectionName =" & "'" & strCollectionName & "'", objConnection, adOpenStatic, adLockOptimistic
On Error Resume Next
objRecordSet.MoveFirst
Do Until objRecordset.EOF
Window.Document.Title = UCase(GetItems.Value) & " - Collection Members "
strHTML = strHTML & "<td width='1%'>" & objRecordset.Fields.Item("CollectionName") & "</td>"
strHTML = strHTML & "<td width='1%'>" & objRecordset.Fields.Item("Name") & "</td>"
objRecordset.MoveNext
Loop
objRecordSet.Close
objConnection.Close
strHTML = strHTML & "</table>"
DataArea.InnerHTML = strHTML
</script><Body>
<p><h3 align = center><font color='Orange'>Please Visit myITforum.Com</font></h3><div></div>
<script language="VBScript">ListItems("GetItems")</script>
<input id=DisplayButton class="button" type="button" value="Run Script" name="DisplayItems_button" onClick="DisplayItems">
</body></html>
<Span Id = "DataArea"></Span></Body><Div Align = "Center">
<P><A Href="http://myitforum.com/cs2/blogs/dhite">Created For myITforum By Don Hite</A>
In ConfigMgr 2007 the CcmSetup Manifest file (CcmSetup Xml) is copied to the client’s %WinDir%\System32\CcmSetup directory folder along with the Client.Msi file when the client installation process is initiated by CcmSetup.Exe (Site_Server\SMS_XXX\Client\CcmSetup.exe).
When the installation process has competed successfully the Client.Msi file and the CcmSetup.Xml files are deleted from the %WinDir%\System32\CcmSetup folder.
A manifest file functions much like a text based Ini or Inf file used by standard .Exe executables in that they inform the applications installation process how to behave during the installation process. Microsoft Installer Files (Msi) such as the Client.Msi file use a Manifest file (In Xml format) which are also text based files to direct the Msi in how to behave as well and how to install the application and what options to use such as command line options to suppress a reboot and the like.
Example CcmSetup Xml File:
<?xml version="1.0"?>
<CcmSetup xmlns:ns="http://schemas.microsoft.com/SystemsManagementServer/2005/12/CcmSetup">
<Item FileName="i386/WindowsInstaller-KB893803-v2-x86.exe">
<Applicability Platform="X86" OS="ALL"/>
<Discovery Type="File" Identifier="%windir%\system32\msi.dll">
<Property Name="Version" Operator=">=">3.1.4000.2435</Property>
</Discovery>
<Installation Order="1" InstallationType="EXE" OptionalParams="/quiet /norestart"/>
</Item>
<Item FileName="i386/WindowsUpdateAgent30-x86.exe">
<Discovery Type="File" Identifier="%windir%\system32\wuaueng.dll">
<Property Name="Version" Operator=">=">7.0.6000.374</Property>
<Installation Order="2" InstallationType="EXE" OptionalParams="/quiet /norestart"/>
<Item FileName="ia64/WindowsUpdateAgent30-ia64.exe">
<Applicability Platform="IA64" OS="ALL"/>
<Item FileName="x64/WindowsUpdateAgent30-x64.exe">
<Applicability Platform="X64" OS="ALL"/>
<Item FileName="i386/msxml6.msi">
<Discovery Type="File" Identifier="%windir%\system32\msxml6.dll">
<Property Name="Version" Operator=">=">6.10.1129.0</Property>
<Installation Order="3" InstallationType="MSI" OptionalParams="REBOOT=Suppress"/>
<Item FileName="ia64/msxml6_ia64.msi">
<Installation Order