[x]

Doodlescripts.com
Doodlescripts.com is here as a way to distribute scripts to anyone who needs it. Feel free to submit your scripts and use the available scripts. Simply register for a free account to download and away you go. IF THE SCRIPT YOU FOUND HERE WAS HELPFUL, DONATE $1 TO HELP KEEP THE SITE GOING
Posted on Wednesday, February 13

Powershell Export Mailbox Information to CSV
Need to export mailbox data to a csv in Exchange 2007?

Get-MailboxStatistics | sort-object totalitemsize -descending | select-object displayname,@{name='Total Size (KB)';expression={$_.totalitemsize.value.ToKB()}},@{name='Total Deleted Item Size (KB)';expression={$_.totaldeleteditemsize.value.ToKB()}},itemcount,storagelimitstatus,database | export-csv E:\tcbscripts\dump.csv You can add the following to a batch file and put it on a schedule. C:\WINNT\system32\windowspowershell\v1.0\powershell.exe -PSConsoleFile "E:\exchsrvr\bin\exshell.psc1" -command "Get-MailboxStatistics | sort-object totalitemsize -descending | select-object displayname,@{name='Total Size (KB)';expression={$_.totalitemsize.value.ToKB()}},@{name='Total Deleted Item Size (KB)';expression={$_.totaldeleteditemsize.value.ToKB()}},itemcount,storagelimitstatus,database | export-csv E:\dump.csv"

Posted by babyrae Thursday, September 18, 2008 (18:03:42)

Read More... (112 Bytes) | comments? | Printer Friendly Page  Send to a Friend | Score: 0


Vbscript Search a File by Keyword
This script will let you search a file by keyword and dump each line to an output file. Usually useful for log files where you want to parse a file for a particular keyword, email address or string.


inputParamFile="filename"
logfile="outputFilename"
inputEmail="{search string}"
Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set dumpfile = objFSO.CreateTextFile(logfile)
Set objDictionary = CreateObject("Scripting.Dictionary")
Set objTextFile = objFSO.OpenTextFile(inputParamFile, ForReading)
i = 0


Do Until objTextFile.AtEndOfStream
    strNextLine = objTextFile.Readline
    objDictionary.Add i, strNextLine
    i = i + 1
Loop
For Each objItem in objDictionary
    if InStr(objDictionary.Item(objItem),inputEmail) then
      dumpfile.writeline objDictionary.Item(objItem)
    end if


Next


wscript.echo "Done!"


Posted by babyrae Tuesday, September 02, 2008 (13:22:50)
comments? | Printer Friendly Page  Send to a Friend | Score: 0


Vbscript Add Members to a Distribution List in Bulk
Received the following errors when trying to add members to a dl using ldifde. "specified account name is already a member of the local group" using the following format for the ldf. file dn: cn=dlname,ou=dls,dc=domain,dc=com changetype: modify add: member member: cn=username,ou=users,dc=domain,dc=com - To resolve the issue, I used the following script instead of ldif import. Output.txt should contain the DN for each user on each line.



Posted by babyrae Monday, February 25, 2008 (18:46:22)

Read More... (1016 Bytes) | comments? | Printer Friendly Page  Send to a Friend | Score: 0



Reseller Banner, 468x60px
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster
Doodlescripts.com copyright 2008 All rights reserved
Interactive software released under GNU GPL, Code Credits, Privacy Policy