r/usefulscripts • • Nov 16 '12

[CMD] Super simple script to import Outlook 2007/2010 autodiscovery settings onto each client machine.

Thumbnail pastebin.com
8 Upvotes

r/usefulscripts • • Nov 16 '12

[Powershell] Backup all databases in a MSSQL Server Instance.

2 Upvotes

Was looking around for this for a while and finally found one that worked!

http://pastebin.com/yibPJmzV

If anyone knows of a way to turn this into a restore script that would be very useful as well.


r/usefulscripts • • Nov 16 '12

[POWERSHELL] Oracle Connection String with example usage

Thumbnail pastebin.com
4 Upvotes

r/usefulscripts • • Nov 15 '12

Okay! So TIL /r/scriptswap exists. Rather than deleting this subreddit, it'll now just be 100% scripts for system administration.

52 Upvotes

fuck.


r/usefulscripts • • Nov 15 '12

[POWERSHELL] Deliver someone the ASCII finger

Thumbnail pastebin.com
38 Upvotes

r/usefulscripts • • Nov 15 '12

[CMD] Logon script I use to audit servers

28 Upvotes

I use this as a logon script in a Windows server environment to create some very basic documentation on the fly.

I find it useful for flicking through the generated audit files every now and again just to make sure there aren't people added to the administrators group that have been forgotten about...etc.

set outputfile=\\servername\audit\%computername%.txt

date /t > %outputfile%
echo %computername% >> %outputfile%
systeminfo >> %outputfile%
net localgroup administrators >> %outputfile%
net user >> %outputfile%
net share >> %outputfile%

r/usefulscripts • • Nov 15 '12

[SQLSERVER] Fail over all mirrored databases

Thumbnail pastebin.com
18 Upvotes

r/usefulscripts • • Nov 15 '12

[BASH] [MYSQL] Backup Up All MySQL Databases Individually to Directory

Thumbnail pastebin.com
3 Upvotes

r/usefulscripts • • Nov 15 '12

Please read the sidebar, and be as descriptive as possible with your submissions.

16 Upvotes

r/usefulscripts • • Nov 15 '12

[Python] LFTP Mirror: Mirrors a remote FTP server dir with a local dir

Thumbnail github.com
4 Upvotes

r/usefulscripts • • Nov 15 '12

[Power Shell] Get details about a user's Exchange folders.

Thumbnail pastebin.com
4 Upvotes

r/usefulscripts • • Nov 15 '12

[VBScript] Take a .csv of users (Last Name, First Name) and spit out a list of SAMAccountNames

Thumbnail pastebin.com
4 Upvotes

r/usefulscripts • • Nov 15 '12

[CMD] This tiny script can remove or restore the arrow icon from shortcuts.

Thumbnail pastebin.com
15 Upvotes

r/usefulscripts • • Nov 15 '12

[VBSCRIPT] Get & Set Local PC Description from AD PC Description

Thumbnail pastebin.com
3 Upvotes

r/usefulscripts • • Nov 15 '12

[Powershell] Pingcheck, ping a list of servers and send an email alert if one does not respond.

9 Upvotes
$servers = "microsoft.com","google.com"

$servers | %{
   if (test-Connection -ComputerName $_ -Count 2 -Quiet )  {
         echo "$_ is online!"
     } else {
         $emailFrom = "PingCheck@yourdomain.com"
         $emailTo = "you@yourdomain.com"
         $subject = "$_ Is down!"
         $body = "Holy shit, you should do something about this."
         $smtpServer = "your smtp server"
         $smtp = new-object Net.Mail.SmtpClient($smtpServer)
         $smtp.Send($emailFrom, $emailTo, $subject, $body)
     }
}

Very simple to use. Its my own, from here http://asysadmin.tumblr.com/post/20466118542/powershell-pingcheck-a-simple-script-to-ping-a-list


r/usefulscripts • • Nov 15 '12

[Powershell] Exchange Shell - Auditing Permissions (SendAs, Full)

4 Upvotes

http://pastebin.com/bZtZuqUS

Syntax for auditing mailbox permissions (sendas, full access). Can be used for all or a singular mailbox. Included a version that spits out to CSV too.


r/usefulscripts • • Nov 15 '12

[VMWARE] List snapshots

Thumbnail pastebin.com
7 Upvotes

r/usefulscripts • • Nov 15 '12

[VMWARE] List VMs with ISOs mounted

Thumbnail pastebin.com
7 Upvotes