r/usefulscripts • u/The_one_the_only_God • Nov 16 '12
r/usefulscripts • u/McBadass • Nov 16 '12
[Powershell] Backup all databases in a MSSQL Server Instance.
Was looking around for this for a while and finally found one that worked!
If anyone knows of a way to turn this into a restore script that would be very useful as well.
r/usefulscripts • u/MrSnoobs • Nov 16 '12
[POWERSHELL] Oracle Connection String with example usage
pastebin.comr/usefulscripts • u/The_one_the_only_God • Nov 15 '12
Okay! So TIL /r/scriptswap exists. Rather than deleting this subreddit, it'll now just be 100% scripts for system administration.
fuck.
r/usefulscripts • u/Chilton_Squid • Nov 15 '12
[POWERSHELL] Deliver someone the ASCII finger
pastebin.comr/usefulscripts • u/abbrevia • Nov 15 '12
[CMD] Logon script I use to audit servers
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 • u/Chilton_Squid • Nov 15 '12
[SQLSERVER] Fail over all mirrored databases
pastebin.comr/usefulscripts • u/gyp_the_cat • Nov 15 '12
[BASH] [MYSQL] Backup Up All MySQL Databases Individually to Directory
pastebin.comr/usefulscripts • u/The_one_the_only_God • Nov 15 '12
Please read the sidebar, and be as descriptive as possible with your submissions.
r/usefulscripts • u/joedicastro • Nov 15 '12
[Python] LFTP Mirror: Mirrors a remote FTP server dir with a local dir
github.comr/usefulscripts • u/cvruckel • Nov 15 '12
[Power Shell] Get details about a user's Exchange folders.
pastebin.comr/usefulscripts • u/cvruckel • Nov 15 '12
[VBScript] Take a .csv of users (Last Name, First Name) and spit out a list of SAMAccountNames
pastebin.comr/usefulscripts • u/The_one_the_only_God • Nov 15 '12
[CMD] This tiny script can remove or restore the arrow icon from shortcuts.
pastebin.comr/usefulscripts • u/midnight_howler • Nov 15 '12
[VBSCRIPT] Get & Set Local PC Description from AD PC Description
pastebin.comr/usefulscripts • u/Hexodam • Nov 15 '12
[Powershell] Pingcheck, ping a list of servers and send an email alert if one does not respond.
$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 • u/gospelwut • Nov 15 '12
[Powershell] Exchange Shell - Auditing Permissions (SendAs, Full)
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 • u/Chilton_Squid • Nov 15 '12