This VBS script will take a machine name from an input dialog box and write the adapter name, whether or not it is active and return the link speed(s) in KB or MB per second as needed to an excel spreadsheet.
VBS Script:
strComputer = InputBox ("Enter Machine Name")
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
objExcel.Workbooks.Add
intRow = 2
objExcel.Cells(1, 1).Value = "Name"
objExcel.Cells(1, 2).Value = "Active"
objExcel.Cells(1, 3).Value = "Speed"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\Wmi")
Set colItems = objWMIService.ExecQuery("Select * From MSNdis_LinkSpeed")
For Each objItem in colItems
objExcel.Cells(intRow, 1).Value = objItem.InstanceName
objExcel.Cells(intRow, 2).Value = objItem.Active
If objItem.NdisLinkSpeed < 10000 Then
strNICSpeed = objItem.NdisLinkSpeed / 10 & " KBps"
ElseIf objItem.NdisLinkSpeed > 10000 Then
strNICSpeed = objItem.NdisLinkSpeed / 10000 & " MBps"
End If
objExcel.Cells(intRow, 3).Value = strNICSpeed
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 list of machine names from a text file called MachineList.Txt and write the Machine name, adapter name, whether or not it is active and return the link speed(s) in KB or MB per second as needed to an excel spreadsheet.
objExcel.Cells(1, 1).Value = "Machine Name"
objExcel.Cells(1, 2).Value = "Name"
objExcel.Cells(1, 3).Value = "Active"
objExcel.Cells(1, 4).Value = "Speed"
Set Fso = CreateObject("Scripting.FileSystemObject")
Set InputFile = fso.OpenTextFile("MachineList.Txt")
Do While Not (InputFile.atEndOfStream)
strComputer = InputFile.ReadLine
objExcel.Cells(intRow, 1).Value = UCase(strComputer)
objExcel.Cells(intRow, 2).Value = objItem.InstanceName
objExcel.Cells(intRow, 3).Value = objItem.Active
objExcel.Cells(intRow, 4).Value = strNICSpeed
Loop
objExcel.Range("A1:D1").Select
This Vbs script will prompt you for a remote or local machine name and set the Automatic Updates service start mode to Automatic and start the service if it is not running for ITMU use.
Vbs Script:
strComputer = InputBox("Enter Machine Name")
srtService = "Automatic Updates"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\Cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * from Win32_Service Where DisplayName ='" & srtService & "'")
If objItem.State = "Running" Then
objItem.StopService()
errRetCode = objItem.ChangeStartMode("Automatic")
objItem.StartService()
MsgBox "The " & srtService & " on " & UCase(strComputer) & " Has Been Set To Automatic"
This SQL query will provide you will an example of how to get the Net HelpMsg information from within SQL server
SQL Query:
Use Master
Set NoCount On
Create Table #ErrorTable (ResultColumn VarChar(500))
Declare @Command SysName, @Variable SysName
Declare @Message varchar(500)
Set @Variable = '5' -- Error Code
Set @Command = 'Net HelpMsg ' + @Variable + ''
Insert Into #ErrorTable
Exec Master..Xp_CmdShell @Command
Delete From #ErrorTable Where ResultColumn is Null
Select @Message = ResultColumn From #ErrorTable
Print 'Error Message ' + @Variable
Print 'Translates To :'
Print @Message
Drop Table #ErrorTable
Set NoCount Off
Here you will find queries that will list all of the resources that are currently listed on your SMS server’s specified subnet. There are two ways in which you can retrieve this information. One is using the “Like” statement for the IP addresses first 3 octets from the IP addresses view. The other uses the IP subnet from the IP subnets view.
IP Addresses View:
Select
SYS.Name0 'Machine Name',
IP.Ip_Addresses0 'IP Address'
From v_R_System SYS
Inner Join v_Ra_System_IpAddresses IP
On SYS.ResourceId = IP.ResourceId
Where IP.Ip_Addresses0 Like '192.168.1.%'
IP Subnets View:
SN.Ip_Subnets0
Inner Join v_Ra_System_IpSubnets SN
On SYS.ResourceId = SN.ResourceId
Where SN.Ip_Subnets0 = '192.168.1.0'
There may be times when you need to switch off or disable your SMS site server logging permanently or temporarily and to do so it is a relatively easy task to perform. For example if you have a site server in a lab or sandbox environment the log files may not be needed for whatever reason you may have and can be prevented for generating information to be sent to the logs.
However this one here involves the registry and care must be taken to ensure that you have a safe or backup copy of the registry or at least the SMS registry information. Follow the steps below to disable your site server logging.
From the SMS server start Regedit and locate the following subkey:
Hkey_Local_Machine\Software\Microsoft\Sms\Tracing
Next simply double click on “Enabled” and change the “Value Data” from 1 to 0.
After this has been completed you need to recycle the Sms_Executive and the Sms_Site_Component_Manager services to set the change to take effect immediately or reboot the machine when you can.
To see the list of log files that will be affected see the “Site server log files” section of the document below:
A list of log files that are created in Systems Management Server 2003
http://support.microsoft.com/kb/867490
The Microsoft File Server Resource Manager (FSRM) for Windows Server 2003 R2 (Version 5.2) is a set of tools that will allow you to manage stored data on the servers in your infrastructure. With FSRM you can set quotas on volumes or folder shares and Create and view reports for the items you have set and defined.
One of the best features is that after your quotas have been set you can select the “Storage Reports Management” leaf and from the context menu select either “Schedule a new report task”, “Add or remove tasks for a report task” or “Generate reports now”. With these reports you can select the volumes or directory folders you want to report on and generate reports on Duplicate files, Files by owner, large files, Least/Most recently accessed files and view quota usage. You also have a choice of report formats to choose from including DHTML, HTML. XML, CSV or Text as well as set the delivery of the reports.
The tool is accessed from the administrative tools group by selecting “File Server Resource Manager”. If it is not already installed you must add it by following the steps below;
1. Click “Add or Remove Programs” from the control panel.
2. Select “Add/Remove Windows Components”.
3. Select “Management and Monitoring Tools”.
4. Click on the “Details” tab.
5. Select File Server Resource Manager from the sub components and click “OK”.
6. Click “Next” to install the applet and click “Finish” after it is installed.
Additional Information:
Step-by-Step Guide for File Server Resource Manager
http://technet2.microsoft.com/windowsserver/en/library/b158948f-d5ee-4275-9616-1d38a27013ef1033.mspx?mfr=true
This PowerShell script will take the machine names from a text file called MachineList.Txt file and return the network drive letters and the full UNC path for them and write the results to an excel spreadsheet.
PS1 Script:
$Excel = New-Object -Com Excel.Application
$Excel.Visible = $True
$WorkBook = $Excel.WorkBooks.Add()
$WorkSheet = $WorkBook.WorkSheets.Item(1)
$WorkSheet.Cells.Item(1,1) = "Machine Name"
$WorkSheet.Cells.Item(1,2) = "Drive"
$WorkSheet.Cells.Item(1,3) = "Path"
$CellRange = $WorkSheet.UsedRange
$CellRange.Interior.ColorIndex = 19
$CellRange.Font.ColorIndex = 11
$intRow = 2
$colComputer = Cat C:\MachineList.txt
ForEach ($strComputer in $colComputer)
{$colComputer = Gwmi Win32_LogicalDisk -filter "DriveType = 4" -Comp $strComputer
ForEach($objItem in $colcomputer){
$Worksheet.Cells.Item($intRow, 1) = $strComputer.ToUpper()
$Worksheet.Cells.Item($intRow, 2) = $objItem.DeviceID
$Worksheet.Cells.Item($intRow, 3) = $objItem.ProviderName
$intRow = $intRow + 1}}
$Cellrange.Font.Bold = $True
$Cellrange.EntireColumn.AutoFit()
Clear
Long before nails were made on an assembly line by the thousands in a matter of minutes they were made by hand individually by skilled craftsmen. As a result they were expensive by today’s standards and were reused as often as possible. When doors were installed it was a common practice to drive the nail through the holes they drilled and then bend the nail over so that it would not work loose as the door was repeatedly opened and closed over the years.
As a result when a building such as a home or a barn was salvaged the nails were carefully removed for use elsewhere. When they came to a door nail that was bent as was the practice the nails was considered “Dead” because it was no longer of use and thrown away. Today we us the term “Dead as a door nail” even though most people don’t even know what a door nail is to describe something that is no longer of use such as a broken tool.
The TechNet Events and Errors Message Center allows for you to search for events, event ID’s and lookup errors by Microsoft product, Version, ID, Event Source, Message text, File name or Language.
The following Microsoft products are currently available:
.NET Framework
Baseline Security Analyzer
BizTalk Server
BizTalk Server 2004
Business Solutions CRM
Exchange
Host Integration Server
Internet Security and Acceleration Server
MapPoint Location Server
Money
Office
SQL Server
SQL Server Notification Services
SQL Server Reporting Services
Systems Management Server
Visual Studio
Team System
Windows Operating System
Events and Errors Message Center
http://www.microsoft.com/technet/support/ee/ee_advanced.aspx
The myITforum live Search Engines below are customized Windows Live search engine macros that allow for you to search the myITforum Blogs page, home page or the Forums using the Windows Live search technology.
You can also create your own Windows Live search engine by clicking on the “Create your own search engine” link and create your own site(s) Macro as well as “Find more search engines” that others have created.
myITforum Live Search Engines:
myITforum Live Blog's Search
http://search.live.com/macros/myit/myitforum_blog_search
myITforum Live Home Search
http://search.live.com/macros/myit/myitforum_home_search
myITforum Live Forum's Search
http://search.live.com/macros/myit/myitforum_forums_search
myITforum Live Articles Search
http://search.live.com/macros/myit/myitforum_live_articles_search
Here you will find six presentations for the MOSS enterprise search.
Enterprise Search Strategy and Opportunities
This session starts with an overview of Microsoft's enterprise search strategy, reviews the various products that it affects, and outlines what is new in SharePoint Search for the 2007 Microsoft Office system. Lastly, it discusses opportunities for partners building on the platform.
SharePointServer2007SearchDeepDiveA.exe
SharePoint Search Extensibility
This session addresses the core extensibility scenarios in Microsoft Office SharePoint Server 2007 (MOSS) search, such as customizing the user interface, custom search using client applications, and crawling new repositories, including line-of-business data. It also covers the administration object model.
SharePointServer2007SearchDeepDiveB.exe
Protocol Handlers and IFilters
Learn about the overall architecture of Microsoft Office SharePoint Server 2007 (MOSS) search. Protocol Handlers and iFilter interfaces are described in detail with code examples.
SharePointServer2007SearchDeepDiveC.exe
Customizing and Extending Search in Office SharePoint Server 2007
Learn how to customize Microsoft Office SharePoint Server 2007 (MOSS) search user interface and build search based applications in this session. Branding, Web parts and extending search using the object model and Web services are discussed.
SharePointServer2007SearchDeepDiveD.exe
Business Data Search
The Business Data Catalog (BDC) enables search to reach into line-of-business repositories and provide integrated search results. Learn about the Business Data Catalog including the design motivations, scenarios, and the apis.
SharePointServer2007SearchDeepDiveE.exe
SharePoint Search Deployment Scenarios
This session reviews both Windows SharePoint Services 3.0 and Office SharePoint Server 2007 search topologies, and various deployment scenarios such as a collaboration environment, enterprise portals, and internet facing portals.
SharePointServer2007SearchDeepDiveF.exe
SharePoint Server 2007 Presentations
http://www.microsoft.com/downloads/details.aspx?familyid=2751d5cd-8690-44b5-ae5c-d2769b227929&displaylang=en
This simple SQL query will return the MOM Server user names and the time stamp when the account(s) was created.
Name 'User Name',
Convert(VarChar(30), TimeAdded, 109) 'Account Created'
From [User]
Where Name <> 'N/A'
Order By 'User Name'
Sometimes you may find that when you are in the SQL Management Studio or creating SQL queries that when you select Help your machine may seemingly take a long time to initialize the Help system or the searches take an inordinate amount of time to load and compete. In SQL 2005 this is not a reflection on the performance of SQL or your local machine it is usually the internet connectivity that is seemingly slowing you down and causing your coffee to turn cold in its pretty pale Styrofoam cup.
By default when you first run the SQL Books On Line (BOL) you choose how you want the help system to behave and therefore load. If you are like me and you were in a hurry to simply get on with it you choose the first option that is pre-selected which is online first. This causes the system to seem slow in responding because the internet has to find the page then load the page and finally perform its search and return the results to you.
Because the default load order for BOL is Online first and then use the local help system therein usually lies the problem. To change the BOL load order open your BOL and from the “Tools” menu select “Options”. Then select Help and click “OnLine”. At the “When loading help content” select the second radio button which reads “Try local first, then online” and select OK.
Note: You can also set the search providers order options or remove them as well by unchecking the appropriate boxes. You can also select the Codezone community links to use or remove them as well.
This HTA script like the VBS Script To Browse For A Folder And List The File Contents In Excel script will allow for you to browse for a directory folder and then it will send all of the file contents to an excel spreadsheet sorted alphabetically. This script can be used to gather a list of the music or video files you have in a particular location at home. At work or at the office it can be useful for listing the contents of a particular SMS inbox.
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
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.BrowseForFolder (0, "Select The Folder To Enumerate :", (0))
If objFolder Is Nothing Then
Wscript.Quit
Else
Set objFolderItem = objFolder.Self
objPath = objFolderItem.Path
Set objFso = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFso.GetFolder(objPath)
For each objFile in objFolder.Files
If objFolder.Files.Count > 0 Then
Window.Document.Title = "Information For " & objPath
strHtml = strHtml & "<td><Font color = Blue>" & objFile.Name & "</font></Br>"
DataArea.InnerHtml = strHtml
End Sub
</Script><Body>
<p><h3 align = center><font color='Orange'>Please Visit myITforum.Com</font></h3>
<div></div>
<input Type = "Button" Value = "Browse For Folder" Name = "Run_Button" onClick = "WindowsLoad"><p></td>
<Span Id = "DataArea"></Span></Body><Div Align = "Center">
<P><A Href="http://myitforum.com/cs2/blogs/dhite">Created For myITforum By Don Hite</A>
This by request VBS script will allow you to enter a remote machine name from an input dialog box and will return the Microsoft Outlook 2007 client information using Win32_OutlookSummary from the MsApps12 WMI namespace including the machine name, client description, file path, version and build number.
On Error Resume Next
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\MsApps12")
Set colItems = objWMIService.ExecQuery("Select * From Win32_OutlookSummary")
If Err.Number <> 0 Then
MsgBox "Doh!"
MsgBox ("Machine Name: " & UCase(strComputer) & vbCr & vbCr & _
"Name: " & objItem.Name & vbcrlf & _
"Path: " & objItem.Path & vbcrlf & _
"Version: "& objItem.Version & vbcrlf & _
"Build: " & objItem.Build)