This Vbs script which is the equivalent of executing the SQL Script below will return the Group name, AD domain and NT domain name for all SMS discovered Groups to an excel spreadsheet.
SQL Script:
Select
Usergroup_Name0 'Group Name',
Active_Directory_Domain0 'AD Domain',
Windows_NT_Domain0 'NT Domain'
From User_Group_Disc
VBS Script:
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
objExcel.Workbooks.Add
intRow = 2
objExcel.Cells(1, 1).Value = "Group Name"
objExcel.Cells(1, 2).Value = "AD Domain"
objExcel.Cells(1, 3).Value = "NT Domain"
strComputer = InputBox("Enter Site Server Name")
strSiteCode = InputBox("Enter Site Code")
Set objWMIService = GetObject("winmgmts://" & strComputer & "\root\sms\site_" & strSiteCode)
Set colItems = objWMIService.ExecQuery("Select * From SMS_R_UserGroup")
For Each objItem in colItems
objExcel.Cells(intRow, 1).Value = objItem.UsergroupName
objExcel.Cells(intRow, 2).Value = UCase(objItem.ActiveDirectoryDomain)
objExcel.Cells(intRow, 3).Value = UCase(objItem.WindowsNTDomain)
intRow = intRow + 1
Next
objExcel.Range("A1:C1").Select
objExcel.Selection.Interior.ColorIndex = 19
objExcel.Selection.Font.ColorIndex = 11
objExcel.Selection.Font.Bold = True
objExcel.Cells.EntireColumn.AutoFit
MsgBox "Done"
This VBS script will take a file server name from an input box and enumerate the shares on the file server much like the File Server Management console found in the in Windows 2003 server’s Administrative Tools does.
The script will return the Share Name, Folder Path and Description for all shares found on the file server and sort them alphabetically by their share name for your records.
strComputer = InputBox ("Enter File Server Name")
objExcel.Cells(1, 1).Value = "Share Name"
objExcel.Cells(1, 2).Value = "Folder Path"
objExcel.Cells(1, 3).Value = "Description"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Share")
objExcel.Cells(intRow, 1).Value = objItem.Name
objExcel.Cells(intRow, 2).Value = objItem.Path
objExcel.Cells(intRow, 3).Value = objItem.Caption
Set objSheet = objExcel.ActiveWorkbook.Worksheets(1)
Set objRange = objExcel.Range("A2")
objRange.Sort objRange,1,,,,,,1
This query will show you how to find all of the machines in your SMS site that have a 400 MHZ or less processor speed. You can also easily modify the query by changing the < 400 for the 400MHZ to something like is greater (>) than 166 etc.
SQL Query:
Select Distinct
ComputerSystem.Name0 'Machine Name',
ProcessorData.CurrentClockSpeed0 'Processor Speed'
From
Computer_System_DATA ComputerSystem,
Processor_Data ProcessorData
Where
ProcessorData.CurrentClockSpeed0 < 400
This SQL query will provide you with an example that uses a SubSelect method to let you monitor all of the machines that have received a specified advertisement but have not yet stated the installation. The value added by this query is that it is good for advertisement tracking purposes.
To use this query you must Replace xxx With The Advertisement that You Wish To Track From Advertisements > Advertisement ID in the SMS console.
Declare @ProgId NVarChar(128)
Set @ProgId = 'XXX'
MachineName 'Received, Not Started'
From vStatusMessages Astat
Join StatusMessageAttributes att1
on Astat.RecordID = att1.RecordID
Where AttributeValue = @ProgId
And MessageID = 10002 -- Received Status Code
And MessageID <> 10003 -- Failures Status Code
And MessageID <> 10004 -- Failures Status Code
And MessageID <> 10021 -- Failures Status Code
And ModuleName = 'Sms Client'
And MachineName not in
(Select all MachineName
Join StatusMessageAttributes As att1
On Astat.RecordID = att1.RecordID
And MessageID = 10005 -- Started Status Code
And ModuleName = 'SMS Client')
Sometimes you may find that the status messages on your primary site server(s) are showing inconsistent results on down level servers such as your child sites or other site servers in your hierarchy. This is due to the fact that the status message replication is delaying the message replication between the sites. When you have Replicate all SMS Client messages at low priority set you may find that this is the case.
When this status filter rule is set your sites client messages are forced to be replicated at a slower rate than your other SMS data such as your server’s status messages. There is however a workaround to this issue whereby you can notify your SMS site server to send the messages and other SMS data between your sites infrastructure at its normal rate.
The easiest way around this issue is to disable the Replicate all SMS Client messages at low priority status filter rule by following the steps below:
1. Start the Systems Management Server administrator’s console.
2. Select your Site Database (XXX – Site Name).
3. Expand the Site Hierarchy.
4. Expand the Site Name (XXX – Site Name).
5. Expand the Site Settings.
5. Select the Status Filter Rules.
6. Locate the Replicate all SMS Client messages at low priority status filter rule.
7. Right mouse click it and from the context menu select All Tasks and then click Disable.
Note: You can also open the Replicate all SMS Client messages at low priority status filter rule by double clicking on it and from the actions tab change the Replicate to the parent site’s replication propriety from low to Medium or High or even create a new status filter rule for the message replication.
The Disaster Recovery Mode (DSRM) is used to restore Active Directory (AD) by allowing you to start your Domain Controller (DC) without loading the Active Directory Services thereby taking them offline. It is also used in a Windows 2003 server environment when you execute the DCPromo utility.
This password along with the local and domain administrator’s passwords is a very important account and password and should be changed on a regular basis.
To access DSRM when your server starts press the F8 key on your Windows 2003 (Or 2000) server(s) and you will see it listed along with the safe mode options, VGA modes and the last known good commands.
Follow the steps below to reset the DSRM password on the local server:
1. From a command prompt type Ntdsutil and press ‘Enter’.
2. At the Ntdsutil: prompt enter Set DSRM Password and press ‘Enter’.
3. At the Reset DSRM Administrator Password: prompt enter Reset Password On Server Null and press ‘Enter’.
4. From the Please type password for DS Restore Mode Administrator Account: prompt enter your new password and press ‘Enter’.
5. Reenter your password at the Please confirm new password: prompt and press ‘Enter’.
6. After you have received the successful message Password has been set successfully. Type Quit to exit the password utility.
7. Type Quit once again to exit the Ntdsutil utility and finally close your command prompt.
Note: For remote servers at step 3 enter Reset Password On Server Server_Name.
This PowerShell script will prompt you for a remote machine name and return the MAC address and The IP address for the machine
PS1 Script:
Clear
$strComputer = Read-Host "Enter Machine Name"
$colItems = GWMI -cl "Win32_NetworkAdapterConfiguration" -name "root\CimV2" `
-comp $strComputer -filter "IpEnabled = TRUE"
ForEach ($objItem in $colItems)
{Write-Host "Machine Name: " $strComputer
Write-Host "MAC Address: " $objItem.MacAddress
Write-Host "IP Address: " $objItem.IpAddress}
Sirius which is known in astronomy as the “Dog Star” and is the bright star you see in the evening sky in the Canis Major constellation and is why we have the term Dog days of summer when referring to the months of July and August. The Egyptians named the star after their god Osirus who had a head that resembled that of a dog and is now known commonly as the Dog Star. They soon noticed that Sirius was visible in the sky at the same time as the Sun in July which coincided with the annual summer flooding of the Nile and incidentally it was very hot in that region as it is in many others. That is why today we call the hottest months of the summer which are typically July and August the dog days of summer.
WMI (Windows Management Instrumentation) log files are designed to provide you with information about your machines WMI framework. This will provide you with a list of the WMI log files and a brief description of each.
Note: All of the log files are located in the %systemroot%\system32\wbem\logs directory folder.
Setup.log
MOF files compilation log
WinMgmt.log
WinMgmt.exe log
Wbemcore.log
WMI error messages log
FrameWork.log
Trace information and error messages for the provider framework and the Win32 Provider.
PolicyAgentProvider.log
This logs major tasks of the Policy Agent
Wbemess.log
Log entries related to events
Wbemprox.log
Trace information for the WMI proxy server
Mofcomp.log
Compilation details from the MOF compiler
Wmiadap.log
Error messages related to the AutoDiscoveryAutoPurge (ADAP) process
Wmiprov.log
Management data and events from WMI-enabled Windows Driver Model (WDM) drivers
Ntevt.log
Trace messages from the Event Log Provider
Dsprovider.log
Trace information and error messages for the Directory Services Provider
WMIC.LOG
wmic.exe errors log
IT Pro Exams:
Windows SharePoint Services 3.0 ,Configuring (Exam 70-631)
http://www.microsoft.com/learning/exams/70-630.mspx
Office SharePoint Server 2007, Configuring (Exam 70-630)
http://www.microsoft.com/learning/exams/70-631.mspx
Microsoft has provided MOM admins with a utility in the MOM 2005 Resource Kit that will allow a MOM administrator to collect information about a MOM server or agent installation and writes the information to an xml file for you to automatically. This post will provide you with information on how to use the utility.
Gathering MOM inventory information for Microsoft support personnel or to maintain MOM server baseline documentation requires that you gather the following information: Windows Installer log files, MOM Trace Logs, MOM Registry Information, MOM Server Configuration, Current running processes, Event Logs and save them in a specified location for review.
Or you could simply use the MOM Inventory utility (MomInfo.Exe) to accomplish this task for you in a mater of minutes. When executed the utility will capture the following information for you and place it into a compressed Cab file in the location you specify:
Windows Installer Information
MOM File Information
MOM Registry Information
MOM Server Configuration
Collects running process Information
MOM log files
Windows Event log files
Creates the Inventory.Xml file
Running the application is simply a matter of copying the MomInfo.Exe file locally and executing the GUI application. When executed the “MOM Inventory” dialog box will give you the option to “Run Collection” or “Close” the application. To run the utility choose “Run Collection” and when prompted specify a file name for the Cab file and change the location as needed. As the information is collected you will see the status of the utility and when completed you will see the following:
Creating cab file "C:\Directory\Folder\FileName.Cab"...
MakeCAB Report: Sun Apr 08 08:38:21 2007
Total files: 10
Bytes before: 5,509,445
Bytes after: 264,621
After/Before: 4.80% compression
Time: 1.16 seconds (0 hr 0 min 1.16 sec)
Throughput: 4634.21 Kb/second
There are command line options or switches available to the utility as well that allows you more control over the application by running the following from a command prompt: MomInfo /? And will provide you with the text found below:
MOMInfo.exe <Action Flag> [<Location>] [<Options>]
<Action Flag> - flag specifying the action to perform, can be any one of the following:
/rules - dumps the rules as xml (optional)
/responses - dumps the responses as xml (optional)
/varset - dumps the varset as xml (optional)
/clearqueue - clears all MOM queues (optional)
/maintenancemode:<timeout> - sets maintenance mode (optional)
<timeout> is the max amount of time in seconds to remain in maintenance mode, defaults to '-1' (INFINITE), set to 'exit' to exit maintenance mode (optional)
/scriptdebugging:<script> - sets script debugging (optional),<script> is the name of the script to debug defaults to '*', set to 'off' to turn script debugging off (optional)
/errorhandling:<mode> - sets error handling (optional),
<mode> is the either off (default), queue, or auto (optional)
[<Location>] - location to run the action on (optional, defaults to a gent), can be any one of the following:
/momagent - returns info from the agent-side(optional)
/momserver - returns info from the server-side(optional)
[<Options>] - can be any one of the following (optional):
/s - suppresses all prompts (optional)
/out:<file> - file to contain the output of the action (required for rules, responses, and varset actions)
/config:<Config Group> - the config group to run the action against (optional)
/server:<server name> - the server to run the action on (optional)
This HTA script Will take a machine name specified in the input box and write the Win32Reg_AddRemovePrograms information for the machine to the active window.
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 WindowsLoad
strComputer = MachineName.Value
Set colItems = objWMIService.ExecQuery("Select * from Win32Reg_AddRemovePrograms")
Window.Document.Title = "Add And Remove Programs For " & UCase(strComputer)
strHTML = "<table border='1' style='border-collapse: collapse' bordercolor='SaddleBrown' id='Table1' >"
strHTML = strHTML & "<tr>"
strHTML = strHTML & "<td width='10%' bgcolor = 'SeaShell'><font color = 'DarkGreen'><b>Display Name</td>"
strHTML = strHTML & "<td width='10%' bgcolor = 'SeaShell'><font color = 'DarkGreen'><b>Publisher</td>"
strHTML = strHTML & "<td width='10%' bgcolor = 'SeaShell'><font color = 'DarkGreen'><b>Version</td>"
strHTML = strHTML & "</tr>"
strHTML = strHTML & "<td width='10%'>" & objItem.DisplayName & "</td>"
strHTML = strHTML & "<td width='10%'>" & objItem.Publisher & "</td>"
strHTML = strHTML & "<td width='10%'>" & objItem.Version & "</td>"
strHTML = strHTML & "</table>"
DataArea.InnerHTML = strHTML
End Sub
</Script><Body>
Enter Machine Name: <Input Type = "Text" Name = "MachineName">
<Input Type = "Button" Value = "Run Script" Name = "Run_Button" onClick = "WindowsLoad"><P>
<Span Id = "DataArea"></Span></Body><Div Align = "Center">
<P><A Href="http://myitforum.com/cs2/blogs/dhite">Created For myITforum By Don Hite</A>
Microsoft has re-released Service Pack (SP) 2 for Microsoft SQL server 2005 on March fifth because they discovered issues with maintenance plans http://support.microsoft.com/kb/933508 and as a result if you were one of the early adopters like myself you may need to download and install the re-released version.
For detailed information on the issues and how to resolve them see the link below:
http://blogs.msdn.com/psssql/archive/2007/04/06/post-sql-server-2005-service-pack-2-sp2-fixes-explained.aspx
This by request Vbs script will create multiple shares on the server specified. When the shares have been created you need to modify the effective user or group permissions for the newly created shares.
Vbs Script:
strShareName = InputBox ("Enter Share Name To Create")
strShareA = InputBox ("Enter First Directory Name")
strShareB = InputBox ("Enter Next Directory Name")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set strShareName = objFSO.CreateFolder(strShareName)
Set strShare = strShareName.SubFolders.Add(strShareA)
Set strShare = strShareName.SubFolders.Add(strShareB)
Q: Were you present when your picture was taken?
Q: What is your date of birth?
A: July fifteen.
Q: What year?
A: Every year.
Q: How old is your son, the one living with you?
A: Thirty-eight or thirty-five, I can't remember which.
Q: How long has he lived with you?
A: Forty-five years.
Q: Was it you or your younger brother who was killed in the war?
Q: What was the first thing your husband said to you when he woke that morning?
A: He said, "Where am I, Cathy?"
Q: And why did that upset you?
A: My name is Susan.
Q: And where was the location of the accident?
A: Approximately milepost 499.
Q: And where is milepost 499?
A: Probably between milepost 498 and 500.
Q: Sir, what is your IQ?
A: Well, I can see pretty well, I think.
Q: Did you blow your horn or anything?
A: After the accident?
Q: Before the accident.
A: Sure, I played for ten years. I even went to school for it.
Q: Trooper, when you stopped the defendant, were your red and blue lights flashing?
A: Yes.
Q: Did the defendant say anything when she got out of her car?
A: Yes, sir.
Q: What did she say?
A: What disco am I at?
Q: So the date of conception (of the baby) was August 8th?
Q: And what were you doing at that time?
Q: How far apart were the vehicles at the time of the collision?
Q: You were there until the time you left, is that true?
Q: You say the stairs went down to the basement?
Q: And these stairs, did they go up also?
Q: How many times have you committed suicide?
Q: How was your first marriage terminated?
A: By death.
Q: And by whose death was it terminated?
Q: Can you describe the individual?
A: He was about medium height and had a beard.
Q: Was this a male, or a female?
Q: Is your appearance here this morning pursuant to a deposition notice which I sent to your attorney?
A: No, this is how I dress when I go to work.
Q: Doctor, how many autopsies have you performed on dead people?
A: All my autopsies are performed on dead people.
Q: Do you recall the time that you examined the body?
A: The autopsy started around 8:30 p.m.
Q: And Mr. Dennington was dead at the time?
A: No, he was sitting on the table wondering why I was doing an autopsy.
Q: Are you qualified to give a urine sample?
Q: All your responses must be oral, OK? What school did you go to?
A: Oral.
Q: Now doctor, isn't it true that when a person dies in his sleep, he doesn't know about it until the next morning?
Q: The youngest son, the twenty-year old, how old is he?
This HTA script will take a SQL SMS database server name and its corresponding site code and then enumerate the ‘All Systems’ collection (Res_Coll_Sms00001) and return the following information: Machine Name, Site Code, If it is Assigned, If it is a Client and its Client Type
strServer = MachineName.value
strSiteCode = DatabaseName.Value
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=SQLOLEDB;Data Source=" & strServer & ";" & _
"Trusted_Connection=Yes;Initial Catalog=SMS_" & strSiteCode
Window.Document.Title = Ucase(strServer) & "-" & Ucase(strSiteCode) & " All Systems"
strHTML = "<table border='1' style='border-collapse: collapse' bordercolor='SaddleBrown' id='Table' >"
strHTML = strHTML & "<td width='10%' bgcolor = 'SeaShell'><font color = 'DarkGreen'><b>Machine Name</td>"
strHTML = strHTML & "<td width='10%' bgcolor = 'SeaShell'><font color = 'DarkGreen'><b>Site Code</td>"
strHTML = strHTML & "<td width='10%' bgcolor = 'SeaShell'><font color = 'DarkGreen'><b>Assigned</td>"
strHTML = strHTML & "<td width='10%' bgcolor = 'SeaShell'><font color = 'DarkGreen'><b>Client</td>"
strHTML = strHTML & "<td width='10%' bgcolor = 'SeaShell'><