Converting a VBScript for Exchange 2003 to Function the same for Exchange 2010

Converting a VBScript for Exchange 2003 to Function the same for Exchange 2010
Afternoon;
I've run into a problem at this time.  We are currently looking into migrating from Exchange 2003 into Exchange 2010 and I'm finding that my normal data collection method is no longer usable in Exchange 2010.  I have the script posted below as of
what I'm currently using to collect my information, I just need to know of a means to continue the collection when we move to the new Exchange server.  Any assistance in getting this to function with Exchange 2010 would be great.
++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++
On Error Resume Next
'Date Stamp for File Name
Function TIMESTAMP
  strDate = CDate(Date)
  strDay = DatePart("d", strDate)
  strMonth = DatePart("m", strDate)
  strYear = DatePart("yyyy", strDate)
  If strDay < 10 Then
    strDay = "0" & strDay
  End If
  If strMonth < 10 Then
    strMonth = "0" & strMonth
  End If
  TIMESTAMP = strYear & strMonth & strDay
End Function
'Drop Location Vars Set
DRP01 = 1
DRP02 = 1
'Live Check SQL04
strVIC = "SQL04"
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery ("Select * from Win32_PingStatus Where Address = '" & strVIC & "'")
For Each objItem in colItems
    DRP01 = objItem.StatusCode
Next
'Live Check FS02
strVIC = "FS02"
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery ("Select * from Win32_PingStatus Where Address = '" & strVIC & "'")
For Each objItem in colItems
    DRP02 = objItem.StatusCode
Next
'Setup STOREDIR Location
If DRP01 = 0 Then
    STOREDIR = "\\SQL04\Email\Collected\" 'Primary Data Storage Location
    Else
    If DRP02 = 0 Then
        STOREDIR = "\\FS02\Shared\MIS\Daniel\" 'Secondary Data Storage Location
        Else
        STOREDIR = "C:\Scripts\Logs\" 'Tertiary Data Storage Location
    End If
End If
'STOREDIR Check for Availability
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(STOREDIR) Then
    AVAIL = 1
    Else
    AVAIL = 0
End If
'Sets Failsafe STOREDIR
If AVAIL = 0 Then
    STOREDIR = "C:\Scripts\" 'Last Chance DIR for Data Files
End If
'Sets Filename
FILENAME = TIMESTAMP & ".csv"
'Testing Purposes Only
'wscript.echo TIMESTAMP
'wscript.echo STOREDIR & vbNewLine & FILENAME & vbnewline & vbnewline & AVAIL
'Sets Process Variables
cComputerName = "EXCH02" ' Exchange Server Name or IP Address
DIM fso, ObjFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set ObjFile = fso.CreateTextFile(STOREDIR & FILENAME, True)
'ObjFile.WriteLine("Date,Display Name,Size(KB)")
Const cWMINameSpace = "root/MicrosoftExchangeV2"
Const cWMIInstance = "Exchange_Mailbox"
Dim strWinMgmts            
Dim objWMIExchange   
Dim listExchange_Mailboxs  
Dim objExchange_Mailbox           
strWinMgmts = "winmgmts:{impersonationLevel=impersonate}!//" & cComputerName &"/" & cWMINameSpace
Set objWMIExchange =  GetObject(strWinMgmts)
'Checks for Email Record and Records to File
If Err.Number <> 0 Then
  ObjFile.WriteLine("ERROR:" & VBNEWLINE & Err.Number & VBNEWLINE & Err.Description)
Else
  Set listExchange_Mailboxs = objWMIExchange.InstancesOf(cWMIInstance)
  If (listExchange_Mailboxs.count > 0) Then
    For Each objExchange_Mailbox in listExchange_Mailboxs
       ObjFile.WriteLine(TIMESTAMP & "," & objExchange_Mailbox.MailboxDisplayName & "," & objExchange_Mailbox.Size)
    Next
  Else
    ObjFile.WriteLine("WARNING: No Exchange_Mailbox instances were returned.")
  End If
End If
ObjFile.Close
VBScript is what I prefer. All scripts must have a kill switch to manage them from a primary location. Mine, is an updater method.
VBScript is what I prefer. All scripts must have a kill switch to manage them from a primary location. Mine, is an updater method.

Okay, then what about an alternative for getting the same result. The file associated in the article is too much.  All we need is something simple for a single exchange server with 180 users.  We only need to pull UserName and DataSize(KB).
I only need to collect two pieces of information from the exchange server and the third piece is forced due to the date of when the information was collected.  This way I can sort and filter by Date and Name to see a trend of the users mailbox usage
size.
Every day this runs, it determines the date of the file which is also the first piece, then pulls from the exchange server the entire list of users (the second piece), and then the respective user's mailbox size in KB (the third piece).  This all is
dropped into a CSV file later used to import into a database before being archived, done by a second task on the server.  Later used by a shared Excel PowerPivot document among the department.
Those of us in the server admin group use this to, at a glance, see the collective size of email usage on the server.  Mainly used as a means of catching an incident before it happens.  We are currently keeping our users around a collective 80GB
of use out of the well received limit of 110GB on Exchange 2003 and limiting the user's ability to send and receive email by email quota is apparently not accepted for us to do.  So we use this to determine who we need to visit and force archive their
email so the server doesn't fail due to the size limit.
VBScript is what I prefer. All scripts must have a kill switch to manage them from a primary location. Mine, is an updater method.

Similar Messages

  • Currently have ipod touch 4 and am getting an iphone 5c. Want to transfer data to new phone. Currently all our family devices on one apple ID for purchases and it is the same for icloud. I want to create a new one for icloud for this iphone. What do I do?

    Currently have ipod touch 4 and am getting iphone 5c this weekend. Currently our family has several apple devices and they have the same apple ID for itunes and it is the same ID that we use for icloud. I want to set up a separate icloud ID so that it is only on my new device. I still want to keep the same apple ID for purchases. Can I do this and better yet when do I do this...before the purchase, after the purchase and backing up of data. Where do I go to create a new one?

    Figured it out. Thanks.

  • Is the installation file for adobe reader, the same for all the versions of windows ? Is it ?

    Hello,
    I want to know if the installation file for adobe reader is it the same for all the windows ?
    It is because I have to do an automatic installation for XP, seven and windows 8...
    It is also the same between 32bits and 64bits ?
    Thanks.
    Best regards
    Sofia Luna

    It may be worth mentioning two things.
    1. Adobe provide extensive information on Enterprise Deployment of Acrobat and Adobe Reader.
    2. You may well need a redistribution license to do this, if you are installing on behalf of anyone (accepting EULA for them), pushing, or hosting etc.

  • Our exchange server crashed and we lost all contact and calendar data.  We found an app to get the contacts off of people's phone to import but can't find the same for calendar.  How do I get my calendar info off my phone and in to new exchange server?

    Our exchange server crashed and we lost all contact and calendar data.  We found an app to get the contacts off of people's phone to import but can't find the same for calendar.  How do I get my calendar info off my phone and in to new exchange server?

    You'd have to think through this, but it seems like if you are using Outlook, and the items vanished from the Outlook client as well as the server,that you could re-populate Outlook using iTunes. 

  • How to make a custom object function the same as the Competitor and Partner

    Would like to use a custom object to function the same way the Competitor and Partner objects work in CRM. I have not be able to accomplish this. Do you know if it is possible? Can the specialized functionality of the account relationships fields and layouts be leverage with a custom object?

    Hi Peter. Thanks for the reply.
    I assumed that if I used the project style sheet during the export, Word would convert the style so that it looked the same as in the HTML. Is that a bad assumption? I'm currently not mapping to any template equivalent for these message box styles. I did try it as one of my attempts, but I couldn't figure it out. It never seemed to take the style in the .dot.
    Anyway, if I use just 1 style, such as just the MsgBox, I obviously don't get the white paragraph between the title and message. That white paragraph comes from the first <p> tag in the MsgBox style. But I need to have the <p> tags in there because they're better for our localization process than line breaks.
    I did do some tweaks that made it look better. Basically I structured it so that the MsgBoxTitle div is now inside the MsgBox div. Something like this:
    <div class="MsgBox">
        <div class="MsgBoxTitle">PC-DMIS MESSAGE: </div>
        <p>Please do the following steps in the indicated order.</p>
        <p>1. Remove the current SH-1/2/3 stylus.</p>
        <p>2. Attach the SHSP (Stylus Holder Setting Piece).</p>
        <p>3. Jog the probe to a safe location with a clear line of approach
         to the port(s) being calibrated.</p>
        <p>4. Then click OK.</p>
        <p>After you click OK the machine will begin DCC measurement.</p>
    </div>
    And then I adjusted my styles borders, padding, and thickness. That helped it look more connected, but still doesn't look quite right:
    Would love to get rid of that white space after the title.
    If you have time, I would be interested in a more detailed example of how you did it.

  • "Material is not the same for confirmation and delivery"

    Hello
    If this is not the right forum, my apologies. Direct me to the correct one if it is not ....
    Have been doing automated test development (HP's QTP) against SAP systems for over a year. I am not an application expert - very much a newbie when it comes to application knowledge but trying to gain some. I have "googled" the phase "Material is not the same for confirmation and delivery" and have not been able to find any references. What does this mean?
    I see this message for an iDoc using WE02. Have looked and looked but don't really know what I'm looking for.
    Clues?
    Thanks,
    DW

    DW,
    I have never seen that exact message, but I have seen similar ones.  Generically, the message probably means that you are attempting to perform a transaction against a document (perhaps a Purchase order?) and the Material number (Part Number) contained in the transaction is not the same as the Material number in the originating document in SAP.
    An example might be you have previously created a confirmation against a Purchase order, which now exists in SAP.  This Confirmation is for a specific Purchase order, item, and material.  Now, when you attempt to create an inbound delivery for the Confirmation, the material number contained in the new IDOC is different from the material number that was contained in the original Confirmation.
    I don't know what IDOC Message type you are having the problem with, but generically you can do some troubleshooting. Find the SAP Material number in the IDOC (MATNR probably).  Find the appropriate reference document number in the IDOC (confirmation number?  Purchase order number? or...?), and then manually review the document in SAP to ensure that the Material numbers are the same.
    If you are totally lost, you should really consult with an SAP App expert.  I am guessing that this is part of the Materials Management module, so you would be asking for an MM expert.
    Or, you can send more details, and we can try to help.
    What is the IDOC message type?
    What is the Message number of the error message?  Functionally, what is this IDOC trying to do, from a business perspective?
    Rgds,
    DB49

  • Is iWork soon to be the same for iOS and Mac

    I have a Macbook White 2009. I was looking in the MacApp Store and I noticed that iWork and Microsoft apps cost the same. I wanted to know which are better? I also noticed that iWork has different prices for a Mac and for an iPad because they don't have the same features. Is there any chance that iWork will be the same for Mac and iOS in the near future?. About a week ago I had to install a new operating system and everything was erased, among those apps were Microsoft Word, Powerpoint and Excel. I no longer have the CD to install the apps, do you think I can ask the Apple Store to install them for free? Thank you.

    Since Mac OS X and iOS are two different platforms, it's not really possible for the applications to be the same. They may have the same or at least similar functionality, however.
    The Apple stores will not install software that you do not have the media for. You can purchase MS Office 2011 Home and Student Edition from Microsoft online for download very inexpensively - about $140.
    Best of luck.

  • Aren't -180° and 180° the same for a 3D parametric surface graph?

    Hi
    everyone,
    I need to
    plot some results using the 3D parametric surface graph and these 3 matrix :
    First
    matrix “theta” : Each column ranges from -180° to 179°    (180x360)
    Second
    matrix “phi” : Each line ranges from 0° to 89.5° (increasing by 0.5°)   (180x360)
    Third matrix “z” : 180x 360 matrix initialised to 7
    First and
    second matrixes are converted to a polar representation.
    My problem
    is that I reach my goal, a full red circle, only if my matrixes range
    from -180° to 180° and not when they range from -180° to 179°. Aren’t -180° and
    180° the same for this graph? I must be doing something wrong...
    Any help
    would be great,
    Thanks.
    Regards,
    User
    Solved!
    Go to Solution.
    Attachments:
    Forum.vi ‏671 KB
    Pb circle.JPG ‏20 KB

    Seems obvious that you need to have the first and last point the same in order to close the curve.
    A simpler, but equivalent example is a circle on an xy graph, Unless the first and last point coincide, you won't close the loop.
    LabVIEW Champion . Do more with less code and in less time .

  • Is there a autosave app for snow leopard kinda like the autosave for lion?

    Is there a autosave app for snow leopard kinda like the autosave for lion? Since I do alot of illustrator and photoshop design I would love to have this feature.

    None that I've seen. It would do no good to upgrade your OS to Lion either since Adobe has opted to ignore Apple's Autosave/Versions function. Even in the CS6 apps. In order for any app to work with Autosave/Version in Lion, it has to be written to use those functions. It isn't just "there" all the time for all apps.

  • My macbook pro's screen display has suddenly gone into a strange colour setting where everything appears in a kind of infrared colour palette an I can;t seem to change it back.  It's the same for all icon and websites, does anyone know how to restore?

    My macbook pro's screen display has suddenly gone into a strange colour setting where everything appears in a kind of infrared colour palette an I can;t seem to change it back.  It's the same for all icon and websites, does anyone know how to restore?

    Wow!  I think I had this same issue just last night.
    I was cleaning my macbook pro retina on the outside.  Then I opened it up and was wiping dust off the monitor and I can't pinpoint exactly when, but the colors changed suddenly.  It looked super strange, it was like green halo's and it looked worse when looking at it at an angle.  Of course I took no pictures!!!  I was freaking out that my 2 grand laptop was busted and I somehow removed a protective film or something.
    But I digress...  The image looked very green and spacey, it was almost a neat effect.  After about 5 minutes it started to look a little more digital though.  There were straight lines of this halo effect on the edges and top.  After about 10 minutes it turned into a predominate issue with the blacks on screen.  I could open a web browser and it was unnoticable on a white background.  After about 15 minutes, you could only barely see the green cloud effect if you looked at the monitor from an extreme angle.  After about 20 minutes, it was completely back to normal, I almost feel paranoid like I see a halo or something strange.  But I believe that might be all in my head now.
    So yerp, lemme know what you guys figure out.

  • I am trying to store music for two different iPods on the same computer, against two different Apple IDs. When I try and download content from the Cloud I get an error message?

    I am trying to store music for two different iPods on the same Windows 8 computer, and when I try and download content from the Cloud I get an error message. Is it possible to have two different Apple IDs on the same computer?

    Unfortunately you've discovered too late how important it is to maintain an up-to-date backup of your iTunes library (and all other data of value).  You could, before wiping the drive, have considered making use of a commercial data recovery service that could (albeit at considerable cost) have extracted your library from the hard disk, even if virus infected.
    In the absence of that option, you will need to restore the content of your library from its original sources:
    Depending on your location, you may be able to re-download any iTunes Store purchases that are still available on the Store
    Likewise, most digital purchases from Amazon (including auto-rip copies of purchased CDs) should be available from the Amazon Cloud and via the Amazon Music application - the same may be true of other commercial sources for digital downloads
    Content imported from your CDs will have to imported again
    The specific situation that you describe regarding the music imported from your friend's external HDD suggests that either the source is badly organized and/or originates from a source other than iTunes (other media players may use alternative tags for information like artist, title, album, etc. that are not wholly consistent with how iTunes handle these).  Without details of the issues you're seeing it is difficult to suggest a remedy other than going through the media album-by-album, track-by-track, and correcting the inconsistencies.
    In the absence of a backup or access to the original library data there is no option other than painstakingly recreating your library as described above.  As you do so, you'll now realize how important creating and maintaining backups are - in my case I have at all times three separate duplicates of my library, in two different locations, where none is ever more than a week old compared to the content of my master library.

  • We have developed a desktop application using Flash software and published the same for MAC environment. When we double click on the index.app file, the application is working perfectly in Mac 10.6.7 at our office. But if the same index.app file is double

    We have developed a desktop application using Flash software and published the same for MAC environment. When we double click on the index.app file, the application is working perfectly in Mac 10.6.7 at our office. But if the same index.app file is double clicked in Mac 10.6.7 at out clients location, its not opening. For your information the client is able to open this same application by double clicking on index.swf file. The main problem is that client is not able to open the application using index.app file at their office whereas we are able to do so at our office. Can anyone give some suggestions to sort this problem?

    The most common reason is different versions of Flash, or different versions of web browsers used.  Some users may elect to not have Flash installed at all because of the processor overhead of Flash.  If you are going to make an application for a client, check what operating system and browser versions they are using first.  Then determine if a stand alone application is required, or if they have the necessary plugins to run specific browser enhanced code.
    P.S. MAC is an acronym for Media Access Control.  Mac is the shorthand for Macintosh, the operating system and computers made by Apple Inc.

  • Can I use the same iTunes account for 2 iPads without having the same apps on both?

    Can I use the same iTunes account for 2 iPads without having the same apps on both? Everytime I try to sync my new iPad, it syncs all the apps that are on my account. If I can do this, can someone tell me how please???

    Yes you can, easily.  When you plug the first pad in to sync, note the name of the pad on the last pane.  Set up for that device whatever you want to sync.  When you are done, plug the second pad in.  Make sure it has a different name on the left pane.   Then sync to that pad whatever you want.  I tunes will remember what you did on each pad, and will start from there the next time you plug in.

  • Creating a Master virtual hard disk and using the same for all other VM's

    Hi,
    We would like to create a master virtual hard disk and use the same for all other VM's. Can we do that ?
    my requirements :
    1) create 10 VM's
    2) first create a master virtual hard disk with win OS and use the same to create the 10 VM's.
    3) After creating the VM's change the HDD size.
                  -- if i have created master virtual disk with 500GB , and use the same for creating a virtual machine. can we change the HDD size to 1TB ?
    After creating the VM's ,i will change the system names and activate the windows accordingly.
    Will there be any implications ,if we can/will do like this.
    Thanks.

    Hi Suren424,
    I think Using Differencing Disks may cover your needs .
    Please refer to following setps:
       "Create the Parent Virtual Machine Configuration and Virtual Hard Disk
        Install the Operating System, updates, and common software
        Generalize the installation
        Prepare the parent virtual hard disk
        Create the differencing disks
        Create virtual machines that use the differencing disks
    For details please refer to follwing link:
    http://social.technet.microsoft.com/wiki/contents/articles/1393.hyper-v-virtual-machine-vm-parent-child-configuration-using-differencing-disks.aspx
    Hope this helps
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • HT201269 Can I set up two accounts for two different iPhones on the same iTunes account. Jimmy

    Hello,
    CanI set up two accounts for two different iPhones on the same iTunes account. Thanks JIMMY

    http://support.apple.com/kb/ht1495
    You can use the same apple id for two separate phoones to share apps/music, however you would need a separate apple id for both phone for imessage/facetime/icloud.

Maybe you are looking for

  • OBIEE 11G Prompt population based on fact

    Hi, Can we populate a prompt(based on a dimension) with only those values for which there is data available in the fact table? eg. If we have prompts based on product and time dimensions and a particular date range is selected, the product prompt sho

  • Using the menu widget, breaking a menu apart to position buttons individually.

    I am having a completely blank moment. I'm sure I used to be able to do this in Muse, I just can't remember how. I want a horizontal menu in my header with a company logo to sit in the middle. So ideally I want three menu buttons on the left, three o

  • BI connection with ECC

    Hello BI experts, Iam BASIS guy and working on SAP R/3 4.72 to ECC6 upgrade project.I have few tasks which is related to BI7.0 & source systems Let me put like this current landscape SAP R/3 4.72 -  DVE               QAS          PRD SAP BI7.0       

  • Qwerty instead of Azerty before loggin in

    Hi everyone, I have a mac mini and an AZERTY keyboard, when i start my Mac mini and i type my password to access my user account my keyboard seems to be set on QWERTY (which is annoying to type my password correctly) and then once I'm logged into my

  • Oracle Content DB Confiuration Assistant spawns java error

    Starting CredentialManagerAction_CreateApplicationEntity_Oid oracle.ifs.common.IfsException: IFS-21028: The current session operation was cancelled      at oracle.ifs.admin.actions.IterateSCsCredentialManagerAction.execute(IterateSCsCredentialManager