Skip to content

Instantly share code, notes, and snippets.

View nmanzi's full-sized avatar
🌀
In a maelstrom of self indulgence.

Nathan Manzi nmanzi

🌀
In a maelstrom of self indulgence.
View GitHub Profile
@nmanzi
nmanzi / extractrar.ps1
Created October 14, 2012 09:21
Extract all RAR files under the current directory (requires unrar.exe in %PATH%)
Get-ChildItem | ?{ $_.PSIsContainer } | ForEach-Object {Get-ChildItem $_ *.rar | select-object -first 1 | foreach-object {unrar x $_.FullName}}
Function ViewVM-SetState {
[cmdletBinding()]
Param (
[parameter(Mandatory=$true)]
[string]$vm, #VM name
[parameter(Mandatory=$true)]
[ValidateSet("MAINTENANCE","READY","DELETING","ERROR")]
[string]$state #State to set the VM to
)
DDavkTFBmKe5VNtQZftq3NJLncD6FWnQNz
@nmanzi
nmanzi / NetApp-ActiveDedupAlert.ps1
Created February 24, 2015 08:41
NetApp-ActiveDedupAlert.ps1
#region Help
# ----------
<#
.SYNOPSIS
NetApp-ActiveDedupAlert.ps1 will send an email to a specified address if it detects a running SIS process on
any volume belonging to specified controllers.
Highlights:
@nmanzi
nmanzi / NetApp-SnapshotReport.ps1
Created February 27, 2015 02:30
NetApp-SnapshotReport.ps1
#region Help
# ----------
<#
.SYNOPSIS
NetApp-SnapshotReport.ps1 will send an email to a specified address with a list of detected volume snapshots on
any volume belonging to specified controllers.
Highlights:
@nmanzi
nmanzi / gist:a6259f69cfe00c5ddf1e
Created December 15, 2015 03:55
pfSense 2.2 Graylog extractors
{
"extractors": [
{
"condition_type": "regex",
"condition_value": "^filterlog:.*,(in|out),4,.*",
"converters": [],
"cursor_strategy": "copy",
"extractor_config": {
"index": 17,
"split_by": ","
#region Help
# ----------
<#
.SYNOPSIS
OracleZFS-StorageConsumptionReport.ps1 will send an email to a specified address when executed
with a list of projects (according to a filter) and the consumed backup storage for each project.
Highlights:
[CmdletBinding(SupportsShouldProcess=$False)]
Param (
[parameter(
Mandatory=$true,
HelpMessage='Filter jobs by name')]
[string]$Filter,
[parameter(
<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: #EEE;}
.emubox {
border: 3px solid green;
padding: 10px;
}
.container{
## Written by nathan.manzi@diverseit.com.au
## Required installation of the ACMESharp powershell module
## Follow installation steps at https://github.com/ebekker/ACMESharp/wiki/Quick-Start
##
Import-Module acmesharp
## !! Modify these variables before running script !!
$domain = "adfs.contoso.com"
$email = "jbloggs@contoso.com"