This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$accounts = @("name1","name2") | |
ForEach ($account in $accounts) | |
{ | |
Get-WmiObject Win32_Service | where {$_.StartName -like "*$account*"} | |
} #end foreach |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Select Servers that are not Domain Controllers | |
$computers = Get-ADComputer -Filter { operatingsystem -like "*server*" -and Enabled -eq "True" } | |
Foreach($computer in $computers) | |
{ | |
} #end foreach |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Put the domain of the computer this script is running on into the $domain variable | |
$domain = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().Name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$DomainControllers = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().DomainControllers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is intended to clean up a CentOS or RedHat 6 box for | |
# conversion to a template in VMWare or other environments | |
# Free to use as a reference document, check before you use this | |
# as I can't take responsibility if it breaks something | |
# You may want to simply delete the config files, | |
# I prefer to just remove the MAC record |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$user = apache | |
ps u -u $user | awk '{total+=$3}END{print total}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo grep "`date "+%b %d"`" /var/log/yum.log | awk '{print $5}' | tr "\n$" ' ' > `date "+%d%b"`.yum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Must be run with root permissions | |
# sudo will be sufficient | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CrashPlan] | |
title=CrashPlan | |
description=CrashPlan is a simple and yet powerful backup solution that does not require a central server for management. | |
ports=4242/tcp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Zimbra] | |
title=Zimbra Collaboration Server | |
description=Open source server for email, contacts, calendar, and more. | |
ports=25,80,110,143,443,465,993,995,7071/tcp |
OlderNewer