Posts

PowerShell domain disk statistics report

Image
Ever needed an automated disk statistics report for your Windows domain?  I did.  I was able to gather bits and pieces from around the Internet and create the script below. It's designed for my needs but can be easily edited to suit yours.  The basic functionality is to use WMI via PowerShell to poll servers, PCs, or both and grab disk usage for any system within the targeting parameters and generate an easy to read HTML report that is emailed to anyone needed. Our environment is comprised of both physical and virtual systems.  I need to be able to spot systems running low on disk space with expandable disks (virtual) that can be quickly grown if needed.  The output color codes C: drives below 60 GB in red, that's my low threshold.  It also color codes physical verses virtual.  You can select between a full report of every system, or a brief option for only systems below threshold.  You can also filter by server or PC and turn console out...

Redhat / Centos ShellShock remediation

I realize it's old info now but I'm posting this for my own reference.  This info was gleaned from other sites.  I adapted the tests to display results in color.  Hey I'm old, it helps to see things  :-) The tests are listed as Redhat or Centos but the same script should work on any version of Linux and probably Unix as well. BASH ShellShock Remediation Redhat/Centos version: cat /etc/redhat-release BASH version: bash -version     Or rpm -qa | grep bash Test:  clear;env x="() { :;}; echo -e '\033[1;31mVULNERABLE\033[0m'" "BASH_FUNC_x()=() { :;}; echo VULNERABLE" bash -c " echo -ShellShock-Test-"    Or clear;env X="() { :;} ; echo -e '\033[1;31mVULNERABLE\033[0m'" /bin/sh -c "echo -ShellShock-Test-" Result before patching: VULNERABLE bash: BASH_FUNC_x(): line 0: syntax error near unexpected token `)' bash: BASH_FUNC_x(): line 0: `BASH_FUNC_x() () { :;}; echo VULNERA...