Script to count mailboxes.

Hi All,

I have a need for a script that will list all the mailboxes from all of the 
Exchange servers (we have 20 in the same organisation) and there size in 
excel spreadsheet.  Do you know where I could get one from.

Thanks. 


0
Lion1 (14)
11/22/2006 4:53:17 PM
exchange.admin 57650 articles. 2 followers. Follow

19 Replies
676 Views

Similar Articles

[PageSpeed] 24

http://support.microsoft.com/kb/320071

-- 
Bharat Suneja
MVP - Exchange
www.zenprise.com
NEW blog location:
www.exchangepedia.com/blog
----------------------------------------------


"Leon" <Lion@hotmail.com> wrote in message 
news:%23Gsg5ZlDHHA.3600@TK2MSFTNGP06.phx.gbl...
> Hi All,
>
> I have a need for a script that will list all the mailboxes from all of 
> the Exchange servers (we have 20 in the same organisation) and there size 
> in excel spreadsheet.  Do you know where I could get one from.
>
> Thanks.
> 


0
bharat3597 (1006)
11/22/2006 5:02:47 PM
Thanks but how do I get this to output it all to an excel sheet.


"Bharat Suneja [MVP]" <bharat@nospam.org> wrote in message 
news:eZ6fKglDHHA.4132@TK2MSFTNGP04.phx.gbl...
> http://support.microsoft.com/kb/320071
>
> -- 
> Bharat Suneja
> MVP - Exchange
> www.zenprise.com
> NEW blog location:
> www.exchangepedia.com/blog
> ----------------------------------------------
>
>
> "Leon" <Lion@hotmail.com> wrote in message 
> news:%23Gsg5ZlDHHA.3600@TK2MSFTNGP06.phx.gbl...
>> Hi All,
>>
>> I have a need for a script that will list all the mailboxes from all of 
>> the Exchange servers (we have 20 in the same organisation) and there size 
>> in excel spreadsheet.  Do you know where I could get one from.
>>
>> Thanks.
>>
>
> 


0
Lion1 (14)
11/22/2006 5:13:24 PM
Try here.


List Exchange Mailbox Information
http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem019.mspx

James Chong

Leon wrote:
> Hi All,
>
> I have a need for a script that will list all the mailboxes from all of the
> Exchange servers (we have 20 in the same organisation) and there size in
> excel spreadsheet.  Do you know where I could get one from.
> 
> Thanks.

0
jamestechman (1266)
11/22/2006 5:14:35 PM
James,

This is fantastic. if you ahve any more usefull scripts that you dont mind 
sharing please let me know.
You are a credit to Newsgroup.


Thanks again.


"james chong" <jamestechman@gmail.com> wrote in message 
news:1164215675.226087.252020@f16g2000cwb.googlegroups.com...
> Try here.
>
>
> List Exchange Mailbox Information
> http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem019.mspx
>
> James Chong
>
> Leon wrote:
>> Hi All,
>>
>> I have a need for a script that will list all the mailboxes from all of 
>> the
>> Exchange servers (we have 20 in the same organisation) and there size in
>> excel spreadsheet.  Do you know where I could get one from.
>>
>> Thanks.
> 


0
Lion1 (14)
11/22/2006 5:42:58 PM
You might find this useful

Mail-Box Size Report Script and Database
http://www.outlookexchange.com/articles/glenscales/mreport1.asp

Glen Scales MVP has a number of good management scripts that you can
find at

http://www.outlookexchange.com/articles/glenscales/default.asp


James Chong



Leon wrote:
> James,
>
> This is fantastic. if you ahve any more usefull scripts that you dont mind
> sharing please let me know.
> You are a credit to Newsgroup.
>
>
> Thanks again.
>
>
> "james chong" <jamestechman@gmail.com> wrote in message
> news:1164215675.226087.252020@f16g2000cwb.googlegroups.com...
> > Try here.
> >
> >
> > List Exchange Mailbox Information
> > http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem019.mspx
> >
> > James Chong
> >
> > Leon wrote:
> >> Hi All,
> >>
> >> I have a need for a script that will list all the mailboxes from all of
> >> the
> >> Exchange servers (we have 20 in the same organisation) and there size in
> >> excel spreadsheet.  Do you know where I could get one from.
> >>
> >> Thanks.
> >

0
jamestechman (1266)
11/22/2006 7:06:30 PM
Thanks James.

Kind regards.

"james chong" <jamestechman@gmail.com> wrote in message 
news:1164222390.097886.33450@h48g2000cwc.googlegroups.com...
> You might find this useful
>
> Mail-Box Size Report Script and Database
> http://www.outlookexchange.com/articles/glenscales/mreport1.asp
>
> Glen Scales MVP has a number of good management scripts that you can
> find at
>
> http://www.outlookexchange.com/articles/glenscales/default.asp
>
>
> James Chong
>
>
>
> Leon wrote:
>> James,
>>
>> This is fantastic. if you ahve any more usefull scripts that you dont 
>> mind
>> sharing please let me know.
>> You are a credit to Newsgroup.
>>
>>
>> Thanks again.
>>
>>
>> "james chong" <jamestechman@gmail.com> wrote in message
>> news:1164215675.226087.252020@f16g2000cwb.googlegroups.com...
>> > Try here.
>> >
>> >
>> > List Exchange Mailbox Information
>> > http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem019.mspx
>> >
>> > James Chong
>> >
>> > Leon wrote:
>> >> Hi All,
>> >>
>> >> I have a need for a script that will list all the mailboxes from all 
>> >> of
>> >> the
>> >> Exchange servers (we have 20 in the same organisation) and there size 
>> >> in
>> >> excel spreadsheet.  Do you know where I could get one from.
>> >>
>> >> Thanks.
>> >
> 


0
Lion1 (14)
11/23/2006 1:49:51 PM
Do you knowof any Script that eill audit PC's on the network to a .mdb or 
excel file.

Kind regards,


Leon.
"james chong" <jamestechman@gmail.com> wrote in message 
news:1164222390.097886.33450@h48g2000cwc.googlegroups.com...
> You might find this useful
>
> Mail-Box Size Report Script and Database
> http://www.outlookexchange.com/articles/glenscales/mreport1.asp
>
> Glen Scales MVP has a number of good management scripts that you can
> find at
>
> http://www.outlookexchange.com/articles/glenscales/default.asp
>
>
> James Chong
>
>
>
> Leon wrote:
>> James,
>>
>> This is fantastic. if you ahve any more usefull scripts that you dont 
>> mind
>> sharing please let me know.
>> You are a credit to Newsgroup.
>>
>>
>> Thanks again.
>>
>>
>> "james chong" <jamestechman@gmail.com> wrote in message
>> news:1164215675.226087.252020@f16g2000cwb.googlegroups.com...
>> > Try here.
>> >
>> >
>> > List Exchange Mailbox Information
>> > http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem019.mspx
>> >
>> > James Chong
>> >
>> > Leon wrote:
>> >> Hi All,
>> >>
>> >> I have a need for a script that will list all the mailboxes from all 
>> >> of
>> >> the
>> >> Exchange servers (we have 20 in the same organisation) and there size 
>> >> in
>> >> excel spreadsheet.  Do you know where I could get one from.
>> >>
>> >> Thanks.
>> >
> 


0
Lion1 (14)
11/24/2006 10:38:32 AM
Sure, here is one that will do pst's just change the file extension.

Exchange: Search Network For PST Files
http://msexchangetips.blogspot.com/2006/09/exchange-search-network-for-pst-files.html

James Chong

Leon wrote:
> Do you knowof any Script that eill audit PC's on the network to a .mdb or
> excel file.
>
> Kind regards,
>
>
> Leon.
> "james chong" <jamestechman@gmail.com> wrote in message
> news:1164222390.097886.33450@h48g2000cwc.googlegroups.com...
> > You might find this useful
> >
> > Mail-Box Size Report Script and Database
> > http://www.outlookexchange.com/articles/glenscales/mreport1.asp
> >
> > Glen Scales MVP has a number of good management scripts that you can
> > find at
> >
> > http://www.outlookexchange.com/articles/glenscales/default.asp
> >
> >
> > James Chong
> >
> >
> >
> > Leon wrote:
> >> James,
> >>
> >> This is fantastic. if you ahve any more usefull scripts that you dont
> >> mind
> >> sharing please let me know.
> >> You are a credit to Newsgroup.
> >>
> >>
> >> Thanks again.
> >>
> >>
> >> "james chong" <jamestechman@gmail.com> wrote in message
> >> news:1164215675.226087.252020@f16g2000cwb.googlegroups.com...
> >> > Try here.
> >> >
> >> >
> >> > List Exchange Mailbox Information
> >> > http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem019.mspx
> >> >
> >> > James Chong
> >> >
> >> > Leon wrote:
> >> >> Hi All,
> >> >>
> >> >> I have a need for a script that will list all the mailboxes from all
> >> >> of
> >> >> the
> >> >> Exchange servers (we have 20 in the same organisation) and there size
> >> >> in
> >> >> excel spreadsheet.  Do you know where I could get one from.
> >> >>
> >> >> Thanks.
> >> >
> >

0
jamestechman (1266)
11/24/2006 2:36:20 PM
Sorry James,

Misunderstanding. I meant if you had a script that will audit a PC 
(installed software, memory, CPU) and append all this in to the Excel or MDB 
file.

Kind regards,
"james chong" <jamestechman@gmail.com> wrote in message 
news:1164378980.605655.281090@h54g2000cwb.googlegroups.com...
> Sure, here is one that will do pst's just change the file extension.
>
> Exchange: Search Network For PST Files
> http://msexchangetips.blogspot.com/2006/09/exchange-search-network-for-pst-files.html
>
> James Chong
>
> Leon wrote:
>> Do you knowof any Script that eill audit PC's on the network to a .mdb or
>> excel file.
>>
>> Kind regards,
>>
>>
>> Leon.
>> "james chong" <jamestechman@gmail.com> wrote in message
>> news:1164222390.097886.33450@h48g2000cwc.googlegroups.com...
>> > You might find this useful
>> >
>> > Mail-Box Size Report Script and Database
>> > http://www.outlookexchange.com/articles/glenscales/mreport1.asp
>> >
>> > Glen Scales MVP has a number of good management scripts that you can
>> > find at
>> >
>> > http://www.outlookexchange.com/articles/glenscales/default.asp
>> >
>> >
>> > James Chong
>> >
>> >
>> >
>> > Leon wrote:
>> >> James,
>> >>
>> >> This is fantastic. if you ahve any more usefull scripts that you dont
>> >> mind
>> >> sharing please let me know.
>> >> You are a credit to Newsgroup.
>> >>
>> >>
>> >> Thanks again.
>> >>
>> >>
>> >> "james chong" <jamestechman@gmail.com> wrote in message
>> >> news:1164215675.226087.252020@f16g2000cwb.googlegroups.com...
>> >> > Try here.
>> >> >
>> >> >
>> >> > List Exchange Mailbox Information
>> >> > http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem019.mspx
>> >> >
>> >> > James Chong
>> >> >
>> >> > Leon wrote:
>> >> >> Hi All,
>> >> >>
>> >> >> I have a need for a script that will list all the mailboxes from 
>> >> >> all
>> >> >> of
>> >> >> the
>> >> >> Exchange servers (we have 20 in the same organisation) and there 
>> >> >> size
>> >> >> in
>> >> >> excel spreadsheet.  Do you know where I could get one from.
>> >> >>
>> >> >> Thanks.
>> >> >
>> >
> 


0
Lion1 (14)
11/24/2006 4:08:22 PM
Not a problem,

The following will get say a list of computers proc info from the win32
baseboard class. To query other things like memory, hd etc, you can get
the class names here and just insert the same line under this line in
the script below.

WMI HW class names
http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true

Add more under this line in the script
Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")


------------------------------------------------------------------------------------------------------------------------------------------

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"\root\cimv2")

For Each objItem in colItems


strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")

Set fso = CreateObject("Scripting.FileSystemObject")

set wfile = fso.opentextfile("c:\test.csv",2,true)

For Each objFile in colFiles

Wfile.writeline(strComputer & " " & objFile.Drive & " " & objFile.Path
& " " & objFile.FileName & "." & objFile.Extension & " " &
objFile.FileSize)

Next


----------------------------------------------------------------------------------------------------------------------------------
Then type,
C:\>cscript searchpst.vbs computer1 computer2 computer3

Or you can read in the list of computer names from an OU which is also
on the same link in my blog.


Leon wrote:
> Sorry James,
>
> Misunderstanding. I meant if you had a script that will audit a PC
> (installed software, memory, CPU) and append all this in to the Excel or MDB
> file.
>
> Kind regards,
> "james chong" <jamestechman@gmail.com> wrote in message
> news:1164378980.605655.281090@h54g2000cwb.googlegroups.com...
> > Sure, here is one that will do pst's just change the file extension.
> >
> > Exchange: Search Network For PST Files
> > http://msexchangetips.blogspot.com/2006/09/exchange-search-network-for-pst-files.html
> >
> > James Chong
> >
> > Leon wrote:
> >> Do you knowof any Script that eill audit PC's on the network to a .mdb or
> >> excel file.
> >>
> >> Kind regards,
> >>
> >>
> >> Leon.
> >> "james chong" <jamestechman@gmail.com> wrote in message
> >> news:1164222390.097886.33450@h48g2000cwc.googlegroups.com...
> >> > You might find this useful
> >> >
> >> > Mail-Box Size Report Script and Database
> >> > http://www.outlookexchange.com/articles/glenscales/mreport1.asp
> >> >
> >> > Glen Scales MVP has a number of good management scripts that you can
> >> > find at
> >> >
> >> > http://www.outlookexchange.com/articles/glenscales/default.asp
> >> >
> >> >
> >> > James Chong
> >> >
> >> >
> >> >
> >> > Leon wrote:
> >> >> James,
> >> >>
> >> >> This is fantastic. if you ahve any more usefull scripts that you dont
> >> >> mind
> >> >> sharing please let me know.
> >> >> You are a credit to Newsgroup.
> >> >>
> >> >>
> >> >> Thanks again.
> >> >>
> >> >>
> >> >> "james chong" <jamestechman@gmail.com> wrote in message
> >> >> news:1164215675.226087.252020@f16g2000cwb.googlegroups.com...
> >> >> > Try here.
> >> >> >
> >> >> >
> >> >> > List Exchange Mailbox Information
> >> >> > http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem019.mspx
> >> >> >
> >> >> > James Chong
> >> >> >
> >> >> > Leon wrote:
> >> >> >> Hi All,
> >> >> >>
> >> >> >> I have a need for a script that will list all the mailboxes from
> >> >> >> all
> >> >> >> of
> >> >> >> the
> >> >> >> Exchange servers (we have 20 in the same organisation) and there
> >> >> >> size
> >> >> >> in
> >> >> >> excel spreadsheet.  Do you know where I could get one from.
> >> >> >>
> >> >> >> Thanks.
> >> >> >
> >> >
> >

0
jamestechman (1266)
11/24/2006 4:29:49 PM
Hi James,

I will start from the beginning sorry about this.  I have 500 PC around 
world and need to Audit them all there is a DC at each office and I can 
access each PC from the my location.  I need the script that will Audit all 
the PC's CPU, HDD, Comp Name, User logged on, Software installed etc. and 
load this in to a CSV or xls or mdb file.

I had a go with your script but I get an error saying Next expected at the 
last line.

I have a script that will Audit the machine and dump a txt file to the 
\\server\share but I need it to be a CSV so I  can import it in to a excel 
and don't want to (end up with 500 CSV files that I have to manually import 
(but that's not a big problem))

Below is the script that I have.


*********************************************************
Dim GetCurrentDate ,filext ,oshell

Set oShell = WScript.CreateObject ("WSCript.shell")
oShell.run "net time \\domain.local/set /y"
'' change DCname to your domain controller name if you want to syncronize
your time with your DC
Set oShell = Nothing


strComputer = "."
const HKEY_LOCAL_MACHINE = &H80000002
On Error Resume Next

'' ************************************
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from
Win32_ComputerSystem",,48)
For Each objItem In colItems
    cComputerName = objItem.Caption
 cloginname =  objItem.UserName
    cManufacturer = objItem.Manufacturer
 cModel = objItem.Model
Next

Set WshNetwork = WScript.CreateObject("WScript.Network")
cUserName = WshNetwork.UserName
Set UserObj = GetObject("WinNT://domain.local/"&WshNetwork.UserName)
'' change domain to your domain name w/o .com
strDisplayName = UserObj.Get("FullName")
strlastlogin = UserObj.Get("LastLogin")
pos = instrrev(cloginname,"\",-1)
clname1 = mid(cloginname,pos+1 ,len(cloginname))

Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("process")
windir = WshSysEnv("WINDIR")

Set objFSO = CreateObject("Scripting.FileSystemObject")
If not objFSO.FolderExists(windir & "\audit") Then
'' change \sharedfolder to any name , this is where the report will be save
    Set objFolder = objFSO.CreateFolder(windir & "\audit")
End If


Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile(windir & "\audit\" & cComputerName &
".txt", True)
objTextFile.WriteLine "Date: " & Date  & vbTab  & Time
objTextFile.WriteLine "User Name: " &  clname1
Set UserObj = GetObject("WinNT://group.abercrombiekent.local/"&clname1)
''change domainname to your domain name

strDisplayName = UserObj.Get("FullName")
objTextFile.WriteLine "Full Name: " & strDisplayName
'' objTextFile.WriteLine "Employee Number: "
objTextFile.WriteLine "Computer Name: " & cComputerName

''************************
Set objWMIService = GetObject("winmgmts:" & "!\\" & strComputer &
"\root\cimv2")
Set colAdapters = objWMIService.ExecQuery("Select * from
Win32_NetworkAdapterConfiguration Where IPEnabled = True")
For Each objAdapter in colAdapters
 objTextFile.WriteLine "IP address: " & objAdapter.IPAddress(i)
   objTextFile.WriteLine "DNS Domain: " & objAdapter.DNSDomain
Next

''****************
'' Get OS Details
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from
Win32_OperatingSystem",,48)
For Each objItem In colItems
 cOSs = objItem.Name
 pos = InStr(1, cOsS,"|",1)
 cOS1 = left(cOSs,pos-1)
 objTextFile.WriteLine  "Operating System: " &   cOS1  & "   " &
objItem.CSDVersion
 TotalVisibleMemory =  FormatNumber(objItem.TotalVisibleMemorySize/1024,0)

Next

''****************
objTextFile.WriteLine "Manufacturer:  " & cManufacturer
objTextFile.WriteLine "Model:  " & cModel

''****************
''Get BIOS Details
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48)
For Each objItem In colItems
       objTextFile.WriteLine "Serial Number: " & objItem.SerialNumber
Next

''**********************************
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor",,48)
For Each objItem in colItems
     objTextFile.WriteLine "CPU: " & trim(objItem.Name) & "  " &
objItem.CurrentClockSpeed & " MHz"
Next

''**************************************
objTextFile.WriteLine "Memory: "  & TotalVisibleMemory  & " MB"

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from
Win32_LogicalDisk",,48)
For Each objItem in colItems
 ndisktype = objItem.DriveType
    If ndisktype = 3 Then
 objTextFile.WriteLine "Disk: " & objItem.Caption
     objTextFile.WriteLine "Size: " & objItem.Size
     objTextFile.WriteLine "FreeSpace: " & objItem.FreeSpace
    End If
    If ndisktype = 5 Then
     objTextFile.WriteLine "CD Drive: " & objItem.Caption
    End If
Next

objTextFile.WriteLine "Softwares:   *****Programs found in Control Panel
Add/Remove *********** "

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"
&strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

For Each subkey In arrSubKeys
    UnistallValue = ""
    DisplayValue = ""
    strKeyPath1 = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" &
subkey
    oReg.EnumValues HKEY_LOCAL_MACHINE, strKeyPath1, arrValueNames ,
arrValueTypes

    If Not Isnull(arrValueTypes) Then
 For i = 0 To UBOUND(arrValueNames)
  If arrValueNames(i) = "DisplayName" Then
             oReg.GetStringValue
HKEY_LOCAL_MACHINE,strKeyPath1,arrValueNames(i),strValue
                  DisplayValue = strValue
  End if
  If arrValueNames(i) = "UninstallString" Then
             oReg.GetStringValue
HKEY_LOCAL_MACHINE,strKeyPath1,arrValueNames(i),strValue
                  UnistallValue = strValue
  End if
 Next
 IF UnistallValue <> "" AND DisplayValue <> "" THEN
         objTextFile.WriteLine "Software:  " & DisplayValue ''  & vbtab &
UnistallValue
    End If
  End If
Next

objTextFile.Close
cfullpath = windir & "\audit\" & cComputerName & ".txt"

servfpath = "\\server\share\" & cComputerName & ".txt"
''modify \\servername\sharedfolder$\serverfolder\ to your servername &
shared folder
'' copy the report to the shared folder in the server

''Set WshShell = WScript.CreateObject("WScript.Shell")
''Return = WshShell.Run("notepad " & cfullpath, 1, true)

Set fso = CreateObject("Scripting.FileSystemObject")
''Set objFSO = CreateObject("Scripting.FileSystemObject")

'' if the report file exist in the server, rename the file
If fso.FileExists(servfpath) Then
 GetCurrentDate = FormatDateTime(Date, 2)
 '' filext = Replace(GetCurrentDate, "/", "-")
  MyString1 = Replace(now, "/", "-")
   MyString2 = Replace(MyString1 , ":", "")
  filext = Replace(MyString2 , " ", "-")

 FSO.MoveFile servfpath  , "\\server\share\" & cComputerName & "." & filext
End If

destFile = "\\server\share\"
fso.CopyFile cfullpath ,destFile,True
Set fso = Nothing
WScript.Quit
****************************************************


 Thanks for your great help.


"james chong" <jamestechman@gmail.com> wrote in message 
news:1164385789.128090.40630@f16g2000cwb.googlegroups.com...
> Not a problem,
>
> The following will get say a list of computers proc info from the win32
> baseboard class. To query other things like memory, hd etc, you can get
> the class names here and just insert the same line under this line in
> the script below.
>
> WMI HW class names
> http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true
>
> Add more under this line in the script
> Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")
>
>
> ------------------------------------------------------------------------------------------------------------------------------------------
>
> strComputer = "."
> Set objWMIService = GetObject("winmgmts:\\" & strComputer &
> "\root\cimv2")
>
> For Each objItem in colItems
>
>
> strComputer = "."
>
> Set objWMIService = GetObject("winmgmts:\\" & strComputer &
> "\root\cimv2")
> Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")
>
> Set fso = CreateObject("Scripting.FileSystemObject")
>
> set wfile = fso.opentextfile("c:\test.csv",2,true)
>
> For Each objFile in colFiles
>
> Wfile.writeline(strComputer & " " & objFile.Drive & " " & objFile.Path
> & " " & objFile.FileName & "." & objFile.Extension & " " &
> objFile.FileSize)
>
> Next
>
>
> ----------------------------------------------------------------------------------------------------------------------------------
> Then type,
> C:\>cscript searchpst.vbs computer1 computer2 computer3
>
> Or you can read in the list of computer names from an OU which is also
> on the same link in my blog.
>
>
> Leon wrote:
>> Sorry James,
>>
>> Misunderstanding. I meant if you had a script that will audit a PC
>> (installed software, memory, CPU) and append all this in to the Excel or 
>> MDB
>> file.
>>
>> Kind regards,
>> "james chong" <jamestechman@gmail.com> wrote in message
>> news:1164378980.605655.281090@h54g2000cwb.googlegroups.com...
>> > Sure, here is one that will do pst's just change the file extension.
>> >
>> > Exchange: Search Network For PST Files
>> > http://msexchangetips.blogspot.com/2006/09/exchange-search-network-for-pst-files.html
>> >
>> > James Chong
>> >
>> > Leon wrote:
>> >> Do you knowof any Script that eill audit PC's on the network to a .mdb 
>> >> or
>> >> excel file.
>> >>
>> >> Kind regards,
>> >>
>> >>
>> >> Leon.
>> >> "james chong" <jamestechman@gmail.com> wrote in message
>> >> news:1164222390.097886.33450@h48g2000cwc.googlegroups.com...
>> >> > You might find this useful
>> >> >
>> >> > Mail-Box Size Report Script and Database
>> >> > http://www.outlookexchange.com/articles/glenscales/mreport1.asp
>> >> >
>> >> > Glen Scales MVP has a number of good management scripts that you can
>> >> > find at
>> >> >
>> >> > http://www.outlookexchange.com/articles/glenscales/default.asp
>> >> >
>> >> >
>> >> > James Chong
>> >> >
>> >> >
>> >> >
>> >> > Leon wrote:
>> >> >> James,
>> >> >>
>> >> >> This is fantastic. if you ahve any more usefull scripts that you 
>> >> >> dont
>> >> >> mind
>> >> >> sharing please let me know.
>> >> >> You are a credit to Newsgroup.
>> >> >>
>> >> >>
>> >> >> Thanks again.
>> >> >>
>> >> >>
>> >> >> "james chong" <jamestechman@gmail.com> wrote in message
>> >> >> news:1164215675.226087.252020@f16g2000cwb.googlegroups.com...
>> >> >> > Try here.
>> >> >> >
>> >> >> >
>> >> >> > List Exchange Mailbox Information
>> >> >> > http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem019.mspx
>> >> >> >
>> >> >> > James Chong
>> >> >> >
>> >> >> > Leon wrote:
>> >> >> >> Hi All,
>> >> >> >>
>> >> >> >> I have a need for a script that will list all the mailboxes from
>> >> >> >> all
>> >> >> >> of
>> >> >> >> the
>> >> >> >> Exchange servers (we have 20 in the same organisation) and there
>> >> >> >> size
>> >> >> >> in
>> >> >> >> excel spreadsheet.  Do you know where I could get one from.
>> >> >> >>
>> >> >> >> Thanks.
>> >> >> >
>> >> >
>> >
> 


0
Lion1 (14)
11/24/2006 5:13:53 PM
Replace all the .txt in your script to .csv. Then when you run the
script

c:cscript yourscript.vbs computer1 comptuter 2 computer 3

It should pipe it into the same csv file. Let me know if it doesn't
work, I am not able to test your script now but can later.

James Chong

Leon wrote:
> Hi James,
>
> I will start from the beginning sorry about this.  I have 500 PC around
> world and need to Audit them all there is a DC at each office and I can
> access each PC from the my location.  I need the script that will Audit all
> the PC's CPU, HDD, Comp Name, User logged on, Software installed etc. and
> load this in to a CSV or xls or mdb file.
>
> I had a go with your script but I get an error saying Next expected at the
> last line.
>
> I have a script that will Audit the machine and dump a txt file to the
> \\server\share but I need it to be a CSV so I  can import it in to a excel
> and don't want to (end up with 500 CSV files that I have to manually import
> (but that's not a big problem))
>
> Below is the script that I have.
>
>
> *********************************************************
> Dim GetCurrentDate ,filext ,oshell
>
> Set oShell = WScript.CreateObject ("WSCript.shell")
> oShell.run "net time \\domain.local/set /y"
> '' change DCname to your domain controller name if you want to syncronize
> your time with your DC
> Set oShell = Nothing
>
>
> strComputer = "."
> const HKEY_LOCAL_MACHINE = &H80000002
> On Error Resume Next
>
> '' ************************************
> Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> Set colItems = objWMIService.ExecQuery("Select * from
> Win32_ComputerSystem",,48)
> For Each objItem In colItems
>     cComputerName = objItem.Caption
>  cloginname =  objItem.UserName
>     cManufacturer = objItem.Manufacturer
>  cModel = objItem.Model
> Next
>
> Set WshNetwork = WScript.CreateObject("WScript.Network")
> cUserName = WshNetwork.UserName
> Set UserObj = GetObject("WinNT://domain.local/"&WshNetwork.UserName)
> '' change domain to your domain name w/o .com
> strDisplayName = UserObj.Get("FullName")
> strlastlogin = UserObj.Get("LastLogin")
> pos = instrrev(cloginname,"\",-1)
> clname1 = mid(cloginname,pos+1 ,len(cloginname))
>
> Set WshShell = WScript.CreateObject("WScript.Shell")
> Set WshSysEnv = WshShell.Environment("process")
> windir = WshSysEnv("WINDIR")
>
> Set objFSO = CreateObject("Scripting.FileSystemObject")
> If not objFSO.FolderExists(windir & "\audit") Then
> '' change \sharedfolder to any name , this is where the report will be save
>     Set objFolder = objFSO.CreateFolder(windir & "\audit")
> End If
>
>
> Set objFSO = CreateObject("Scripting.FileSystemObject")
> Set objTextFile = objFSO.CreateTextFile(windir & "\audit\" & cComputerName &
> ".txt", True)
> objTextFile.WriteLine "Date: " & Date  & vbTab  & Time
> objTextFile.WriteLine "User Name: " &  clname1
> Set UserObj = GetObject("WinNT://group.abercrombiekent.local/"&clname1)
> ''change domainname to your domain name
>
> strDisplayName = UserObj.Get("FullName")
> objTextFile.WriteLine "Full Name: " & strDisplayName
> '' objTextFile.WriteLine "Employee Number: "
> objTextFile.WriteLine "Computer Name: " & cComputerName
>
> ''************************
> Set objWMIService = GetObject("winmgmts:" & "!\\" & strComputer &
> "\root\cimv2")
> Set colAdapters = objWMIService.ExecQuery("Select * from
> Win32_NetworkAdapterConfiguration Where IPEnabled = True")
> For Each objAdapter in colAdapters
>  objTextFile.WriteLine "IP address: " & objAdapter.IPAddress(i)
>    objTextFile.WriteLine "DNS Domain: " & objAdapter.DNSDomain
> Next
>
> ''****************
> '' Get OS Details
> Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> Set colItems = objWMIService.ExecQuery("Select * from
> Win32_OperatingSystem",,48)
> For Each objItem In colItems
>  cOSs = objItem.Name
>  pos = InStr(1, cOsS,"|",1)
>  cOS1 = left(cOSs,pos-1)
>  objTextFile.WriteLine  "Operating System: " &   cOS1  & "   " &
> objItem.CSDVersion
>  TotalVisibleMemory =  FormatNumber(objItem.TotalVisibleMemorySize/1024,0)
>
> Next
>
> ''****************
> objTextFile.WriteLine "Manufacturer:  " & cManufacturer
> objTextFile.WriteLine "Model:  " & cModel
>
> ''****************
> ''Get BIOS Details
> Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48)
> For Each objItem In colItems
>        objTextFile.WriteLine "Serial Number: " & objItem.SerialNumber
> Next
>
> ''**********************************
> Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor",,48)
> For Each objItem in colItems
>      objTextFile.WriteLine "CPU: " & trim(objItem.Name) & "  " &
> objItem.CurrentClockSpeed & " MHz"
> Next
>
> ''**************************************
> objTextFile.WriteLine "Memory: "  & TotalVisibleMemory  & " MB"
>
> Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> Set colItems = objWMIService.ExecQuery("Select * from
> Win32_LogicalDisk",,48)
> For Each objItem in colItems
>  ndisktype = objItem.DriveType
>     If ndisktype = 3 Then
>  objTextFile.WriteLine "Disk: " & objItem.Caption
>      objTextFile.WriteLine "Size: " & objItem.Size
>      objTextFile.WriteLine "FreeSpace: " & objItem.FreeSpace
>     End If
>     If ndisktype = 5 Then
>      objTextFile.WriteLine "CD Drive: " & objItem.Caption
>     End If
> Next
>
> objTextFile.WriteLine "Softwares:   *****Programs found in Control Panel
> Add/Remove *********** "
>
> Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"
> &strComputer & "\root\default:StdRegProv")
>
> strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
> oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
>
> For Each subkey In arrSubKeys
>     UnistallValue = ""
>     DisplayValue = ""
>     strKeyPath1 = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" &
> subkey
>     oReg.EnumValues HKEY_LOCAL_MACHINE, strKeyPath1, arrValueNames ,
> arrValueTypes
>
>     If Not Isnull(arrValueTypes) Then
>  For i = 0 To UBOUND(arrValueNames)
>   If arrValueNames(i) = "DisplayName" Then
>              oReg.GetStringValue
> HKEY_LOCAL_MACHINE,strKeyPath1,arrValueNames(i),strValue
>                   DisplayValue = strValue
>   End if
>   If arrValueNames(i) = "UninstallString" Then
>              oReg.GetStringValue
> HKEY_LOCAL_MACHINE,strKeyPath1,arrValueNames(i),strValue
>                   UnistallValue = strValue
>   End if
>  Next
>  IF UnistallValue <> "" AND DisplayValue <> "" THEN
>          objTextFile.WriteLine "Software:  " & DisplayValue ''  & vbtab &
> UnistallValue
>     End If
>   End If
> Next
>
> objTextFile.Close
> cfullpath = windir & "\audit\" & cComputerName & ".txt"
>
> servfpath = "\\server\share\" & cComputerName & ".txt"
> ''modify \\servername\sharedfolder$\serverfolder\ to your servername &
> shared folder
> '' copy the report to the shared folder in the server
>
> ''Set WshShell = WScript.CreateObject("WScript.Shell")
> ''Return = WshShell.Run("notepad " & cfullpath, 1, true)
>
> Set fso = CreateObject("Scripting.FileSystemObject")
> ''Set objFSO = CreateObject("Scripting.FileSystemObject")
>
> '' if the report file exist in the server, rename the file
> If fso.FileExists(servfpath) Then
>  GetCurrentDate = FormatDateTime(Date, 2)
>  '' filext = Replace(GetCurrentDate, "/", "-")
>   MyString1 = Replace(now, "/", "-")
>    MyString2 = Replace(MyString1 , ":", "")
>   filext = Replace(MyString2 , " ", "-")
>
>  FSO.MoveFile servfpath  , "\\server\share\" & cComputerName & "." & filext
> End If
>
> destFile = "\\server\share\"
> fso.CopyFile cfullpath ,destFile,True
> Set fso = Nothing
> WScript.Quit
> ****************************************************
>
>
>  Thanks for your great help.
>
>
> "james chong" <jamestechman@gmail.com> wrote in message
> news:1164385789.128090.40630@f16g2000cwb.googlegroups.com...
> > Not a problem,
> >
> > The following will get say a list of computers proc info from the win32
> > baseboard class. To query other things like memory, hd etc, you can get
> > the class names here and just insert the same line under this line in
> > the script below.
> >
> > WMI HW class names
> > http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true
> >
> > Add more under this line in the script
> > Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")
> >
> >
> > ------------------------------------------------------------------------------------------------------------------------------------------
> >
> > strComputer = "."
> > Set objWMIService = GetObject("winmgmts:\\" & strComputer &
> > "\root\cimv2")
> >
> > For Each objItem in colItems
> >
> >
> > strComputer = "."
> >
> > Set objWMIService = GetObject("winmgmts:\\" & strComputer &
> > "\root\cimv2")
> > Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")
> >
> > Set fso = CreateObject("Scripting.FileSystemObject")
> >
> > set wfile = fso.opentextfile("c:\test.csv",2,true)
> >
> > For Each objFile in colFiles
> >
> > Wfile.writeline(strComputer & " " & objFile.Drive & " " & objFile.Path
> > & " " & objFile.FileName & "." & objFile.Extension & " " &
> > objFile.FileSize)
> >
> > Next
> >
> >
> > ----------------------------------------------------------------------------------------------------------------------------------
> > Then type,
> > C:\>cscript searchpst.vbs computer1 computer2 computer3
> >
> > Or you can read in the list of computer names from an OU which is also
> > on the same link in my blog.
> >
> >
> > Leon wrote:
> >> Sorry James,
> >>
> >> Misunderstanding. I meant if you had a script that will audit a PC
> >> (installed software, memory, CPU) and append all this in to the Excel or
> >> MDB
> >> file.
> >>
> >> Kind regards,
> >> "james chong" <jamestechman@gmail.com> wrote in message
> >> news:1164378980.605655.281090@h54g2000cwb.googlegroups.com...
> >> > Sure, here is one that will do pst's just change the file extension.
> >> >
> >> > Exchange: Search Network For PST Files
> >> > http://msexchangetips.blogspot.com/2006/09/exchange-search-network-for-pst-files.html
> >> >
> >> > James Chong
> >> >
> >> > Leon wrote:
> >> >> Do you knowof any Script that eill audit PC's on the network to a .mdb
> >> >> or
> >> >> excel file.
> >> >>
> >> >> Kind regards,
> >> >>
> >> >>
> >> >> Leon.
> >> >> "james chong" <jamestechman@gmail.com> wrote in message
> >> >> news:1164222390.097886.33450@h48g2000cwc.googlegroups.com...
> >> >> > You might find this useful
> >> >> >
> >> >> > Mail-Box Size Report Script and Database
> >> >> > http://www.outlookexchange.com/articles/glenscales/mreport1.asp
> >> >> >
> >> >> > Glen Scales MVP has a number of good management scripts that you can
> >> >> > find at
> >> >> >
> >> >> > http://www.outlookexchange.com/articles/glenscales/default.asp
> >> >> >
> >> >> >
> >> >> > James Chong
> >> >> >
> >> >> >
> >> >> >
> >> >> > Leon wrote:
> >> >> >> James,
> >> >> >>
> >> >> >> This is fantastic. if you ahve any more usefull scripts that you
> >> >> >> dont
> >> >> >> mind
> >> >> >> sharing please let me know.
> >> >> >> You are a credit to Newsgroup.
> >> >> >>
> >> >> >>
> >> >> >> Thanks again.
> >> >> >>
> >> >> >>
> >> >> >> "james chong" <jamestechman@gmail.com> wrote in message
> >> >> >> news:1164215675.226087.252020@f16g2000cwb.googlegroups.com...
> >> >> >> > Try here.
> >> >> >> >
> >> >> >> >
> >> >> >> > List Exchange Mailbox Information
> >> >> >> > http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem019.mspx
> >> >> >> >
> >> >> >> > James Chong
> >> >> >> >
> >> >> >> > Leon wrote:
> >> >> >> >> Hi All,
> >> >> >> >>
> >> >> >> >> I have a need for a script that will list all the mailboxes from
> >> >> >> >> all
> >> >> >> >> of
> >> >> >> >> the
> >> >> >> >> Exchange servers (we have 20 in the same organisation) and there
> >> >> >> >> size
> >> >> >> >> in
> >> >> >> >> excel spreadsheet.  Do you know where I could get one from.
> >> >> >> >>
> >> >> >> >> Thanks.
> >> >> >> >
> >> >> >
> >> >
> >

0
jamestechman (1266)
11/24/2006 5:52:18 PM
"Leon" <Lion@hotmail.com> wrote:

>I will start from the beginning sorry about this.  I have 500 PC around 
>world and need to Audit them all there is a DC at each office and I can 
>access each PC from the my location.  I need the script that will Audit all 
>the PC's CPU, HDD, Comp Name, User logged on, Software installed etc. and 
>load this in to a CSV or xls or mdb file.

What about Systems Managent Server (or whatever they're calling the
new release)?


-- 
Rich Matheisen
MCSE+I, Exchange MVP
MS Exchange FAQ at http://www.swinc.com/resource/exch_faq.htm
Don't send mail to this address mailto:h.pott@getronics.com
Or to these, either: mailto:h.pott@pinkroccade.com mailto:melvin.mcphucknuckle@getronics.com mailto:melvin.mcphucknuckle@pinkroccade.com
0
richnews (7316)
11/24/2006 7:20:05 PM
Hi James,
Did you manage to test the my script.  by replacing the txt with csv makes 
no diference to the format of the text.

Thanks.
"james chong" <jamestechman@gmail.com> wrote in message 
news:1164390738.678595.32200@m7g2000cwm.googlegroups.com...
> Replace all the .txt in your script to .csv. Then when you run the
> script
>
> c:cscript yourscript.vbs computer1 comptuter 2 computer 3
>
> It should pipe it into the same csv file. Let me know if it doesn't
> work, I am not able to test your script now but can later.
>
> James Chong
>
> Leon wrote:
>> Hi James,
>>
>> I will start from the beginning sorry about this.  I have 500 PC around
>> world and need to Audit them all there is a DC at each office and I can
>> access each PC from the my location.  I need the script that will Audit 
>> all
>> the PC's CPU, HDD, Comp Name, User logged on, Software installed etc. and
>> load this in to a CSV or xls or mdb file.
>>
>> I had a go with your script but I get an error saying Next expected at 
>> the
>> last line.
>>
>> I have a script that will Audit the machine and dump a txt file to the
>> \\server\share but I need it to be a CSV so I  can import it in to a 
>> excel
>> and don't want to (end up with 500 CSV files that I have to manually 
>> import
>> (but that's not a big problem))
>>
>> Below is the script that I have.
>>
>>
>> *********************************************************
>> Dim GetCurrentDate ,filext ,oshell
>>
>> Set oShell = WScript.CreateObject ("WSCript.shell")
>> oShell.run "net time \\domain.local/set /y"
>> '' change DCname to your domain controller name if you want to syncronize
>> your time with your DC
>> Set oShell = Nothing
>>
>>
>> strComputer = "."
>> const HKEY_LOCAL_MACHINE = &H80000002
>> On Error Resume Next
>>
>> '' ************************************
>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>> "\root\cimv2")
>> Set colItems = objWMIService.ExecQuery("Select * from
>> Win32_ComputerSystem",,48)
>> For Each objItem In colItems
>>     cComputerName = objItem.Caption
>>  cloginname =  objItem.UserName
>>     cManufacturer = objItem.Manufacturer
>>  cModel = objItem.Model
>> Next
>>
>> Set WshNetwork = WScript.CreateObject("WScript.Network")
>> cUserName = WshNetwork.UserName
>> Set UserObj = GetObject("WinNT://domain.local/"&WshNetwork.UserName)
>> '' change domain to your domain name w/o .com
>> strDisplayName = UserObj.Get("FullName")
>> strlastlogin = UserObj.Get("LastLogin")
>> pos = instrrev(cloginname,"\",-1)
>> clname1 = mid(cloginname,pos+1 ,len(cloginname))
>>
>> Set WshShell = WScript.CreateObject("WScript.Shell")
>> Set WshSysEnv = WshShell.Environment("process")
>> windir = WshSysEnv("WINDIR")
>>
>> Set objFSO = CreateObject("Scripting.FileSystemObject")
>> If not objFSO.FolderExists(windir & "\audit") Then
>> '' change \sharedfolder to any name , this is where the report will be 
>> save
>>     Set objFolder = objFSO.CreateFolder(windir & "\audit")
>> End If
>>
>>
>> Set objFSO = CreateObject("Scripting.FileSystemObject")
>> Set objTextFile = objFSO.CreateTextFile(windir & "\audit\" & 
>> cComputerName &
>> ".txt", True)
>> objTextFile.WriteLine "Date: " & Date  & vbTab  & Time
>> objTextFile.WriteLine "User Name: " &  clname1
>> Set UserObj = GetObject("WinNT://group.abercrombiekent.local/"&clname1)
>> ''change domainname to your domain name
>>
>> strDisplayName = UserObj.Get("FullName")
>> objTextFile.WriteLine "Full Name: " & strDisplayName
>> '' objTextFile.WriteLine "Employee Number: "
>> objTextFile.WriteLine "Computer Name: " & cComputerName
>>
>> ''************************
>> Set objWMIService = GetObject("winmgmts:" & "!\\" & strComputer &
>> "\root\cimv2")
>> Set colAdapters = objWMIService.ExecQuery("Select * from
>> Win32_NetworkAdapterConfiguration Where IPEnabled = True")
>> For Each objAdapter in colAdapters
>>  objTextFile.WriteLine "IP address: " & objAdapter.IPAddress(i)
>>    objTextFile.WriteLine "DNS Domain: " & objAdapter.DNSDomain
>> Next
>>
>> ''****************
>> '' Get OS Details
>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>> "\root\cimv2")
>> Set colItems = objWMIService.ExecQuery("Select * from
>> Win32_OperatingSystem",,48)
>> For Each objItem In colItems
>>  cOSs = objItem.Name
>>  pos = InStr(1, cOsS,"|",1)
>>  cOS1 = left(cOSs,pos-1)
>>  objTextFile.WriteLine  "Operating System: " &   cOS1  & "   " &
>> objItem.CSDVersion
>>  TotalVisibleMemory = 
>> FormatNumber(objItem.TotalVisibleMemorySize/1024,0)
>>
>> Next
>>
>> ''****************
>> objTextFile.WriteLine "Manufacturer:  " & cManufacturer
>> objTextFile.WriteLine "Model:  " & cModel
>>
>> ''****************
>> ''Get BIOS Details
>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>> "\root\cimv2")
>> Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48)
>> For Each objItem In colItems
>>        objTextFile.WriteLine "Serial Number: " & objItem.SerialNumber
>> Next
>>
>> ''**********************************
>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>> "\root\cimv2")
>> Set colItems = objWMIService.ExecQuery("Select * from 
>> Win32_Processor",,48)
>> For Each objItem in colItems
>>      objTextFile.WriteLine "CPU: " & trim(objItem.Name) & "  " &
>> objItem.CurrentClockSpeed & " MHz"
>> Next
>>
>> ''**************************************
>> objTextFile.WriteLine "Memory: "  & TotalVisibleMemory  & " MB"
>>
>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>> "\root\cimv2")
>> Set colItems = objWMIService.ExecQuery("Select * from
>> Win32_LogicalDisk",,48)
>> For Each objItem in colItems
>>  ndisktype = objItem.DriveType
>>     If ndisktype = 3 Then
>>  objTextFile.WriteLine "Disk: " & objItem.Caption
>>      objTextFile.WriteLine "Size: " & objItem.Size
>>      objTextFile.WriteLine "FreeSpace: " & objItem.FreeSpace
>>     End If
>>     If ndisktype = 5 Then
>>      objTextFile.WriteLine "CD Drive: " & objItem.Caption
>>     End If
>> Next
>>
>> objTextFile.WriteLine "Softwares:   *****Programs found in Control Panel
>> Add/Remove *********** "
>>
>> Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"
>> &strComputer & "\root\default:StdRegProv")
>>
>> strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
>> oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
>>
>> For Each subkey In arrSubKeys
>>     UnistallValue = ""
>>     DisplayValue = ""
>>     strKeyPath1 = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" 
>> &
>> subkey
>>     oReg.EnumValues HKEY_LOCAL_MACHINE, strKeyPath1, arrValueNames ,
>> arrValueTypes
>>
>>     If Not Isnull(arrValueTypes) Then
>>  For i = 0 To UBOUND(arrValueNames)
>>   If arrValueNames(i) = "DisplayName" Then
>>              oReg.GetStringValue
>> HKEY_LOCAL_MACHINE,strKeyPath1,arrValueNames(i),strValue
>>                   DisplayValue = strValue
>>   End if
>>   If arrValueNames(i) = "UninstallString" Then
>>              oReg.GetStringValue
>> HKEY_LOCAL_MACHINE,strKeyPath1,arrValueNames(i),strValue
>>                   UnistallValue = strValue
>>   End if
>>  Next
>>  IF UnistallValue <> "" AND DisplayValue <> "" THEN
>>          objTextFile.WriteLine "Software:  " & DisplayValue ''  & vbtab &
>> UnistallValue
>>     End If
>>   End If
>> Next
>>
>> objTextFile.Close
>> cfullpath = windir & "\audit\" & cComputerName & ".txt"
>>
>> servfpath = "\\server\share\" & cComputerName & ".txt"
>> ''modify \\servername\sharedfolder$\serverfolder\ to your servername &
>> shared folder
>> '' copy the report to the shared folder in the server
>>
>> ''Set WshShell = WScript.CreateObject("WScript.Shell")
>> ''Return = WshShell.Run("notepad " & cfullpath, 1, true)
>>
>> Set fso = CreateObject("Scripting.FileSystemObject")
>> ''Set objFSO = CreateObject("Scripting.FileSystemObject")
>>
>> '' if the report file exist in the server, rename the file
>> If fso.FileExists(servfpath) Then
>>  GetCurrentDate = FormatDateTime(Date, 2)
>>  '' filext = Replace(GetCurrentDate, "/", "-")
>>   MyString1 = Replace(now, "/", "-")
>>    MyString2 = Replace(MyString1 , ":", "")
>>   filext = Replace(MyString2 , " ", "-")
>>
>>  FSO.MoveFile servfpath  , "\\server\share\" & cComputerName & "." & 
>> filext
>> End If
>>
>> destFile = "\\server\share\"
>> fso.CopyFile cfullpath ,destFile,True
>> Set fso = Nothing
>> WScript.Quit
>> ****************************************************
>>
>>
>>  Thanks for your great help.
>>
>>
>> "james chong" <jamestechman@gmail.com> wrote in message
>> news:1164385789.128090.40630@f16g2000cwb.googlegroups.com...
>> > Not a problem,
>> >
>> > The following will get say a list of computers proc info from the win32
>> > baseboard class. To query other things like memory, hd etc, you can get
>> > the class names here and just insert the same line under this line in
>> > the script below.
>> >
>> > WMI HW class names
>> > http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true
>> >
>> > Add more under this line in the script
>> > Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")
>> >
>> >
>> > ------------------------------------------------------------------------------------------------------------------------------------------
>> >
>> > strComputer = "."
>> > Set objWMIService = GetObject("winmgmts:\\" & strComputer &
>> > "\root\cimv2")
>> >
>> > For Each objItem in colItems
>> >
>> >
>> > strComputer = "."
>> >
>> > Set objWMIService = GetObject("winmgmts:\\" & strComputer &
>> > "\root\cimv2")
>> > Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")
>> >
>> > Set fso = CreateObject("Scripting.FileSystemObject")
>> >
>> > set wfile = fso.opentextfile("c:\test.csv",2,true)
>> >
>> > For Each objFile in colFiles
>> >
>> > Wfile.writeline(strComputer & " " & objFile.Drive & " " & objFile.Path
>> > & " " & objFile.FileName & "." & objFile.Extension & " " &
>> > objFile.FileSize)
>> >
>> > Next
>> >
>> >
>> > ----------------------------------------------------------------------------------------------------------------------------------
>> > Then type,
>> > C:\>cscript searchpst.vbs computer1 computer2 computer3
>> >
>> > Or you can read in the list of computer names from an OU which is also
>> > on the same link in my blog.
>> >
>> >
>> > Leon wrote:
>> >> Sorry James,
>> >>
>> >> Misunderstanding. I meant if you had a script that will audit a PC
>> >> (installed software, memory, CPU) and append all this in to the Excel 
>> >> or
>> >> MDB
>> >> file.
>> >>
>> >> Kind regards,
>> >> "james chong" <jamestechman@gmail.com> wrote in message
>> >> news:1164378980.605655.281090@h54g2000cwb.googlegroups.com...
>> >> > Sure, here is one that will do pst's just change the file extension.
>> >> >
>> >> > Exchange: Search Network For PST Files
>> >> > http://msexchangetips.blogspot.com/2006/09/exchange-search-network-for-pst-files.html
>> >> >
>> >> > James Chong
>> >> >
>> >> > Leon wrote:
>> >> >> Do you knowof any Script that eill audit PC's on the network to a 
>> >> >> .mdb
>> >> >> or
>> >> >> excel file.
>> >> >>
>> >> >> Kind regards,
>> >> >>
>> >> >>
>> >> >> Leon.
>> >> >> "james chong" <jamestechman@gmail.com> wrote in message
>> >> >> news:1164222390.097886.33450@h48g2000cwc.googlegroups.com...
>> >> >> > You might find this useful
>> >> >> >
>> >> >> > Mail-Box Size Report Script and Database
>> >> >> > http://www.outlookexchange.com/articles/glenscales/mreport1.asp
>> >> >> >
>> >> >> > Glen Scales MVP has a number of good management scripts that you 
>> >> >> > can
>> >> >> > find at
>> >> >> >
>> >> >> > http://www.outlookexchange.com/articles/glenscales/default.asp
>> >> >> >
>> >> >> >
>> >> >> > James Chong
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > Leon wrote:
>> >> >> >> James,
>> >> >> >>
>> >> >> >> This is fantastic. if you ahve any more usefull scripts that you
>> >> >> >> dont
>> >> >> >> mind
>> >> >> >> sharing please let me know.
>> >> >> >> You are a credit to Newsgroup.
>> >> >> >>
>> >> >> >>
>> >> >> >> Thanks again.
>> >> >> >>
>> >> >> >>
>> >> >> >> "james chong" <jamestechman@gmail.com> wrote in message
>> >> >> >> news:1164215675.226087.252020@f16g2000cwb.googlegroups.com...
>> >> >> >> > Try here.
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > List Exchange Mailbox Information
>> >> >> >> > http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem019.mspx
>> >> >> >> >
>> >> >> >> > James Chong
>> >> >> >> >
>> >> >> >> > Leon wrote:
>> >> >> >> >> Hi All,
>> >> >> >> >>
>> >> >> >> >> I have a need for a script that will list all the mailboxes 
>> >> >> >> >> from
>> >> >> >> >> all
>> >> >> >> >> of
>> >> >> >> >> the
>> >> >> >> >> Exchange servers (we have 20 in the same organisation) and 
>> >> >> >> >> there
>> >> >> >> >> size
>> >> >> >> >> in
>> >> >> >> >> excel spreadsheet.  Do you know where I could get one from.
>> >> >> >> >>
>> >> >> >> >> Thanks.
>> >> >> >> >
>> >> >> >
>> >> >
>> >
> 


0
Lion1 (14)
11/27/2006 4:25:21 PM
While not a script and not free, (but inexpensive), Track-IT 7.0 does 
exactly what you want, (automatically audit all computers, etc. - 'very 
comprehensive!), and will generate reports. More info here: 
http://www.numarasoftware.com/

John

"Leon" <Lion@hotmail.com> wrote in message 
news:OXHv8u%23DHHA.4668@TK2MSFTNGP03.phx.gbl...
> Hi James,
>
> I will start from the beginning sorry about this.  I have 500 PC around 
> world and need to Audit them all there is a DC at each office and I can 
> access each PC from the my location.  I need the script that will Audit 
> all the PC's CPU, HDD, Comp Name, User logged on, Software installed etc. 
> and load this in to a CSV or xls or mdb file.
>
> I had a go with your script but I get an error saying Next expected at the 
> last line.
>
> I have a script that will Audit the machine and dump a txt file to the 
> \\server\share but I need it to be a CSV so I  can import it in to a excel 
> and don't want to (end up with 500 CSV files that I have to manually 
> import (but that's not a big problem))
>
> Below is the script that I have.
>
>
> *********************************************************
> Dim GetCurrentDate ,filext ,oshell
>
> Set oShell = WScript.CreateObject ("WSCript.shell")
> oShell.run "net time \\domain.local/set /y"
> '' change DCname to your domain controller name if you want to syncronize
> your time with your DC
> Set oShell = Nothing
>
>
> strComputer = "."
> const HKEY_LOCAL_MACHINE = &H80000002
> On Error Resume Next
>
> '' ************************************
> Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> Set colItems = objWMIService.ExecQuery("Select * from
> Win32_ComputerSystem",,48)
> For Each objItem In colItems
>    cComputerName = objItem.Caption
> cloginname =  objItem.UserName
>    cManufacturer = objItem.Manufacturer
> cModel = objItem.Model
> Next
>
> Set WshNetwork = WScript.CreateObject("WScript.Network")
> cUserName = WshNetwork.UserName
> Set UserObj = GetObject("WinNT://domain.local/"&WshNetwork.UserName)
> '' change domain to your domain name w/o .com
> strDisplayName = UserObj.Get("FullName")
> strlastlogin = UserObj.Get("LastLogin")
> pos = instrrev(cloginname,"\",-1)
> clname1 = mid(cloginname,pos+1 ,len(cloginname))
>
> Set WshShell = WScript.CreateObject("WScript.Shell")
> Set WshSysEnv = WshShell.Environment("process")
> windir = WshSysEnv("WINDIR")
>
> Set objFSO = CreateObject("Scripting.FileSystemObject")
> If not objFSO.FolderExists(windir & "\audit") Then
> '' change \sharedfolder to any name , this is where the report will be 
> save
>    Set objFolder = objFSO.CreateFolder(windir & "\audit")
> End If
>
>
> Set objFSO = CreateObject("Scripting.FileSystemObject")
> Set objTextFile = objFSO.CreateTextFile(windir & "\audit\" & cComputerName 
> &
> ".txt", True)
> objTextFile.WriteLine "Date: " & Date  & vbTab  & Time
> objTextFile.WriteLine "User Name: " &  clname1
> Set UserObj = GetObject("WinNT://group.abercrombiekent.local/"&clname1)
> ''change domainname to your domain name
>
> strDisplayName = UserObj.Get("FullName")
> objTextFile.WriteLine "Full Name: " & strDisplayName
> '' objTextFile.WriteLine "Employee Number: "
> objTextFile.WriteLine "Computer Name: " & cComputerName
>
> ''************************
> Set objWMIService = GetObject("winmgmts:" & "!\\" & strComputer &
> "\root\cimv2")
> Set colAdapters = objWMIService.ExecQuery("Select * from
> Win32_NetworkAdapterConfiguration Where IPEnabled = True")
> For Each objAdapter in colAdapters
> objTextFile.WriteLine "IP address: " & objAdapter.IPAddress(i)
>   objTextFile.WriteLine "DNS Domain: " & objAdapter.DNSDomain
> Next
>
> ''****************
> '' Get OS Details
> Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> Set colItems = objWMIService.ExecQuery("Select * from
> Win32_OperatingSystem",,48)
> For Each objItem In colItems
> cOSs = objItem.Name
> pos = InStr(1, cOsS,"|",1)
> cOS1 = left(cOSs,pos-1)
> objTextFile.WriteLine  "Operating System: " &   cOS1  & "   " &
> objItem.CSDVersion
> TotalVisibleMemory =  FormatNumber(objItem.TotalVisibleMemorySize/1024,0)
>
> Next
>
> ''****************
> objTextFile.WriteLine "Manufacturer:  " & cManufacturer
> objTextFile.WriteLine "Model:  " & cModel
>
> ''****************
> ''Get BIOS Details
> Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48)
> For Each objItem In colItems
>       objTextFile.WriteLine "Serial Number: " & objItem.SerialNumber
> Next
>
> ''**********************************
> Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> Set colItems = objWMIService.ExecQuery("Select * from 
> Win32_Processor",,48)
> For Each objItem in colItems
>     objTextFile.WriteLine "CPU: " & trim(objItem.Name) & "  " &
> objItem.CurrentClockSpeed & " MHz"
> Next
>
> ''**************************************
> objTextFile.WriteLine "Memory: "  & TotalVisibleMemory  & " MB"
>
> Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> Set colItems = objWMIService.ExecQuery("Select * from
> Win32_LogicalDisk",,48)
> For Each objItem in colItems
> ndisktype = objItem.DriveType
>    If ndisktype = 3 Then
> objTextFile.WriteLine "Disk: " & objItem.Caption
>     objTextFile.WriteLine "Size: " & objItem.Size
>     objTextFile.WriteLine "FreeSpace: " & objItem.FreeSpace
>    End If
>    If ndisktype = 5 Then
>     objTextFile.WriteLine "CD Drive: " & objItem.Caption
>    End If
> Next
>
> objTextFile.WriteLine "Softwares:   *****Programs found in Control Panel
> Add/Remove *********** "
>
> Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"
> &strComputer & "\root\default:StdRegProv")
>
> strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
> oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
>
> For Each subkey In arrSubKeys
>    UnistallValue = ""
>    DisplayValue = ""
>    strKeyPath1 = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" &
> subkey
>    oReg.EnumValues HKEY_LOCAL_MACHINE, strKeyPath1, arrValueNames ,
> arrValueTypes
>
>    If Not Isnull(arrValueTypes) Then
> For i = 0 To UBOUND(arrValueNames)
>  If arrValueNames(i) = "DisplayName" Then
>             oReg.GetStringValue
> HKEY_LOCAL_MACHINE,strKeyPath1,arrValueNames(i),strValue
>                  DisplayValue = strValue
>  End if
>  If arrValueNames(i) = "UninstallString" Then
>             oReg.GetStringValue
> HKEY_LOCAL_MACHINE,strKeyPath1,arrValueNames(i),strValue
>                  UnistallValue = strValue
>  End if
> Next
> IF UnistallValue <> "" AND DisplayValue <> "" THEN
>         objTextFile.WriteLine "Software:  " & DisplayValue ''  & vbtab &
> UnistallValue
>    End If
>  End If
> Next
>
> objTextFile.Close
> cfullpath = windir & "\audit\" & cComputerName & ".txt"
>
> servfpath = "\\server\share\" & cComputerName & ".txt"
> ''modify \\servername\sharedfolder$\serverfolder\ to your servername &
> shared folder
> '' copy the report to the shared folder in the server
>
> ''Set WshShell = WScript.CreateObject("WScript.Shell")
> ''Return = WshShell.Run("notepad " & cfullpath, 1, true)
>
> Set fso = CreateObject("Scripting.FileSystemObject")
> ''Set objFSO = CreateObject("Scripting.FileSystemObject")
>
> '' if the report file exist in the server, rename the file
> If fso.FileExists(servfpath) Then
> GetCurrentDate = FormatDateTime(Date, 2)
> '' filext = Replace(GetCurrentDate, "/", "-")
>  MyString1 = Replace(now, "/", "-")
>   MyString2 = Replace(MyString1 , ":", "")
>  filext = Replace(MyString2 , " ", "-")
>
> FSO.MoveFile servfpath  , "\\server\share\" & cComputerName & "." & filext
> End If
>
> destFile = "\\server\share\"
> fso.CopyFile cfullpath ,destFile,True
> Set fso = Nothing
> WScript.Quit
> ****************************************************
>
>
> Thanks for your great help.
>
>
> "james chong" <jamestechman@gmail.com> wrote in message 
> news:1164385789.128090.40630@f16g2000cwb.googlegroups.com...
>> Not a problem,
>>
>> The following will get say a list of computers proc info from the win32
>> baseboard class. To query other things like memory, hd etc, you can get
>> the class names here and just insert the same line under this line in
>> the script below.
>>
>> WMI HW class names
>> http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true
>>
>> Add more under this line in the script
>> Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")
>>
>>
>> ------------------------------------------------------------------------------------------------------------------------------------------
>>
>> strComputer = "."
>> Set objWMIService = GetObject("winmgmts:\\" & strComputer &
>> "\root\cimv2")
>>
>> For Each objItem in colItems
>>
>>
>> strComputer = "."
>>
>> Set objWMIService = GetObject("winmgmts:\\" & strComputer &
>> "\root\cimv2")
>> Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")
>>
>> Set fso = CreateObject("Scripting.FileSystemObject")
>>
>> set wfile = fso.opentextfile("c:\test.csv",2,true)
>>
>> For Each objFile in colFiles
>>
>> Wfile.writeline(strComputer & " " & objFile.Drive & " " & objFile.Path
>> & " " & objFile.FileName & "." & objFile.Extension & " " &
>> objFile.FileSize)
>>
>> Next
>>
>>
>> ----------------------------------------------------------------------------------------------------------------------------------
>> Then type,
>> C:\>cscript searchpst.vbs computer1 computer2 computer3
>>
>> Or you can read in the list of computer names from an OU which is also
>> on the same link in my blog.
>>
>>
>> Leon wrote:
>>> Sorry James,
>>>
>>> Misunderstanding. I meant if you had a script that will audit a PC
>>> (installed software, memory, CPU) and append all this in to the Excel or 
>>> MDB
>>> file.
>>>
>>> Kind regards,
>>> "james chong" <jamestechman@gmail.com> wrote in message
>>> news:1164378980.605655.281090@h54g2000cwb.googlegroups.com...
>>> > Sure, here is one that will do pst's just change the file extension.
>>> >
>>> > Exchange: Search Network For PST Files
>>> > http://msexchangetips.blogspot.com/2006/09/exchange-search-network-for-pst-files.html
>>> >
>>> > James Chong
>>> >
>>> > Leon wrote:
>>> >> Do you knowof any Script that eill audit PC's on the network to a 
>>> >> .mdb or
>>> >> excel file.
>>> >>
>>> >> Kind regards,
>>> >>
>>> >>
>>> >> Leon.
>>> >> "james chong" <jamestechman@gmail.com> wrote in message
>>> >> news:1164222390.097886.33450@h48g2000cwc.googlegroups.com...
>>> >> > You might find this useful
>>> >> >
>>> >> > Mail-Box Size Report Script and Database
>>> >> > http://www.outlookexchange.com/articles/glenscales/mreport1.asp
>>> >> >
>>> >> > Glen Scales MVP has a number of good management scripts that you 
>>> >> > can
>>> >> > find at
>>> >> >
>>> >> > http://www.outlookexchange.com/articles/glenscales/default.asp
>>> >> >
>>> >> >
>>> >> > James Chong
>>> >> >
>>> >> >
>>> >> >
>>> >> > Leon wrote:
>>> >> >> James,
>>> >> >>
>>> >> >> This is fantastic. if you ahve any more usefull scripts that you 
>>> >> >> dont
>>> >> >> mind
>>> >> >> sharing please let me know.
>>> >> >> You are a credit to Newsgroup.
>>> >> >>
>>> >> >>
>>> >> >> Thanks again.
>>> >> >>
>>> >> >>
>>> >> >> "james chong" <jamestechman@gmail.com> wrote in message
>>> >> >> news:1164215675.226087.252020@f16g2000cwb.googlegroups.com...
>>> >> >> > Try here.
>>> >> >> >
>>> >> >> >
>>> >> >> > List Exchange Mailbox Information
>>> >> >> > http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem019.mspx
>>> >> >> >
>>> >> >> > James Chong
>>> >> >> >
>>> >> >> > Leon wrote:
>>> >> >> >> Hi All,
>>> >> >> >>
>>> >> >> >> I have a need for a script that will list all the mailboxes 
>>> >> >> >> from
>>> >> >> >> all
>>> >> >> >> of
>>> >> >> >> the
>>> >> >> >> Exchange servers (we have 20 in the same organisation) and 
>>> >> >> >> there
>>> >> >> >> size
>>> >> >> >> in
>>> >> >> >> excel spreadsheet.  Do you know where I could get one from.
>>> >> >> >>
>>> >> >> >> Thanks.
>>> >> >> >
>>> >> >
>>> >
>>
>
> 


0
John
11/27/2006 8:02:34 PM
I will try to look into it. Leon brought up a good point there are a
number of third party apps that can do this. One that comes to mind is
hyena, I believe a trial gives you full functionality for 30 days.

James Chong

Leon wrote:
> Hi James,
> Did you manage to test the my script.  by replacing the txt with csv makes
> no diference to the format of the text.
>
> Thanks.
> "james chong" <jamestechman@gmail.com> wrote in message
> news:1164390738.678595.32200@m7g2000cwm.googlegroups.com...
> > Replace all the .txt in your script to .csv. Then when you run the
> > script
> >
> > c:cscript yourscript.vbs computer1 comptuter 2 computer 3
> >
> > It should pipe it into the same csv file. Let me know if it doesn't
> > work, I am not able to test your script now but can later.
> >
> > James Chong
> >
> > Leon wrote:
> >> Hi James,
> >>
> >> I will start from the beginning sorry about this.  I have 500 PC around
> >> world and need to Audit them all there is a DC at each office and I can
> >> access each PC from the my location.  I need the script that will Audit
> >> all
> >> the PC's CPU, HDD, Comp Name, User logged on, Software installed etc. and
> >> load this in to a CSV or xls or mdb file.
> >>
> >> I had a go with your script but I get an error saying Next expected at
> >> the
> >> last line.
> >>
> >> I have a script that will Audit the machine and dump a txt file to the
> >> \\server\share but I need it to be a CSV so I  can import it in to a
> >> excel
> >> and don't want to (end up with 500 CSV files that I have to manually
> >> import
> >> (but that's not a big problem))
> >>
> >> Below is the script that I have.
> >>
> >>
> >> *********************************************************
> >> Dim GetCurrentDate ,filext ,oshell
> >>
> >> Set oShell = WScript.CreateObject ("WSCript.shell")
> >> oShell.run "net time \\domain.local/set /y"
> >> '' change DCname to your domain controller name if you want to syncronize
> >> your time with your DC
> >> Set oShell = Nothing
> >>
> >>
> >> strComputer = "."
> >> const HKEY_LOCAL_MACHINE = &H80000002
> >> On Error Resume Next
> >>
> >> '' ************************************
> >> Set objWMIService = GetObject("winmgmts:\\" & strComputer &
> >> "\root\cimv2")
> >> Set colItems = objWMIService.ExecQuery("Select * from
> >> Win32_ComputerSystem",,48)
> >> For Each objItem In colItems
> >>     cComputerName = objItem.Caption
> >>  cloginname =  objItem.UserName
> >>     cManufacturer = objItem.Manufacturer
> >>  cModel = objItem.Model
> >> Next
> >>
> >> Set WshNetwork = WScript.CreateObject("WScript.Network")
> >> cUserName = WshNetwork.UserName
> >> Set UserObj = GetObject("WinNT://domain.local/"&WshNetwork.UserName)
> >> '' change domain to your domain name w/o .com
> >> strDisplayName = UserObj.Get("FullName")
> >> strlastlogin = UserObj.Get("LastLogin")
> >> pos = instrrev(cloginname,"\",-1)
> >> clname1 = mid(cloginname,pos+1 ,len(cloginname))
> >>
> >> Set WshShell = WScript.CreateObject("WScript.Shell")
> >> Set WshSysEnv = WshShell.Environment("process")
> >> windir = WshSysEnv("WINDIR")
> >>
> >> Set objFSO = CreateObject("Scripting.FileSystemObject")
> >> If not objFSO.FolderExists(windir & "\audit") Then
> >> '' change \sharedfolder to any name , this is where the report will be
> >> save
> >>     Set objFolder = objFSO.CreateFolder(windir & "\audit")
> >> End If
> >>
> >>
> >> Set objFSO = CreateObject("Scripting.FileSystemObject")
> >> Set objTextFile = objFSO.CreateTextFile(windir & "\audit\" &
> >> cComputerName &
> >> ".txt", True)
> >> objTextFile.WriteLine "Date: " & Date  & vbTab  & Time
> >> objTextFile.WriteLine "User Name: " &  clname1
> >> Set UserObj = GetObject("WinNT://group.abercrombiekent.local/"&clname1)
> >> ''change domainname to your domain name
> >>
> >> strDisplayName = UserObj.Get("FullName")
> >> objTextFile.WriteLine "Full Name: " & strDisplayName
> >> '' objTextFile.WriteLine "Employee Number: "
> >> objTextFile.WriteLine "Computer Name: " & cComputerName
> >>
> >> ''************************
> >> Set objWMIService = GetObject("winmgmts:" & "!\\" & strComputer &
> >> "\root\cimv2")
> >> Set colAdapters = objWMIService.ExecQuery("Select * from
> >> Win32_NetworkAdapterConfiguration Where IPEnabled = True")
> >> For Each objAdapter in colAdapters
> >>  objTextFile.WriteLine "IP address: " & objAdapter.IPAddress(i)
> >>    objTextFile.WriteLine "DNS Domain: " & objAdapter.DNSDomain
> >> Next
> >>
> >> ''****************
> >> '' Get OS Details
> >> Set objWMIService = GetObject("winmgmts:\\" & strComputer &
> >> "\root\cimv2")
> >> Set colItems = objWMIService.ExecQuery("Select * from
> >> Win32_OperatingSystem",,48)
> >> For Each objItem In colItems
> >>  cOSs = objItem.Name
> >>  pos = InStr(1, cOsS,"|",1)
> >>  cOS1 = left(cOSs,pos-1)
> >>  objTextFile.WriteLine  "Operating System: " &   cOS1  & "   " &
> >> objItem.CSDVersion
> >>  TotalVisibleMemory =
> >> FormatNumber(objItem.TotalVisibleMemorySize/1024,0)
> >>
> >> Next
> >>
> >> ''****************
> >> objTextFile.WriteLine "Manufacturer:  " & cManufacturer
> >> objTextFile.WriteLine "Model:  " & cModel
> >>
> >> ''****************
> >> ''Get BIOS Details
> >> Set objWMIService = GetObject("winmgmts:\\" & strComputer &
> >> "\root\cimv2")
> >> Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48)
> >> For Each objItem In colItems
> >>        objTextFile.WriteLine "Serial Number: " & objItem.SerialNumber
> >> Next
> >>
> >> ''**********************************
> >> Set objWMIService = GetObject("winmgmts:\\" & strComputer &
> >> "\root\cimv2")
> >> Set colItems = objWMIService.ExecQuery("Select * from
> >> Win32_Processor",,48)
> >> For Each objItem in colItems
> >>      objTextFile.WriteLine "CPU: " & trim(objItem.Name) & "  " &
> >> objItem.CurrentClockSpeed & " MHz"
> >> Next
> >>
> >> ''**************************************
> >> objTextFile.WriteLine "Memory: "  & TotalVisibleMemory  & " MB"
> >>
> >> Set objWMIService = GetObject("winmgmts:\\" & strComputer &
> >> "\root\cimv2")
> >> Set colItems = objWMIService.ExecQuery("Select * from
> >> Win32_LogicalDisk",,48)
> >> For Each objItem in colItems
> >>  ndisktype = objItem.DriveType
> >>     If ndisktype = 3 Then
> >>  objTextFile.WriteLine "Disk: " & objItem.Caption
> >>      objTextFile.WriteLine "Size: " & objItem.Size
> >>      objTextFile.WriteLine "FreeSpace: " & objItem.FreeSpace
> >>     End If
> >>     If ndisktype = 5 Then
> >>      objTextFile.WriteLine "CD Drive: " & objItem.Caption
> >>     End If
> >> Next
> >>
> >> objTextFile.WriteLine "Softwares:   *****Programs found in Control Panel
> >> Add/Remove *********** "
> >>
> >> Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"
> >> &strComputer & "\root\default:StdRegProv")
> >>
> >> strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
> >> oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
> >>
> >> For Each subkey In arrSubKeys
> >>     UnistallValue = ""
> >>     DisplayValue = ""
> >>     strKeyPath1 = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
> >> &
> >> subkey
> >>     oReg.EnumValues HKEY_LOCAL_MACHINE, strKeyPath1, arrValueNames ,
> >> arrValueTypes
> >>
> >>     If Not Isnull(arrValueTypes) Then
> >>  For i = 0 To UBOUND(arrValueNames)
> >>   If arrValueNames(i) = "DisplayName" Then
> >>              oReg.GetStringValue
> >> HKEY_LOCAL_MACHINE,strKeyPath1,arrValueNames(i),strValue
> >>                   DisplayValue = strValue
> >>   End if
> >>   If arrValueNames(i) = "UninstallString" Then
> >>              oReg.GetStringValue
> >> HKEY_LOCAL_MACHINE,strKeyPath1,arrValueNames(i),strValue
> >>                   UnistallValue = strValue
> >>   End if
> >>  Next
> >>  IF UnistallValue <> "" AND DisplayValue <> "" THEN
> >>          objTextFile.WriteLine "Software:  " & DisplayValue ''  & vbtab &
> >> UnistallValue
> >>     End If
> >>   End If
> >> Next
> >>
> >> objTextFile.Close
> >> cfullpath = windir & "\audit\" & cComputerName & ".txt"
> >>
> >> servfpath = "\\server\share\" & cComputerName & ".txt"
> >> ''modify \\servername\sharedfolder$\serverfolder\ to your servername &
> >> shared folder
> >> '' copy the report to the shared folder in the server
> >>
> >> ''Set WshShell = WScript.CreateObject("WScript.Shell")
> >> ''Return = WshShell.Run("notepad " & cfullpath, 1, true)
> >>
> >> Set fso = CreateObject("Scripting.FileSystemObject")
> >> ''Set objFSO = CreateObject("Scripting.FileSystemObject")
> >>
> >> '' if the report file exist in the server, rename the file
> >> If fso.FileExists(servfpath) Then
> >>  GetCurrentDate = FormatDateTime(Date, 2)
> >>  '' filext = Replace(GetCurrentDate, "/", "-")
> >>   MyString1 = Replace(now, "/", "-")
> >>    MyString2 = Replace(MyString1 , ":", "")
> >>   filext = Replace(MyString2 , " ", "-")
> >>
> >>  FSO.MoveFile servfpath  , "\\server\share\" & cComputerName & "." &
> >> filext
> >> End If
> >>
> >> destFile = "\\server\share\"
> >> fso.CopyFile cfullpath ,destFile,True
> >> Set fso = Nothing
> >> WScript.Quit
> >> ****************************************************
> >>
> >>
> >>  Thanks for your great help.
> >>
> >>
> >> "james chong" <jamestechman@gmail.com> wrote in message
> >> news:1164385789.128090.40630@f16g2000cwb.googlegroups.com...
> >> > Not a problem,
> >> >
> >> > The following will get say a list of computers proc info from the win32
> >> > baseboard class. To query other things like memory, hd etc, you can get
> >> > the class names here and just insert the same line under this line in
> >> > the script below.
> >> >
> >> > WMI HW class names
> >> > http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true
> >> >
> >> > Add more under this line in the script
> >> > Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")
> >> >
> >> >
> >> > ------------------------------------------------------------------------------------------------------------------------------------------
> >> >
> >> > strComputer = "."
> >> > Set objWMIService = GetObject("winmgmts:\\" & strComputer &
> >> > "\root\cimv2")
> >> >
> >> > For Each objItem in colItems
> >> >
> >> >
> >> > strComputer = "."
> >> >
> >> > Set objWMIService = GetObject("winmgmts:\\" & strComputer &
> >> > "\root\cimv2")
> >> > Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")
> >> >
> >> > Set fso = CreateObject("Scripting.FileSystemObject")
> >> >
> >> > set wfile = fso.opentextfile("c:\test.csv",2,true)
> >> >
> >> > For Each objFile in colFiles
> >> >
> >> > Wfile.writeline(strComputer & " " & objFile.Drive & " " & objFile.Path
> >> > & " " & objFile.FileName & "." & objFile.Extension & " " &
> >> > objFile.FileSize)
> >> >
> >> > Next
> >> >
> >> >
> >> > ----------------------------------------------------------------------------------------------------------------------------------
> >> > Then type,
> >> > C:\>cscript searchpst.vbs computer1 computer2 computer3
> >> >
> >> > Or you can read in the list of computer names from an OU which is also
> >> > on the same link in my blog.
> >> >
> >> >
> >> > Leon wrote:
> >> >> Sorry James,
> >> >>
> >> >> Misunderstanding. I meant if you had a script that will audit a PC
> >> >> (installed software, memory, CPU) and append all this in to the Excel
> >> >> or
> >> >> MDB
> >> >> file.
> >> >>
> >> >> Kind regards,
> >> >> "james chong" <jamestechman@gmail.com> wrote in message
> >> >> news:1164378980.605655.281090@h54g2000cwb.googlegroups.com...
> >> >> > Sure, here is one that will do pst's just change the file extension.
> >> >> >
> >> >> > Exchange: Search Network For PST Files
> >> >> > http://msexchangetips.blogspot.com/2006/09/exchange-search-network-for-pst-files.html
> >> >> >
> >> >> > James Chong
> >> >> >
> >> >> > Leon wrote:
> >> >> >> Do you knowof any Script that eill audit PC's on the network to a
> >> >> >> .mdb
> >> >> >> or
> >> >> >> excel file.
> >> >> >>
> >> >> >> Kind regards,
> >> >> >>
> >> >> >>
> >> >> >> Leon.
> >> >> >> "james chong" <jamestechman@gmail.com> wrote in message
> >> >> >> news:1164222390.097886.33450@h48g2000cwc.googlegroups.com...
> >> >> >> > You might find this useful
> >> >> >> >
> >> >> >> > Mail-Box Size Report Script and Database
> >> >> >> > http://www.outlookexchange.com/articles/glenscales/mreport1.asp
> >> >> >> >
> >> >> >> > Glen Scales MVP has a number of good management scripts that you
> >> >> >> > can
> >> >> >> > find at
> >> >> >> >
> >> >> >> > http://www.outlookexchange.com/articles/glenscales/default.asp
> >> >> >> >
> >> >> >> >
> >> >> >> > James Chong
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > Leon wrote:
> >> >> >> >> James,
> >> >> >> >>
> >> >> >> >> This is fantastic. if you ahve any more usefull scripts that you
> >> >> >> >> dont
> >> >> >> >> mind
> >> >> >> >> sharing please let me know.
> >> >> >> >> You are a credit to Newsgroup.
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> Thanks again.
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> "james chong" <jamestechman@gmail.com> wrote in message
> >> >> >> >> news:1164215675.226087.252020@f16g2000cwb.googlegroups.com...
> >> >> >> >> > Try here.
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > List Exchange Mailbox Information
> >> >> >> >> > http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem019.mspx
> >> >> >> >> >
> >> >> >> >> > James Chong
> >> >> >> >> >
> >> >> >> >> > Leon wrote:
> >> >> >> >> >> Hi All,
> >> >> >> >> >>
> >> >> >> >> >> I have a need for a script that will list all the mailboxes
> >> >> >> >> >> from
> >> >> >> >> >> all
> >> >> >> >> >> of
> >> >> >> >> >> the
> >> >> >> >> >> Exchange servers (we have 20 in the same organisation) and
> >> >> >> >> >> there
> >> >> >> >> >> size
> >> >> >> >> >> in
> >> >> >> >> >> excel spreadsheet.  Do you know where I could get one from.
> >> >> >> >> >>
> >> >> >> >> >> Thanks.
> >> >> >> >> >
> >> >> >> >
> >> >> >
> >> >
> >

0
jamestechman (1266)
11/27/2006 8:54:59 PM
Oh Yes this is what we had at my old place. It works but the cost is the 
decision maker.

I think I will stick with the script that I send to you.
I have a directory of around 1000 small TXT files of 5kb in size, do you 
know a script that will consolidate all the date from all 1000 in to one TXT 
file please,

Kind regards.


"John Schmidt" <johnaec@-nospam-pacbell.net> wrote in message 
news:eFqz77lEHHA.1012@TK2MSFTNGP04.phx.gbl...
> While not a script and not free, (but inexpensive), Track-IT 7.0 does 
> exactly what you want, (automatically audit all computers, etc. - 'very 
> comprehensive!), and will generate reports. More info here: 
> http://www.numarasoftware.com/
>
> John
>
> "Leon" <Lion@hotmail.com> wrote in message 
> news:OXHv8u%23DHHA.4668@TK2MSFTNGP03.phx.gbl...
>> Hi James,
>>
>> I will start from the beginning sorry about this.  I have 500 PC around 
>> world and need to Audit them all there is a DC at each office and I can 
>> access each PC from the my location.  I need the script that will Audit 
>> all the PC's CPU, HDD, Comp Name, User logged on, Software installed etc. 
>> and load this in to a CSV or xls or mdb file.
>>
>> I had a go with your script but I get an error saying Next expected at 
>> the last line.
>>
>> I have a script that will Audit the machine and dump a txt file to the 
>> \\server\share but I need it to be a CSV so I  can import it in to a 
>> excel and don't want to (end up with 500 CSV files that I have to 
>> manually import (but that's not a big problem))
>>
>> Below is the script that I have.
>>
>>
>> *********************************************************
>> Dim GetCurrentDate ,filext ,oshell
>>
>> Set oShell = WScript.CreateObject ("WSCript.shell")
>> oShell.run "net time \\domain.local/set /y"
>> '' change DCname to your domain controller name if you want to syncronize
>> your time with your DC
>> Set oShell = Nothing
>>
>>
>> strComputer = "."
>> const HKEY_LOCAL_MACHINE = &H80000002
>> On Error Resume Next
>>
>> '' ************************************
>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>> "\root\cimv2")
>> Set colItems = objWMIService.ExecQuery("Select * from
>> Win32_ComputerSystem",,48)
>> For Each objItem In colItems
>>    cComputerName = objItem.Caption
>> cloginname =  objItem.UserName
>>    cManufacturer = objItem.Manufacturer
>> cModel = objItem.Model
>> Next
>>
>> Set WshNetwork = WScript.CreateObject("WScript.Network")
>> cUserName = WshNetwork.UserName
>> Set UserObj = GetObject("WinNT://domain.local/"&WshNetwork.UserName)
>> '' change domain to your domain name w/o .com
>> strDisplayName = UserObj.Get("FullName")
>> strlastlogin = UserObj.Get("LastLogin")
>> pos = instrrev(cloginname,"\",-1)
>> clname1 = mid(cloginname,pos+1 ,len(cloginname))
>>
>> Set WshShell = WScript.CreateObject("WScript.Shell")
>> Set WshSysEnv = WshShell.Environment("process")
>> windir = WshSysEnv("WINDIR")
>>
>> Set objFSO = CreateObject("Scripting.FileSystemObject")
>> If not objFSO.FolderExists(windir & "\audit") Then
>> '' change \sharedfolder to any name , this is where the report will be 
>> save
>>    Set objFolder = objFSO.CreateFolder(windir & "\audit")
>> End If
>>
>>
>> Set objFSO = CreateObject("Scripting.FileSystemObject")
>> Set objTextFile = objFSO.CreateTextFile(windir & "\audit\" & 
>> cComputerName &
>> ".txt", True)
>> objTextFile.WriteLine "Date: " & Date  & vbTab  & Time
>> objTextFile.WriteLine "User Name: " &  clname1
>> Set UserObj = GetObject("WinNT://group.abercrombiekent.local/"&clname1)
>> ''change domainname to your domain name
>>
>> strDisplayName = UserObj.Get("FullName")
>> objTextFile.WriteLine "Full Name: " & strDisplayName
>> '' objTextFile.WriteLine "Employee Number: "
>> objTextFile.WriteLine "Computer Name: " & cComputerName
>>
>> ''************************
>> Set objWMIService = GetObject("winmgmts:" & "!\\" & strComputer &
>> "\root\cimv2")
>> Set colAdapters = objWMIService.ExecQuery("Select * from
>> Win32_NetworkAdapterConfiguration Where IPEnabled = True")
>> For Each objAdapter in colAdapters
>> objTextFile.WriteLine "IP address: " & objAdapter.IPAddress(i)
>>   objTextFile.WriteLine "DNS Domain: " & objAdapter.DNSDomain
>> Next
>>
>> ''****************
>> '' Get OS Details
>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>> "\root\cimv2")
>> Set colItems = objWMIService.ExecQuery("Select * from
>> Win32_OperatingSystem",,48)
>> For Each objItem In colItems
>> cOSs = objItem.Name
>> pos = InStr(1, cOsS,"|",1)
>> cOS1 = left(cOSs,pos-1)
>> objTextFile.WriteLine  "Operating System: " &   cOS1  & "   " &
>> objItem.CSDVersion
>> TotalVisibleMemory =  FormatNumber(objItem.TotalVisibleMemorySize/1024,0)
>>
>> Next
>>
>> ''****************
>> objTextFile.WriteLine "Manufacturer:  " & cManufacturer
>> objTextFile.WriteLine "Model:  " & cModel
>>
>> ''****************
>> ''Get BIOS Details
>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>> "\root\cimv2")
>> Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48)
>> For Each objItem In colItems
>>       objTextFile.WriteLine "Serial Number: " & objItem.SerialNumber
>> Next
>>
>> ''**********************************
>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>> "\root\cimv2")
>> Set colItems = objWMIService.ExecQuery("Select * from 
>> Win32_Processor",,48)
>> For Each objItem in colItems
>>     objTextFile.WriteLine "CPU: " & trim(objItem.Name) & "  " &
>> objItem.CurrentClockSpeed & " MHz"
>> Next
>>
>> ''**************************************
>> objTextFile.WriteLine "Memory: "  & TotalVisibleMemory  & " MB"
>>
>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>> "\root\cimv2")
>> Set colItems = objWMIService.ExecQuery("Select * from
>> Win32_LogicalDisk",,48)
>> For Each objItem in colItems
>> ndisktype = objItem.DriveType
>>    If ndisktype = 3 Then
>> objTextFile.WriteLine "Disk: " & objItem.Caption
>>     objTextFile.WriteLine "Size: " & objItem.Size
>>     objTextFile.WriteLine "FreeSpace: " & objItem.FreeSpace
>>    End If
>>    If ndisktype = 5 Then
>>     objTextFile.WriteLine "CD Drive: " & objItem.Caption
>>    End If
>> Next
>>
>> objTextFile.WriteLine "Softwares:   *****Programs found in Control Panel
>> Add/Remove *********** "
>>
>> Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"
>> &strComputer & "\root\default:StdRegProv")
>>
>> strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
>> oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
>>
>> For Each subkey In arrSubKeys
>>    UnistallValue = ""
>>    DisplayValue = ""
>>    strKeyPath1 = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" &
>> subkey
>>    oReg.EnumValues HKEY_LOCAL_MACHINE, strKeyPath1, arrValueNames ,
>> arrValueTypes
>>
>>    If Not Isnull(arrValueTypes) Then
>> For i = 0 To UBOUND(arrValueNames)
>>  If arrValueNames(i) = "DisplayName" Then
>>             oReg.GetStringValue
>> HKEY_LOCAL_MACHINE,strKeyPath1,arrValueNames(i),strValue
>>                  DisplayValue = strValue
>>  End if
>>  If arrValueNames(i) = "UninstallString" Then
>>             oReg.GetStringValue
>> HKEY_LOCAL_MACHINE,strKeyPath1,arrValueNames(i),strValue
>>                  UnistallValue = strValue
>>  End if
>> Next
>> IF UnistallValue <> "" AND DisplayValue <> "" THEN
>>         objTextFile.WriteLine "Software:  " & DisplayValue ''  & vbtab &
>> UnistallValue
>>    End If
>>  End If
>> Next
>>
>> objTextFile.Close
>> cfullpath = windir & "\audit\" & cComputerName & ".txt"
>>
>> servfpath = "\\server\share\" & cComputerName & ".txt"
>> ''modify \\servername\sharedfolder$\serverfolder\ to your servername &
>> shared folder
>> '' copy the report to the shared folder in the server
>>
>> ''Set WshShell = WScript.CreateObject("WScript.Shell")
>> ''Return = WshShell.Run("notepad " & cfullpath, 1, true)
>>
>> Set fso = CreateObject("Scripting.FileSystemObject")
>> ''Set objFSO = CreateObject("Scripting.FileSystemObject")
>>
>> '' if the report file exist in the server, rename the file
>> If fso.FileExists(servfpath) Then
>> GetCurrentDate = FormatDateTime(Date, 2)
>> '' filext = Replace(GetCurrentDate, "/", "-")
>>  MyString1 = Replace(now, "/", "-")
>>   MyString2 = Replace(MyString1 , ":", "")
>>  filext = Replace(MyString2 , " ", "-")
>>
>> FSO.MoveFile servfpath  , "\\server\share\" & cComputerName & "." & 
>> filext
>> End If
>>
>> destFile = "\\server\share\"
>> fso.CopyFile cfullpath ,destFile,True
>> Set fso = Nothing
>> WScript.Quit
>> ****************************************************
>>
>>
>> Thanks for your great help.
>>
>>
>> "james chong" <jamestechman@gmail.com> wrote in message 
>> news:1164385789.128090.40630@f16g2000cwb.googlegroups.com...
>>> Not a problem,
>>>
>>> The following will get say a list of computers proc info from the win32
>>> baseboard class. To query other things like memory, hd etc, you can get
>>> the class names here and just insert the same line under this line in
>>> the script below.
>>>
>>> WMI HW class names
>>> http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true
>>>
>>> Add more under this line in the script
>>> Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")
>>>
>>>
>>> ------------------------------------------------------------------------------------------------------------------------------------------
>>>
>>> strComputer = "."
>>> Set objWMIService = GetObject("winmgmts:\\" & strComputer &
>>> "\root\cimv2")
>>>
>>> For Each objItem in colItems
>>>
>>>
>>> strComputer = "."
>>>
>>> Set objWMIService = GetObject("winmgmts:\\" & strComputer &
>>> "\root\cimv2")
>>> Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")
>>>
>>> Set fso = CreateObject("Scripting.FileSystemObject")
>>>
>>> set wfile = fso.opentextfile("c:\test.csv",2,true)
>>>
>>> For Each objFile in colFiles
>>>
>>> Wfile.writeline(strComputer & " " & objFile.Drive & " " & objFile.Path
>>> & " " & objFile.FileName & "." & objFile.Extension & " " &
>>> objFile.FileSize)
>>>
>>> Next
>>>
>>>
>>> ----------------------------------------------------------------------------------------------------------------------------------
>>> Then type,
>>> C:\>cscript searchpst.vbs computer1 computer2 computer3
>>>
>>> Or you can read in the list of computer names from an OU which is also
>>> on the same link in my blog.
>>>
>>>
>>> Leon wrote:
>>>> Sorry James,
>>>>
>>>> Misunderstanding. I meant if you had a script that will audit a PC
>>>> (installed software, memory, CPU) and append all this in to the Excel 
>>>> or MDB
>>>> file.
>>>>
>>>> Kind regards,
>>>> "james chong" <jamestechman@gmail.com> wrote in message
>>>> news:1164378980.605655.281090@h54g2000cwb.googlegroups.com...
>>>> > Sure, here is one that will do pst's just change the file extension.
>>>> >
>>>> > Exchange: Search Network For PST Files
>>>> > http://msexchangetips.blogspot.com/2006/09/exchange-search-network-for-pst-files.html
>>>> >
>>>> > James Chong
>>>> >
>>>> > Leon wrote:
>>>> >> Do you knowof any Script that eill audit PC's on the network to a 
>>>> >> .mdb or
>>>> >> excel file.
>>>> >>
>>>> >> Kind regards,
>>>> >>
>>>> >>
>>>> >> Leon.
>>>> >> "james chong" <jamestechman@gmail.com> wrote in message
>>>> >> news:1164222390.097886.33450@h48g2000cwc.googlegroups.com...
>>>> >> > You might find this useful
>>>> >> >
>>>> >> > Mail-Box Size Report Script and Database
>>>> >> > http://www.outlookexchange.com/articles/glenscales/mreport1.asp
>>>> >> >
>>>> >> > Glen Scales MVP has a number of good management scripts that you 
>>>> >> > can
>>>> >> > find at
>>>> >> >
>>>> >> > http://www.outlookexchange.com/articles/glenscales/default.asp
>>>> >> >
>>>> >> >
>>>> >> > James Chong
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> > Leon wrote:
>>>> >> >> James,
>>>> >> >>
>>>> >> >> This is fantastic. if you ahve any more usefull scripts that you 
>>>> >> >> dont
>>>> >> >> mind
>>>> >> >> sharing please let me know.
>>>> >> >> You are a credit to Newsgroup.
>>>> >> >>
>>>> >> >>
>>>> >> >> Thanks again.
>>>> >> >>
>>>> >> >>
>>>> >> >> "james chong" <jamestechman@gmail.com> wrote in message
>>>> >> >> news:1164215675.226087.252020@f16g2000cwb.googlegroups.com...
>>>> >> >> > Try here.
>>>> >> >> >
>>>> >> >> >
>>>> >> >> > List Exchange Mailbox Information
>>>> >> >> > http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem019.mspx
>>>> >> >> >
>>>> >> >> > James Chong
>>>> >> >> >
>>>> >> >> > Leon wrote:
>>>> >> >> >> Hi All,
>>>> >> >> >>
>>>> >> >> >> I have a need for a script that will list all the mailboxes 
>>>> >> >> >> from
>>>> >> >> >> all
>>>> >> >> >> of
>>>> >> >> >> the
>>>> >> >> >> Exchange servers (we have 20 in the same organisation) and 
>>>> >> >> >> there
>>>> >> >> >> size
>>>> >> >> >> in
>>>> >> >> >> excel spreadsheet.  Do you know where I could get one from.
>>>> >> >> >>
>>>> >> >> >> Thanks.
>>>> >> >> >
>>>> >> >
>>>> >
>>>
>>
>>
>
> 


0
Lion1 (14)
11/29/2006 12:02:18 PM
here is your Key, was posted by James:

Don't even need VBScript, you can use the DOS Copy command.
Copy C:\YourDirectory\*.txt C:\SomeOtherDirectory\CombinedText.txt

Thanks James;
With Regards
Habashy


"Leon" <Lion@hotmail.com> wrote in message 
news:O9oY436EHHA.4052@TK2MSFTNGP02.phx.gbl...
> Oh Yes this is what we had at my old place. It works but the cost is the 
> decision maker.
>
> I think I will stick with the script that I send to you.
> I have a directory of around 1000 small TXT files of 5kb in size, do you 
> know a script that will consolidate all the date from all 1000 in to one 
> TXT file please,
>
> Kind regards.
>
>
> "John Schmidt" <johnaec@-nospam-pacbell.net> wrote in message 
> news:eFqz77lEHHA.1012@TK2MSFTNGP04.phx.gbl...
>> While not a script and not free, (but inexpensive), Track-IT 7.0 does 
>> exactly what you want, (automatically audit all computers, etc. - 'very 
>> comprehensive!), and will generate reports. More info here: 
>> http://www.numarasoftware.com/
>>
>> John
>>
>> "Leon" <Lion@hotmail.com> wrote in message 
>> news:OXHv8u%23DHHA.4668@TK2MSFTNGP03.phx.gbl...
>>> Hi James,
>>>
>>> I will start from the beginning sorry about this.  I have 500 PC around 
>>> world and need to Audit them all there is a DC at each office and I can 
>>> access each PC from the my location.  I need the script that will Audit 
>>> all the PC's CPU, HDD, Comp Name, User logged on, Software installed 
>>> etc. and load this in to a CSV or xls or mdb file.
>>>
>>> I had a go with your script but I get an error saying Next expected at 
>>> the last line.
>>>
>>> I have a script that will Audit the machine and dump a txt file to the 
>>> \\server\share but I need it to be a CSV so I  can import it in to a 
>>> excel and don't want to (end up with 500 CSV files that I have to 
>>> manually import (but that's not a big problem))
>>>
>>> Below is the script that I have.
>>>
>>>
>>> *********************************************************
>>> Dim GetCurrentDate ,filext ,oshell
>>>
>>> Set oShell = WScript.CreateObject ("WSCript.shell")
>>> oShell.run "net time \\domain.local/set /y"
>>> '' change DCname to your domain controller name if you want to 
>>> syncronize
>>> your time with your DC
>>> Set oShell = Nothing
>>>
>>>
>>> strComputer = "."
>>> const HKEY_LOCAL_MACHINE = &H80000002
>>> On Error Resume Next
>>>
>>> '' ************************************
>>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>>> "\root\cimv2")
>>> Set colItems = objWMIService.ExecQuery("Select * from
>>> Win32_ComputerSystem",,48)
>>> For Each objItem In colItems
>>>    cComputerName = objItem.Caption
>>> cloginname =  objItem.UserName
>>>    cManufacturer = objItem.Manufacturer
>>> cModel = objItem.Model
>>> Next
>>>
>>> Set WshNetwork = WScript.CreateObject("WScript.Network")
>>> cUserName = WshNetwork.UserName
>>> Set UserObj = GetObject("WinNT://domain.local/"&WshNetwork.UserName)
>>> '' change domain to your domain name w/o .com
>>> strDisplayName = UserObj.Get("FullName")
>>> strlastlogin = UserObj.Get("LastLogin")
>>> pos = instrrev(cloginname,"\",-1)
>>> clname1 = mid(cloginname,pos+1 ,len(cloginname))
>>>
>>> Set WshShell = WScript.CreateObject("WScript.Shell")
>>> Set WshSysEnv = WshShell.Environment("process")
>>> windir = WshSysEnv("WINDIR")
>>>
>>> Set objFSO = CreateObject("Scripting.FileSystemObject")
>>> If not objFSO.FolderExists(windir & "\audit") Then
>>> '' change \sharedfolder to any name , this is where the report will be 
>>> save
>>>    Set objFolder = objFSO.CreateFolder(windir & "\audit")
>>> End If
>>>
>>>
>>> Set objFSO = CreateObject("Scripting.FileSystemObject")
>>> Set objTextFile = objFSO.CreateTextFile(windir & "\audit\" & 
>>> cComputerName &
>>> ".txt", True)
>>> objTextFile.WriteLine "Date: " & Date  & vbTab  & Time
>>> objTextFile.WriteLine "User Name: " &  clname1
>>> Set UserObj = GetObject("WinNT://group.abercrombiekent.local/"&clname1)
>>> ''change domainname to your domain name
>>>
>>> strDisplayName = UserObj.Get("FullName")
>>> objTextFile.WriteLine "Full Name: " & strDisplayName
>>> '' objTextFile.WriteLine "Employee Number: "
>>> objTextFile.WriteLine "Computer Name: " & cComputerName
>>>
>>> ''************************
>>> Set objWMIService = GetObject("winmgmts:" & "!\\" & strComputer &
>>> "\root\cimv2")
>>> Set colAdapters = objWMIService.ExecQuery("Select * from
>>> Win32_NetworkAdapterConfiguration Where IPEnabled = True")
>>> For Each objAdapter in colAdapters
>>> objTextFile.WriteLine "IP address: " & objAdapter.IPAddress(i)
>>>   objTextFile.WriteLine "DNS Domain: " & objAdapter.DNSDomain
>>> Next
>>>
>>> ''****************
>>> '' Get OS Details
>>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>>> "\root\cimv2")
>>> Set colItems = objWMIService.ExecQuery("Select * from
>>> Win32_OperatingSystem",,48)
>>> For Each objItem In colItems
>>> cOSs = objItem.Name
>>> pos = InStr(1, cOsS,"|",1)
>>> cOS1 = left(cOSs,pos-1)
>>> objTextFile.WriteLine  "Operating System: " &   cOS1  & "   " &
>>> objItem.CSDVersion
>>> TotalVisibleMemory = 
>>> FormatNumber(objItem.TotalVisibleMemorySize/1024,0)
>>>
>>> Next
>>>
>>> ''****************
>>> objTextFile.WriteLine "Manufacturer:  " & cManufacturer
>>> objTextFile.WriteLine "Model:  " & cModel
>>>
>>> ''****************
>>> ''Get BIOS Details
>>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>>> "\root\cimv2")
>>> Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48)
>>> For Each objItem In colItems
>>>       objTextFile.WriteLine "Serial Number: " & objItem.SerialNumber
>>> Next
>>>
>>> ''**********************************
>>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>>> "\root\cimv2")
>>> Set colItems = objWMIService.ExecQuery("Select * from 
>>> Win32_Processor",,48)
>>> For Each objItem in colItems
>>>     objTextFile.WriteLine "CPU: " & trim(objItem.Name) & "  " &
>>> objItem.CurrentClockSpeed & " MHz"
>>> Next
>>>
>>> ''**************************************
>>> objTextFile.WriteLine "Memory: "  & TotalVisibleMemory  & " MB"
>>>
>>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>>> "\root\cimv2")
>>> Set colItems = objWMIService.ExecQuery("Select * from
>>> Win32_LogicalDisk",,48)
>>> For Each objItem in colItems
>>> ndisktype = objItem.DriveType
>>>    If ndisktype = 3 Then
>>> objTextFile.WriteLine "Disk: " & objItem.Caption
>>>     objTextFile.WriteLine "Size: " & objItem.Size
>>>     objTextFile.WriteLine "FreeSpace: " & objItem.FreeSpace
>>>    End If
>>>    If ndisktype = 5 Then
>>>     objTextFile.WriteLine "CD Drive: " & objItem.Caption
>>>    End If
>>> Next
>>>
>>> objTextFile.WriteLine "Softwares:   *****Programs found in Control Panel
>>> Add/Remove *********** "
>>>
>>> Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"
>>> &strComputer & "\root\default:StdRegProv")
>>>
>>> strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
>>> oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
>>>
>>> For Each subkey In arrSubKeys
>>>    UnistallValue = ""
>>>    DisplayValue = ""
>>>    strKeyPath1 = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" 
>>> &
>>> subkey
>>>    oReg.EnumValues HKEY_LOCAL_MACHINE, strKeyPath1, arrValueNames ,
>>> arrValueTypes
>>>
>>>    If Not Isnull(arrValueTypes) Then
>>> For i = 0 To UBOUND(arrValueNames)
>>>  If arrValueNames(i) = "DisplayName" Then
>>>             oReg.GetStringValue
>>> HKEY_LOCAL_MACHINE,strKeyPath1,arrValueNames(i),strValue
>>>                  DisplayValue = strValue
>>>  End if
>>>  If arrValueNames(i) = "UninstallString" Then
>>>             oReg.GetStringValue
>>> HKEY_LOCAL_MACHINE,strKeyPath1,arrValueNames(i),strValue
>>>                  UnistallValue = strValue
>>>  End if
>>> Next
>>> IF UnistallValue <> "" AND DisplayValue <> "" THEN
>>>         objTextFile.WriteLine "Software:  " & DisplayValue ''  & vbtab &
>>> UnistallValue
>>>    End If
>>>  End If
>>> Next
>>>
>>> objTextFile.Close
>>> cfullpath = windir & "\audit\" & cComputerName & ".txt"
>>>
>>> servfpath = "\\server\share\" & cComputerName & ".txt"
>>> ''modify \\servername\sharedfolder$\serverfolder\ to your servername &
>>> shared folder
>>> '' copy the report to the shared folder in the server
>>>
>>> ''Set WshShell = WScript.CreateObject("WScript.Shell")
>>> ''Return = WshShell.Run("notepad " & cfullpath, 1, true)
>>>
>>> Set fso = CreateObject("Scripting.FileSystemObject")
>>> ''Set objFSO = CreateObject("Scripting.FileSystemObject")
>>>
>>> '' if the report file exist in the server, rename the file
>>> If fso.FileExists(servfpath) Then
>>> GetCurrentDate = FormatDateTime(Date, 2)
>>> '' filext = Replace(GetCurrentDate, "/", "-")
>>>  MyString1 = Replace(now, "/", "-")
>>>   MyString2 = Replace(MyString1 , ":", "")
>>>  filext = Replace(MyString2 , " ", "-")
>>>
>>> FSO.MoveFile servfpath  , "\\server\share\" & cComputerName & "." & 
>>> filext
>>> End If
>>>
>>> destFile = "\\server\share\"
>>> fso.CopyFile cfullpath ,destFile,True
>>> Set fso = Nothing
>>> WScript.Quit
>>> ****************************************************
>>>
>>>
>>> Thanks for your great help.
>>>
>>>
>>> "james chong" <jamestechman@gmail.com> wrote in message 
>>> news:1164385789.128090.40630@f16g2000cwb.googlegroups.com...
>>>> Not a problem,
>>>>
>>>> The following will get say a list of computers proc info from the win32
>>>> baseboard class. To query other things like memory, hd etc, you can get
>>>> the class names here and just insert the same line under this line in
>>>> the script below.
>>>>
>>>> WMI HW class names
>>>> http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true
>>>>
>>>> Add more under this line in the script
>>>> Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")
>>>>
>>>>
>>>> ------------------------------------------------------------------------------------------------------------------------------------------
>>>>
>>>> strComputer = "."
>>>> Set objWMIService = GetObject("winmgmts:\\" & strComputer &
>>>> "\root\cimv2")
>>>>
>>>> For Each objItem in colItems
>>>>
>>>>
>>>> strComputer = "."
>>>>
>>>> Set objWMIService = GetObject("winmgmts:\\" & strComputer &
>>>> "\root\cimv2")
>>>> Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")
>>>>
>>>> Set fso = CreateObject("Scripting.FileSystemObject")
>>>>
>>>> set wfile = fso.opentextfile("c:\test.csv",2,true)
>>>>
>>>> For Each objFile in colFiles
>>>>
>>>> Wfile.writeline(strComputer & " " & objFile.Drive & " " & objFile.Path
>>>> & " " & objFile.FileName & "." & objFile.Extension & " " &
>>>> objFile.FileSize)
>>>>
>>>> Next
>>>>
>>>>
>>>> ----------------------------------------------------------------------------------------------------------------------------------
>>>> Then type,
>>>> C:\>cscript searchpst.vbs computer1 computer2 computer3
>>>>
>>>> Or you can read in the list of computer names from an OU which is also
>>>> on the same link in my blog.
>>>>
>>>>
>>>> Leon wrote:
>>>>> Sorry James,
>>>>>
>>>>> Misunderstanding. I meant if you had a script that will audit a PC
>>>>> (installed software, memory, CPU) and append all this in to the Excel 
>>>>> or MDB
>>>>> file.
>>>>>
>>>>> Kind regards,
>>>>> "james chong" <jamestechman@gmail.com> wrote in message
>>>>> news:1164378980.605655.281090@h54g2000cwb.googlegroups.com...
>>>>> > Sure, here is one that will do pst's just change the file extension.
>>>>> >
>>>>> > Exchange: Search Network For PST Files
>>>>> > http://msexchangetips.blogspot.com/2006/09/exchange-search-network-for-pst-files.html
>>>>> >
>>>>> > James Chong
>>>>> >
>>>>> > Leon wrote:
>>>>> >> Do you knowof any Script that eill audit PC's on the network to a 
>>>>> >> .mdb or
>>>>> >> excel file.
>>>>> >>
>>>>> >> Kind regards,
>>>>> >>
>>>>> >>
>>>>> >> Leon.
>>>>> >> "james chong" <jamestechman@gmail.com> wrote in message
>>>>> >> news:1164222390.097886.33450@h48g2000cwc.googlegroups.com...
>>>>> >> > You might find this useful
>>>>> >> >
>>>>> >> > Mail-Box Size Report Script and Database
>>>>> >> > http://www.outlookexchange.com/articles/glenscales/mreport1.asp
>>>>> >> >
>>>>> >> > Glen Scales MVP has a number of good management scripts that you 
>>>>> >> > can
>>>>> >> > find at
>>>>> >> >
>>>>> >> > http://www.outlookexchange.com/articles/glenscales/default.asp
>>>>> >> >
>>>>> >> >
>>>>> >> > James Chong
>>>>> >> >
>>>>> >> >
>>>>> >> >
>>>>> >> > Leon wrote:
>>>>> >> >> James,
>>>>> >> >>
>>>>> >> >> This is fantastic. if you ahve any more usefull scripts that you 
>>>>> >> >> dont
>>>>> >> >> mind
>>>>> >> >> sharing please let me know.
>>>>> >> >> You are a credit to Newsgroup.
>>>>> >> >>
>>>>> >> >>
>>>>> >> >> Thanks again.
>>>>> >> >>
>>>>> >> >>
>>>>> >> >> "james chong" <jamestechman@gmail.com> wrote in message
>>>>> >> >> news:1164215675.226087.252020@f16g2000cwb.googlegroups.com...
>>>>> >> >> > Try here.
>>>>> >> >> >
>>>>> >> >> >
>>>>> >> >> > List Exchange Mailbox Information
>>>>> >> >> > http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem019.mspx
>>>>> >> >> >
>>>>> >> >> > James Chong
>>>>> >> >> >
>>>>> >> >> > Leon wrote:
>>>>> >> >> >> Hi All,
>>>>> >> >> >>
>>>>> >> >> >> I have a need for a script that will list all the mailboxes 
>>>>> >> >> >> from
>>>>> >> >> >> all
>>>>> >> >> >> of
>>>>> >> >> >> the
>>>>> >> >> >> Exchange servers (we have 20 in the same organisation) and 
>>>>> >> >> >> there
>>>>> >> >> >> size
>>>>> >> >> >> in
>>>>> >> >> >> excel spreadsheet.  Do you know where I could get one from.
>>>>> >> >> >>
>>>>> >> >> >> Thanks.
>>>>> >> >> >
>>>>> >> >
>>>>> >
>>>>
>>>
>>>
>>
>>
>
> 


0
Moody6178 (8)
12/4/2006 10:41:34 AM
Thanks very much for your help.

"Ahmed H. Habashy" <Moody6178@hotmail.com> wrote in message 
news:Ogyq3D5FHHA.1912@TK2MSFTNGP03.phx.gbl...
> here is your Key, was posted by James:
>
> Don't even need VBScript, you can use the DOS Copy command.
> Copy C:\YourDirectory\*.txt C:\SomeOtherDirectory\CombinedText.txt
>
> Thanks James;
> With Regards
> Habashy
>
>
> "Leon" <Lion@hotmail.com> wrote in message 
> news:O9oY436EHHA.4052@TK2MSFTNGP02.phx.gbl...
>> Oh Yes this is what we had at my old place. It works but the cost is the 
>> decision maker.
>>
>> I think I will stick with the script that I send to you.
>> I have a directory of around 1000 small TXT files of 5kb in size, do you 
>> know a script that will consolidate all the date from all 1000 in to one 
>> TXT file please,
>>
>> Kind regards.
>>
>>
>> "John Schmidt" <johnaec@-nospam-pacbell.net> wrote in message 
>> news:eFqz77lEHHA.1012@TK2MSFTNGP04.phx.gbl...
>>> While not a script and not free, (but inexpensive), Track-IT 7.0 does 
>>> exactly what you want, (automatically audit all computers, etc. - 'very 
>>> comprehensive!), and will generate reports. More info here: 
>>> http://www.numarasoftware.com/
>>>
>>> John
>>>
>>> "Leon" <Lion@hotmail.com> wrote in message 
>>> news:OXHv8u%23DHHA.4668@TK2MSFTNGP03.phx.gbl...
>>>> Hi James,
>>>>
>>>> I will start from the beginning sorry about this.  I have 500 PC around 
>>>> world and need to Audit them all there is a DC at each office and I can 
>>>> access each PC from the my location.  I need the script that will Audit 
>>>> all the PC's CPU, HDD, Comp Name, User logged on, Software installed 
>>>> etc. and load this in to a CSV or xls or mdb file.
>>>>
>>>> I had a go with your script but I get an error saying Next expected at 
>>>> the last line.
>>>>
>>>> I have a script that will Audit the machine and dump a txt file to the 
>>>> \\server\share but I need it to be a CSV so I  can import it in to a 
>>>> excel and don't want to (end up with 500 CSV files that I have to 
>>>> manually import (but that's not a big problem))
>>>>
>>>> Below is the script that I have.
>>>>
>>>>
>>>> *********************************************************
>>>> Dim GetCurrentDate ,filext ,oshell
>>>>
>>>> Set oShell = WScript.CreateObject ("WSCript.shell")
>>>> oShell.run "net time \\domain.local/set /y"
>>>> '' change DCname to your domain controller name if you want to 
>>>> syncronize
>>>> your time with your DC
>>>> Set oShell = Nothing
>>>>
>>>>
>>>> strComputer = "."
>>>> const HKEY_LOCAL_MACHINE = &H80000002
>>>> On Error Resume Next
>>>>
>>>> '' ************************************
>>>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>>>> "\root\cimv2")
>>>> Set colItems = objWMIService.ExecQuery("Select * from
>>>> Win32_ComputerSystem",,48)
>>>> For Each objItem In colItems
>>>>    cComputerName = objItem.Caption
>>>> cloginname =  objItem.UserName
>>>>    cManufacturer = objItem.Manufacturer
>>>> cModel = objItem.Model
>>>> Next
>>>>
>>>> Set WshNetwork = WScript.CreateObject("WScript.Network")
>>>> cUserName = WshNetwork.UserName
>>>> Set UserObj = GetObject("WinNT://domain.local/"&WshNetwork.UserName)
>>>> '' change domain to your domain name w/o .com
>>>> strDisplayName = UserObj.Get("FullName")
>>>> strlastlogin = UserObj.Get("LastLogin")
>>>> pos = instrrev(cloginname,"\",-1)
>>>> clname1 = mid(cloginname,pos+1 ,len(cloginname))
>>>>
>>>> Set WshShell = WScript.CreateObject("WScript.Shell")
>>>> Set WshSysEnv = WshShell.Environment("process")
>>>> windir = WshSysEnv("WINDIR")
>>>>
>>>> Set objFSO = CreateObject("Scripting.FileSystemObject")
>>>> If not objFSO.FolderExists(windir & "\audit") Then
>>>> '' change \sharedfolder to any name , this is where the report will be 
>>>> save
>>>>    Set objFolder = objFSO.CreateFolder(windir & "\audit")
>>>> End If
>>>>
>>>>
>>>> Set objFSO = CreateObject("Scripting.FileSystemObject")
>>>> Set objTextFile = objFSO.CreateTextFile(windir & "\audit\" & 
>>>> cComputerName &
>>>> ".txt", True)
>>>> objTextFile.WriteLine "Date: " & Date  & vbTab  & Time
>>>> objTextFile.WriteLine "User Name: " &  clname1
>>>> Set UserObj = GetObject("WinNT://group.abercrombiekent.local/"&clname1)
>>>> ''change domainname to your domain name
>>>>
>>>> strDisplayName = UserObj.Get("FullName")
>>>> objTextFile.WriteLine "Full Name: " & strDisplayName
>>>> '' objTextFile.WriteLine "Employee Number: "
>>>> objTextFile.WriteLine "Computer Name: " & cComputerName
>>>>
>>>> ''************************
>>>> Set objWMIService = GetObject("winmgmts:" & "!\\" & strComputer &
>>>> "\root\cimv2")
>>>> Set colAdapters = objWMIService.ExecQuery("Select * from
>>>> Win32_NetworkAdapterConfiguration Where IPEnabled = True")
>>>> For Each objAdapter in colAdapters
>>>> objTextFile.WriteLine "IP address: " & objAdapter.IPAddress(i)
>>>>   objTextFile.WriteLine "DNS Domain: " & objAdapter.DNSDomain
>>>> Next
>>>>
>>>> ''****************
>>>> '' Get OS Details
>>>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>>>> "\root\cimv2")
>>>> Set colItems = objWMIService.ExecQuery("Select * from
>>>> Win32_OperatingSystem",,48)
>>>> For Each objItem In colItems
>>>> cOSs = objItem.Name
>>>> pos = InStr(1, cOsS,"|",1)
>>>> cOS1 = left(cOSs,pos-1)
>>>> objTextFile.WriteLine  "Operating System: " &   cOS1  & "   " &
>>>> objItem.CSDVersion
>>>> TotalVisibleMemory = 
>>>> FormatNumber(objItem.TotalVisibleMemorySize/1024,0)
>>>>
>>>> Next
>>>>
>>>> ''****************
>>>> objTextFile.WriteLine "Manufacturer:  " & cManufacturer
>>>> objTextFile.WriteLine "Model:  " & cModel
>>>>
>>>> ''****************
>>>> ''Get BIOS Details
>>>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>>>> "\root\cimv2")
>>>> Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48)
>>>> For Each objItem In colItems
>>>>       objTextFile.WriteLine "Serial Number: " & objItem.SerialNumber
>>>> Next
>>>>
>>>> ''**********************************
>>>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>>>> "\root\cimv2")
>>>> Set colItems = objWMIService.ExecQuery("Select * from 
>>>> Win32_Processor",,48)
>>>> For Each objItem in colItems
>>>>     objTextFile.WriteLine "CPU: " & trim(objItem.Name) & "  " &
>>>> objItem.CurrentClockSpeed & " MHz"
>>>> Next
>>>>
>>>> ''**************************************
>>>> objTextFile.WriteLine "Memory: "  & TotalVisibleMemory  & " MB"
>>>>
>>>> Set objWMIService = GetObject("winmgmts:\\" & strComputer & 
>>>> "\root\cimv2")
>>>> Set colItems = objWMIService.ExecQuery("Select * from
>>>> Win32_LogicalDisk",,48)
>>>> For Each objItem in colItems
>>>> ndisktype = objItem.DriveType
>>>>    If ndisktype = 3 Then
>>>> objTextFile.WriteLine "Disk: " & objItem.Caption
>>>>     objTextFile.WriteLine "Size: " & objItem.Size
>>>>     objTextFile.WriteLine "FreeSpace: " & objItem.FreeSpace
>>>>    End If
>>>>    If ndisktype = 5 Then
>>>>     objTextFile.WriteLine "CD Drive: " & objItem.Caption
>>>>    End If
>>>> Next
>>>>
>>>> objTextFile.WriteLine "Softwares:   *****Programs found in Control 
>>>> Panel
>>>> Add/Remove *********** "
>>>>
>>>> Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"
>>>> &strComputer & "\root\default:StdRegProv")
>>>>
>>>> strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
>>>> oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
>>>>
>>>> For Each subkey In arrSubKeys
>>>>    UnistallValue = ""
>>>>    DisplayValue = ""
>>>>    strKeyPath1 = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" 
>>>> &
>>>> subkey
>>>>    oReg.EnumValues HKEY_LOCAL_MACHINE, strKeyPath1, arrValueNames ,
>>>> arrValueTypes
>>>>
>>>>    If Not Isnull(arrValueTypes) Then
>>>> For i = 0 To UBOUND(arrValueNames)
>>>>  If arrValueNames(i) = "DisplayName" Then
>>>>             oReg.GetStringValue
>>>> HKEY_LOCAL_MACHINE,strKeyPath1,arrValueNames(i),strValue
>>>>                  DisplayValue = strValue
>>>>  End if
>>>>  If arrValueNames(i) = "UninstallString" Then
>>>>             oReg.GetStringValue
>>>> HKEY_LOCAL_MACHINE,strKeyPath1,arrValueNames(i),strValue
>>>>                  UnistallValue = strValue
>>>>  End if
>>>> Next
>>>> IF UnistallValue <> "" AND DisplayValue <> "" THEN
>>>>         objTextFile.WriteLine "Software:  " & DisplayValue ''  & vbtab 
>>>> &
>>>> UnistallValue
>>>>    End If
>>>>  End If
>>>> Next
>>>>
>>>> objTextFile.Close
>>>> cfullpath = windir & "\audit\" & cComputerName & ".txt"
>>>>
>>>> servfpath = "\\server\share\" & cComputerName & ".txt"
>>>> ''modify \\servername\sharedfolder$\serverfolder\ to your servername &
>>>> shared folder
>>>> '' copy the report to the shared folder in the server
>>>>
>>>> ''Set WshShell = WScript.CreateObject("WScript.Shell")
>>>> ''Return = WshShell.Run("notepad " & cfullpath, 1, true)
>>>>
>>>> Set fso = CreateObject("Scripting.FileSystemObject")
>>>> ''Set objFSO = CreateObject("Scripting.FileSystemObject")
>>>>
>>>> '' if the report file exist in the server, rename the file
>>>> If fso.FileExists(servfpath) Then
>>>> GetCurrentDate = FormatDateTime(Date, 2)
>>>> '' filext = Replace(GetCurrentDate, "/", "-")
>>>>  MyString1 = Replace(now, "/", "-")
>>>>   MyString2 = Replace(MyString1 , ":", "")
>>>>  filext = Replace(MyString2 , " ", "-")
>>>>
>>>> FSO.MoveFile servfpath  , "\\server\share\" & cComputerName & "." & 
>>>> filext
>>>> End If
>>>>
>>>> destFile = "\\server\share\"
>>>> fso.CopyFile cfullpath ,destFile,True
>>>> Set fso = Nothing
>>>> WScript.Quit
>>>> ****************************************************
>>>>
>>>>
>>>> Thanks for your great help.
>>>>
>>>>
>>>> "james chong" <jamestechman@gmail.com> wrote in message 
>>>> news:1164385789.128090.40630@f16g2000cwb.googlegroups.com...
>>>>> Not a problem,
>>>>>
>>>>> The following will get say a list of computers proc info from the 
>>>>> win32
>>>>> baseboard class. To query other things like memory, hd etc, you can 
>>>>> get
>>>>> the class names here and just insert the same line under this line in
>>>>> the script below.
>>>>>
>>>>> WMI HW class names
>>>>> http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true
>>>>>
>>>>> Add more under this line in the script
>>>>> Set colItems = objWMIService.ExecQuery("Select * from 
>>>>> Win32_BaseBoard")
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------------------------------------------------------------------
>>>>>
>>>>> strComputer = "."
>>>>> Set objWMIService = GetObject("winmgmts:\\" & strComputer &
>>>>> "\root\cimv2")
>>>>>
>>>>> For Each objItem in colItems
>>>>>
>>>>>
>>>>> strComputer = "."
>>>>>
>>>>> Set objWMIService = GetObject("winmgmts:\\" & strComputer &
>>>>> "\root\cimv2")
>>>>> Set colItems = objWMIService.ExecQuery("Select * from 
>>>>> Win32_BaseBoard")
>>>>>
>>>>> Set fso = CreateObject("Scripting.FileSystemObject")
>>>>>
>>>>> set wfile = fso.opentextfile("c:\test.csv",2,true)
>>>>>
>>>>> For Each objFile in colFiles
>>>>>
>>>>> Wfile.writeline(strComputer & " " & objFile.Drive & " " & objFile.Path
>>>>> & " " & objFile.FileName & "." & objFile.Extension & " " &
>>>>> objFile.FileSize)
>>>>>
>>>>> Next
>>>>>
>>>>>
>>>>> ----------------------------------------------------------------------------------------------------------------------------------
>>>>> Then type,
>>>>> C:\>cscript searchpst.vbs computer1 computer2 computer3
>>>>>
>>>>> Or you can read in the list of computer names from an OU which is also
>>>>> on the same link in my blog.
>>>>>
>>>>>
>>>>> Leon wrote:
>>>>>> Sorry James,
>>>>>>
>>>>>> Misunderstanding. I meant if you had a script that will audit a PC
>>>>>> (installed software, memory, CPU) and append all this in to the Excel 
>>>>>> or MDB
>>>>>> file.
>>>>>>
>>>>>> Kind regards,
>>>>>> "james chong" <jamestechman@gmail.com> wrote in message
>>>>>> news:1164378980.605655.281090@h54g2000cwb.googlegroups.com...
>>>>>> > Sure, here is one that will do pst's just change the file 
>>>>>> > extension.
>>>>>> >
>>>>>> > Exchange: Search Network For PST Files
>>>>>> > http://msexchangetips.blogspot.com/2006/09/exchange-search-network-for-pst-files.html
>>>>>> >
>>>>>> > James Chong
>>>>>> >
>>>>>> > Leon wrote:
>>>>>> >> Do you knowof any Script that eill audit PC's on the network to a 
>>>>>> >> .mdb or
>>>>>> >> excel file.
>>>>>> >>
>>>>>> >> Kind regards,
>>>>>> >>
>>>>>> >>
>>>>>> >> Leon.
>>>>>> >> "james chong" <jamestechman@gmail.com> wrote in message
>>>>>> >> news:1164222390.097886.33450@h48g2000cwc.googlegroups.com...
>>>>>> >> > You might find this useful
>>>>>> >> >
>>>>>> >> > Mail-Box Size Report Script and Database
>>>>>> >> > http://www.outlookexchange.com/articles/glenscales/mreport1.asp
>>>>>> >> >
>>>>>> >> > Glen Scales MVP has a number of good management scripts that you 
>>>>>> >> > can
>>>>>> >> > find at
>>>>>> >> >
>>>>>> >> > http://www.outlookexchange.com/articles/glenscales/default.asp
>>>>>> >> >
>>>>>> >> >
>>>>>> >> > James Chong
>>>>>> >> >
>>>>>> >> >
>>>>>> >> >
>>>>>> >> > Leon wrote:
>>>>>> >> >> James,
>>>>>> >> >>
>>>>>> >> >> This is fantastic. if you ahve any more usefull scripts that 
>>>>>> >> >> you dont
>>>>>> >> >> mind
>>>>>> >> >> sharing please let me know.
>>>>>> >> >> You are a credit to Newsgroup.
>>>>>> >> >>
>>>>>> >> >>
>>>>>> >> >> Thanks again.
>>>>>> >> >>
>>>>>> >> >>
>>>>>> >> >> "james chong" <jamestechman@gmail.com> wrote in message
>>>>>> >> >> news:1164215675.226087.252020@f16g2000cwb.googlegroups.com...
>>>>>> >> >> > Try here.
>>>>>> >> >> >
>>>>>> >> >> >
>>>>>> >> >> > List Exchange Mailbox Information
>>>>>> >> >> > http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem019.mspx
>>>>>> >> >> >
>>>>>> >> >> > James Chong
>>>>>> >> >> >
>>>>>> >> >> > Leon wrote:
>>>>>> >> >> >> Hi All,
>>>>>> >> >> >>
>>>>>> >> >> >> I have a need for a script that will list all the mailboxes 
>>>>>> >> >> >> from
>>>>>> >> >> >> all
>>>>>> >> >> >> of
>>>>>> >> >> >> the
>>>>>> >> >> >> Exchange servers (we have 20 in the same organisation) and 
>>>>>> >> >> >> there
>>>>>> >> >> >> size
>>>>>> >> >> >> in
>>>>>> >> >> >> excel spreadsheet.  Do you know where I could get one from.
>>>>>> >> >> >>
>>>>>> >> >> >> Thanks.
>>>>>> >> >> >
>>>>>> >> >
>>>>>> >
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
> 


0
Lion1 (14)
12/5/2006 9:39:18 AM
Reply:

Similar Artilces:

Migration Question
Hello: Not quite clear on this topic. I have several users who own multiple mailboxes. I understand that fact that Exchagne 2003 can only match 1 user to 1 mailbox. Running the ADC wizard, it correctly identified these users and associated mailboxes. I marked the primaries as such and I assume the others will be marked resources. My question. Will these resource mailboxes be migrated and who will "own" them. How does this work? Ideally, I need the same users that own these to have access to them post migration with all mail intact. Thanks The ADC should create disabled a...

Detect 2.0 scripts when running on 1.0
I need to write up a C# console app that would take in a PowerShell script passed to it and execute it. I've got it mostly running by using the System.Management.Automation namespace and the corresponding 1.0 reference library. However, I'm running into an issue where the script can contain commands meant for PowerShell 2.0 (e.g. ThreadOptions). In this case, the script fails even if the script has a check in place for the powershell version. For example: $ver = $host | select version if ($ver.Version.Major -gt 1) {$Host.Runspace.ThreadOptions = "ReuseThread"...

How to see the count of rows (above the Windows Start button) when doing an autofilter
One of my coworkers can see a count of rows (directly above the WIndows Start button) whenever they a filter on a table that has been autofiltered. So for example, if they filter on Column A for the name Jeff, and there are three Jeffs in the list, they will see Count = 3, when they filter on Jeff. Does anyone know how I can turn that feature on? Thanks. See Debra Dalgleish's site for explanation and workarounds. http://www.contextures.on.ca/xlautofilter02.html#Count Gord Dibben MS Excel MVP On Wed, 6 Aug 2008 14:20:53 -0700 (PDT), Dave K <fred.sheriff@gmail.com> wrote: &g...

Unable to 'organize favorites' due to IE script error
> When I click on 'organize favorites' below 'add to favorites', I get this > error message: > Windows Internet Explorer > Script Error > Error:Automation Server can't create object > Page:favorites.htm?folder= > Call Stack: > > - box with OK - > > While this is displayed, the term 'loading' is on the otherwise blank page > (under the headers), just scrolling... it never goes anywhere. Can't > navigate away from the page; must completely close the browser page. > > My hard drive is almost full & I...

getting the lock count in CCriticalSection
Is there a way to get the lock count of a CCriticalSection? I'm writing a "is critical section locked for this thread function" and it would be easier if I could get this information directly from the class itself. In the debugger I noticed there is a m_sect variable that has has this info in it. Is it OK to just access this for the required info? Thanks, Brett. bigb wrote: >Is there a way to get the lock count of a CCriticalSection? How would it be useful? I mean, it's subject to change between the time you would read it and the next instruction you would get to e...

mailbox database size warning
For exchange 2003 standard sp11 Does the system produce any warning that your database is becoming too big to mount? -over 14 gig- any app events or anything? regards HT In news:OISp9tgRHHA.3440@TK2MSFTNGP03.phx.gbl, MSNews <anywho.dot.com> typed: > For exchange 2003 standard sp11 Does the system produce any warning > that your database is becoming too big to mount? -over 14 gig- any > app events or anything? > > regards > > HT I don't think so, but don't quote me. The actual limit is 16GB, but just go ahead and apply SP2 and you won't have to...

Unable to Open Mailbox after account was Disabled and Re-enabled
I disabled a users account in Active Directory because he was fired. Now need to get in the mailbox to retrieve some e-mails. So I Enable the account in Active Directory and reset the users password. I login to the network fine but when I try to open the mailbox with Outlook I get this error. "Cannot start Microsoft Outlook. Unable to open the Outlook window. The set of folders could not be opened." I checked the security everything is correct. It is like his mailbox is still disabled or something? Please help me! Thank you, Scott_Conti@hotmail.com How many domain controlle...

count days
I need a formula to count days between two dates (in cells) that would include leap years any help ?? Thanks Larry Hi Larry you could use the function DATADIFF as =DATADIF(initial_date,final_date,"type_of_differene") type of difference could be: "Y" - # of completed years between dates "M" - # of completed months bt dates "D" - # of completed days bt dates "MD" - Months and Years are ignorated "YD" - Days and Years are ignorated hope it helps regards from Brazil Marcelo "Larry" escreveu: > I need a formula ...

Restore Individual Mailbox Item(s) fr. Inf. Store Backup
We run Exch. 2003 Ent. version and Veritas Backup Exec. w/Exchange Agent. We have option to backup Information Store and/or Mailbox level data. We've always backed up both so that we can restore individual mailbox items if necessary. However, the individual mailbox backup always spits out errors and now takes too long. If we backup only inf. store, can we still restore individual mail in special case by: 1. restore entire store to new location and rename .mdb and .stm files. 2. create new mailbox store in Sys. Mgr. 3. connect new mailbox store renamed .mdb & .stm files. 4. con...

VB Script XL
I'm new to Scripting in Excel and trying to select a Range of cells beginning at B13... want to End-down and then go right 23 cells and have that range active to print... Closest I've come is Range ("B13".End(xlDown)).Right 23.Activate {I've thrown in Right 23 as I don't know how to include that part}... thanx in advance... Try Range("B13").End(xlDown)(1, 24).Activate Cordially, Chip Pearson Microsoft MVP 1998 - 2010 Pearson Software Consulting, LLC www.cpearson.com [email on web site] On Tue, 2 Feb 2010 13:59:01 -0800, Servant...

I can't create mailboxes for new users
When I create a New user , i check the box to create a new mail box, and after finish the whole process the system don't create thje mail box. Can anybody help me in this way try sending an email to the new user, then see if the mailbox was created. "jmalonsor@mixmail.com" <anonymous@discussions.microsoft.com> wrote in message news:00ff01c3be84$3d784ac0$a401280a@phx.gbl... > When I create a New user , i check the box to create a new > mail box, and after finish the whole process the system > don't create thje mail box. > > Can anybody help me in thi...

message counting
Does anyone know how to make outlook count the number of messages that it receives per day? ...

Public Folders - Using as a mailbox
Hi I have set up a public folder and have set it up so the people can read and reply to the emails, and tell when others have read them. What is the best way to track the replies? CC them to the public folder? Any other ideas? Many thanks in advance William ...

Automatic archiving of mailbox e-mail on Exchange 2003
Is their anyway of autoarchiving e-mail from users mailbox if it reaches a certain limit in Exchange 2003 or mail over a certain date . Can this be done on the exchange server rather than relying on user archiving through outlook . Maybe there is third party tool that can be used to achive this . Any suggestion would be greatly appriciated ? EXMERGE utility will help you. Just keep in mind that mail in .pst takes more disk space and .pst is less reliable storage. Kenneth wrote: > Is their anyway of autoarchiving e-mail from users mailbox if it > reaches a certain limit in Exchange...

E-mails are changed after Exchange Mailbox Migration
Hello, We used Exchange 2003 Migration Wizard to migrate mailboxes from Exchange 5.5 Enterprise to Exchange 2003 Enterprise. The migration passed without any error. But after the migration, when I checked some mailboxes on Exchange 2003 I saw a confusing differences - some letters in Exchange 2003 are not stored as the same e-mail message as in Exchange 5.5. but as attached letters to an e-mail message with the same subject. What cause this behaviour and is there a workaround for it? Thanks, George ...

How to count same numbers in a coluum #2
Thanks Frank, Now, to find out what a pivot table is. :) Fran -- FPA186 ----------------------------------------------------------------------- FPA1869's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1470 View this thread: http://www.excelforum.com/showthread.php?threadid=26336 Here are some links for pivottable info: Debra Dalgleish's pictures at Jon Peltier's site: http://peltiertech.com/Excel/Pivots/pivottables.htm And Debra's own site: http://www.contextures.com/xlPivot01.html John Walkenbach also has some at: http://j-walk.com/ss/excel/...

Creating Mailboxes
Hello, I am using and LDAP string, similar to the one below to create a mailbox in exchange 2003, does anyone know if it is possible to set the email address using this method? If not, does anyone know of an alternative method? And is it possible to create and delete users in exchange 2003 using a .csv file import? Thanks in advance, Adam http://support.microsoft.com/default.aspx?scid=kb;en-us;237677 http://support.microsoft.com/default.aspx?scid=kb;en-us;327620 http://support.microsoft.com/default.aspx?scid=kb;en-us;298882 Adam wrote: > Hello, > > I am using and LDAP str...

Mailbox behaves differently depending which store it is located in
Hi there, we have moved some mailboxes from Exchange 2003 SP1 to Exchange 2003 SP2 using th emove mailbox wizard. When the mailbox is on the old server, all works fine. When the mailbox is on the new server, we are unable to: 1. Use the Move to Folder icon - it hangs when drawing folder list 2. Insert | Item in a new mail message hangs, it also tries to draw the folder list 3. Some users are unable to create new folders. Out of 450 users, only maybe 6 have these issues - but we are struggling to find a fix. Moving them back to the old server works as it used to. /resetviews is not...

Count on Iif Statement in Access to Case Statement
What is the SQL Case Statement equivalent to the following SQL expression in Access? Thanks for any help. Count(IIf([HourCreated]=7,0)) AS 7 >> Count(IIf([HourCreated]=7,0)) AS 7 << None; you cannot name a data element 7 without using quoted identifiers. I think you might want: COUNT(NULLIF(creation_hr, 7)) AS seven case when HourCreated = 7 then 0 else null end AS [7] But you seem to be missing the "false" value so I've used Null above. Tony. "Qaspec" <Qaspec@discussions.microsoft.com> wrote in message news:CAA1B9F8-87D...

Access to mailboxes for admins
Hi! In Exchange 5.5 - admins could connect as a themselves to a user's mailbox via OWA. How do you do this in Exchange 2003 via OWA? ...

counting data
If I have 20 cells in a column with text data, how do I construct a formula to count only the cells in that column that contain data. Ted Bob Ron Larry In cell a1 I need the answer 4 Thanks =COUNTA(range) will count every cell with something in it. Gord Dibben MS Excel MVP On Wed, 17 Oct 2007 15:20:53 -0700, TrentA <Trent323@yahoo.com> wrote: >If I have 20 cells in a column with text data, how do I construct a >formula to count only the cells in that column that contain data. > >Ted >Bob >Ron >Larry > >In cell a1 I need the answer 4 > >Thanks ...

Checking mailbox usage
Hi, I'm using EX 2003 at the moment, and am pretty new to this, so this is probably really dumb question but... How can I find out the size of users' mailboxes from the server? I've looked everywhere, but can't seem to find it. We are running out of room on our mail server, and I want to find out who the biggest culprits are... Hope somebody can get back to me asap :) TIA Exchange System Manager | Administrative Groups | yourAdmin Group name | Servers | Your Server | your Storage Group Name | Mailbox Store | Mailboxes. Next to each mailbox in that store you'll see ...

Secure a mailbox
Hi Guys, :-) Just wondering if anyone has any ideas on setting up a secure mailbox in Exchange 2003 enterprise using ssl or another equally secure alternative? I have been asked to set up a secure mailbox for order to be sent to for one of our clients. Another problem being that I only want to secure this mailbox and ideally I dont want to have to set up a spereate email server specifically for secure emails. Is this possible or will I need to use an alterative method? Thanks in advance guys, I hope you can help!! Warmest regards Antony Clifford Systems administrator Educatio...

moved mailbox from 5.5 to 2003 now no mail! please help!!
joined an exchange 2003 server to an existing 5.5 site. as a test before moving ALL mailboxes, i moved mine... from the 5.5 box to the new 2003 machine... all went fine, no errors. i opened outlook and all my messages were there and i was able to send an email. however when someone tries to SEND me a message it gets bounced back to them with: Unable to deliver the message due to a communications failure please help! restarting hte MTA on the 5.5 box seems to have fixed the problem... <jjd228@NOSPAMoptonline.net> wrote in message news:hlMmd.10167$hc5.4993354@news4.srv.hcvlny...

Counting text strings in columns (Excel 2000)
I have a worksheet with seven columns of text strings. I want to find out which of the text strings appears in more than one column and in how many columns. Is there a formula which will do this for me? Thanks, Gavin Gavin You seem to be short of offers on this one!! The only way I can suggest is to copy the seven columns into one column (on a separate sheet so you don't screw anything up). From there you can use a pivot table or subtotals to find what you require. Andy. "gavin" <no-one@home.com> wrote in message news:bobvtv$dpt$1@newsg1.svr.pol.co.uk... > I hav...