This VBS script will allow you to enter an Active Directory (AD) domain name and will return the following information to an Excel spreadsheet: Login Name, First Name, Last Name, Full Name, Description, Last Login and Password Last Changed information.
VBS Script:
strDomain = InputBox ("Enter Domain Name")
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
objExcel.Workbooks.Add
intRow = 2
objExcel.Cells(1, 1).Value = "Login Name"
objExcel.Cells(1, 2).Value = "First Name"
objExcel.Cells(1, 3).Value = "Last Name"
objExcel.Cells(1, 4).Value = "Full Name"
objExcel.Cells(1, 5).Value = "Description"
objExcel.Cells(1, 6).Value = "Last Login"
objExcel.Cells(1, 7).Value = "Password Last Changed"
On Error Resume Next
Const ADS_SCOPE_SUBTREE = 2
Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
objCommand.CommandText = _
"Select ADsPath From 'LDAP://dc=" & strDomain & ",dc=com'" & _
" Where objectCategory='User' And userPrincipalName = '*'"
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst
Do Until objRecordSet.EOF
strPath = objRecordSet.Fields("ADsPath").Value
Set objUser = GetObject(strPath)
objExcel.Cells(intRow, 1).Value = objUser.sAMAccountName
objExcel.Cells(intRow, 2).Value = objUser.FirstName
objExcel.Cells(intRow, 3).Value = objUser.LastName
objExcel.Cells(intRow, 4).Value = objUser.FullName
objExcel.Cells(intRow, 5).Value = objUser.Description
objExcel.Cells(intRow, 6).Value = objUser.LastLogin
objExcel.Cells(intRow, 7).Value = objUser.PasswordLastChanged
objRecordSet.MoveNext
intRow = intRow + 1
Loop
objExcel.Range("A1:G1").Select
objExcel.Selection.Interior.ColorIndex = 19
objExcel.Selection.Font.ColorIndex = 11
objExcel.Selection.Font.Bold = True
objExcel.Cells.EntireColumn.AutoFit
Set objSheet = objExcel.ActiveWorkbook.Worksheets(1)
Set objRange = objExcel.Range("A2")
objRange.Sort objRange,1,,,,,,1
MsgBox "Done"
Here you will find several VBS scripts that will allow you to change the Text for the My Computer icon on your desktop.
The scripts will allow you to change the text from “My Computer” to the Computer Name, User Name or the Computer Name and User Name. There is also a script that will allow you to hard code the text as well as one that will prompt you for the text to change the caption to via an input dialog box.
Computer Name
Const MY_COMPUTER = &H11&
Set objNetwork = CreateObject("Wscript.Network")
strText = UCase(objNetwork.ComputerName)
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(MY_COMPUTER)
Set objFolderItem = objFolder.Self
objFolderItem.Name = strText
User Name
strText = UCase(objNetwork.UserName)
Computer Name And User Name
strText = UCase(objNetwork.ComputerName) & vbCrLf & UCase(objNetwork.UserName)
Hard Coded Text
strText = "Don Hite"
Prompts For Text
strText = InputBox ("Enter Text For My Computer Icon")
This Vbs script will take an SMS site server name and site code from an input box and then enumerate all of the User queries on that server and read their corresponding WQL Queries. It will then write them to a Microsoft Word document that you can save for future reference.
strComputer = InputBox ("Enter Site Server Name")
strSiteCode = InputBox("Enter Site Code")
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Const wdAlignParagraphCenter = 1
Const wdAlignParagraphLeft = 0
Const wdColorGreen = 32768
Const wdColorBlue = 16711680
Const wdColorBlack = 0
Const wdColorGray = 15132390
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection
objSelection.Font.Bold = True
objSelection.Font.Color = wdColorGreen
objSelection.ParagraphFormat.Alignment = wdAlignParagraphCenter
objSelection.TypeText "SMS WQL User Resource Queries For " & UCase(strComputer)
objSelection.Font.Bold = False
objSelection.TypeParagraph()
objSelection.TypeText "Report Created: " & Date
objSelection.ParagraphFormat.Alignment = wdAlignParagraphLeft
Set objWMIService = GetObject("winmgmts://" & strComputer & "\root\sms\site_" & strSiteCode)
Set colItems = objWMIService.ExecQuery("Select * from SMS_Query Where TargetClassName = 'SMS_R_User'")
For Each objItem in colItems
objSelection.Font.Color = wdColorBlue
objSelection.ParagraphFormat.Shading.BackgroundPatternColor = wdColorGray
objSelection.TypeText objItem.Name
objSelection.Font.Color = wdColorBlack
objSelection.TypeText objItem.Expression
Next
objSelection.TypeText "Created by Don Hite For myITforum.Com"
VBS Script To Export SMS Queries To Microsoft Word
http://myitforum.com/cs2/blogs/dhite/archive/2008/02/24/vbs-script-to-export-sms-queries-to-microsoft-word.aspx
This Vbs script will take an SMS site server name and site code from an input box and then enumerate all of the Unspecified queries on that server and read their corresponding WQL Queries. It will then write them to a Microsoft Word document that you can save for future reference.
objSelection.TypeText "SMS WQL User Group Resource Queries For " & UCase(strComputer)
Set colItems = objWMIService.ExecQuery("Select * from SMS_Query Where TargetClassName = ''")
This SQL query will list all of the machines that have the World Wide Web Publishing Service, the FTP Publishing Service or the Telnet server services installed by their Service name.
SQL Query:
Select
SD.Name0 'Machine Name',
SD.Operating_System_Name_and0 NOS,
SS.Name0 'Service Name',
SS.DisplayName0 'Display Name',
SS.StartMode0 'Start Type',
SS.Started0 Started,
SS.State0 State,
SS.Status0 Status
From System_DISC SD
Join Services_DATA SS
on SS.MachineID = SD.ItemKey
Where SS.Name0 In ('W3SVC', 'MsFtpSvc', 'TlntSvr')
Order By 'Machine Name'
This SQL query was written as a request from a reader wanting to know how to count the number of machines that have McAfee VirusScan Enterprise installed by using the Add And Remove Programs applet.
Count(SD.Name0) Counts,
PF.DisplayName0,
PF.Version0
From v_Add_Remove_Programs PF
Join v_R_System SD on PF.ResourceID = SD.ResourceID
Where PF.DisplayName0 = 'McAfee VirusScan Enterprise'
Group By PF.DisplayName0, PF.Version0
Order By Counts, PF.Version0
To see the machine names rather than the counts use this query:
SD.Name0,
Group By SD.Name0, PF.DisplayName0, PF.Version0
Order By SD.Name0
To be over a barrel means that one is in a helpless circumstance and does not have any control over the situation. Reportedly this expression has its origins in the fact that during the 1800’s when someone was subjected to corporal punishment by flogging they were bent over a barrel and their punishment was delivered. There is also a less credible one that states that drowning victims were rolled over onto a barrel in order to clear water from their lungs.
Here you will find information on how to remove or disable the Windows Vista splash screen.
1. Open MsConfig from the Start Search or from a command prompt (CMD).
2. Select the System Configuration “Boot” tab and place a check in the box for “No GUI Boot”
3. Then reboot your workstation.
Additional Boot Option Information
Minimal
Non Network boot into the Windows user interface in safe mode and runs only critical system services.
Alternate Shell
Non Network boot to a command prompt and runs only critical system services.
Active Directory Repair
Same as the Minimal boot with Active Directory enabled.
Network
Same as the Minimal boot with the network enabled.
No GUI Boot
No Windows splash screen is displayed when booting.
Boot Log
The boot process information is stored and written to file.
Base Video
Boots to Windows user interface in VGA mode.
OS Boot Information
Displays each driver as it is loaded in the boot process.
Microsoft SQL Server 2008 Release Candidate (RC) 0 has been released and is available for download to TechNet Plus and MSDN subscribers.
TechNet Plus
http://technet.microsoft.com/en-us/subscriptions/downloads/details/default.aspx?pm=p:334
MSDN
http://msdn.microsoft.com/en-us/subscriptions/downloads/details/default.aspx?pm=pid:334
Download System Center Configuration Manager 2007 Product Feature PowerPoint 2007 (PPS) Quizzes to review and test your Configuration Manager knowledge.
Thanks to Mike Reavis for showing these jewels at the May KCRSMUG meeting.
The System Center Configuration Manager 2007 User Assistance team has created a set of quizzes to help you assess your understanding of the dependencies and requirements for key features of Configuration Manager. These quizzes are intended to raise your level of awareness of the some of the nuances of these features before you configure and use them. They can also be used to help train other Configuration Manager administrators within your organization. Each quiz consists of 10 questions that can be answered Yes or No. Regardless of your answer, the quiz will display the correct information, and include one or more links to the corresponding related content located in the Configuration Manager 2007 Documentation Library located on the Configuration Manager TechCenter. We are testing the usefulness of this format, and ask for your feedback on the format and the content contained in each quiz.
Please send feedback to SMSDOCS@Microsoft.com.
PPS Downloads:
http://www.microsoft.com/downloads/details.aspx?FamilyID=b9fb478a-ec98-47f2-b31e-57443a8ae88f&DisplayLang=en
SCCM Quizes
http://myitforum.com/cs2/blogs/kcrsmug
George Denis Patrick Carlin (1937 – 2008) American comedian and author
This VBS script will take a remote machine name from an input dialog box and write the following information to an excel spreadsheet for each listed item in the remote machines add and remove applications program group.
Machine Name
Display Name
Product ID
Publisher
Version
strComputer = InputBox ("Enter Machine Name")
objExcel.Cells(1, 2).Value = "Machine Name"
objExcel.Cells(1, 2).Value = "Display Name"
objExcel.Cells(1, 3).Value = "Product ID"
objExcel.Cells(1, 4).Value = "Publisher"
objExcel.Cells(1, 5).Value = "Version"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32Reg_AddRemovePrograms")
objExcel.Cells(intRow, 1).Value = UCase(strComputer)
objExcel.Cells(intRow, 2).Value = objItem.DisplayName
objExcel.Cells(intRow, 3).Value = objItem.ProdID
objExcel.Cells(intRow, 4).Value = objItem.Publisher
objExcel.Cells(intRow, 5).Value = objItem.Version
objExcel.Range("A1:E1").Select
Here you will find a VBS script that will allow you to ping a remote machine continuously (Ping –t) until you close the command window. The script can be used to monitor the shutdown or reboot process for a server or workstation.
Ping Script:
strComputer = InputBox("Enter Machine Name")
Set objShell = CreateObject("Wscript.Shell")
strCommand = "%Comspec% /k Ping -t " & strComputer
objShell.Run strCommand
This simple little VBS script can be used as a desktop link or shortcut to open your favorite web page.
strURL = "http://myitforum.com"
objShell.Run(strURL)
Here you will find a VBS script that will allow you to issue the NsLookUp command against a remote machine.
NsLookUp Script:
strCommand = "%Comspec% /k NsLookUp " & strComputer