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
#!/usr/bin/env python | |
#Credits: Marc Smith, http://marcitland.blogspot.com/2011/02/python-active-directory-linux.html | |
# DarkPixel, https://github.com/darkpixel/scripts/blob/master/getadsmtp.py | |
# JR, http://liveaverage.com | |
import sys, ldap, argparse | |
import ldap.modlist as modlist | |
from ldap.controls import SimplePagedResultsControl |
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
$ds = "dns.yourdomain.com" | |
$nd = "node.to.delete.yourdomain.com" | |
function Get-RevZones ($ds) | |
{ | |
$header = @("zonename","type","storage","prop","lookup") | |
$raw = (dnscmd $ds /enumzones /reverse) | ?{$_ -match "Rev"} | %{$_ -replace "^."} | %{$_ -replace '\s+', ','} | |
return ($raw | ConvertFrom-Csv -Header $header) | |
} |
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
$computer = [System.Net.Dns]::GetHostName() | |
$Computer = [System.Net.Dns]::GetHostName() | |
# Fix issue with console text wrap: | |
$Host.UI.RawUI.BufferSize = New-Object Management.Automation.Host.Size (500, 300) | |
$OK = 0 | |
$Warn = 1 | |
$Crit = 2 | |
$Unk = 3 |
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
import random, socket, sys, logging | |
import pyrad.packet | |
from pyrad.client import Client | |
from pyrad.dictionary import Dictionary | |
logger = logging.getLogger(__name__) | |
logger.setLevel(logging.DEBUG) | |
#Logger Console Handler |
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
<# | |
.Synopsis | |
Synchronizes DHCP reservations to all or select authorized DHCP servers in a given domain. | |
.Description | |
This script utilizes a user-specified source (master) DHCP server and synchronizes | |
all or some scope reservations between other, authorized DHCP servers for a given domain. | |
Netsh commands can be generated for manual execution or executed automatically. | |
.Parameter Source |
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 | |
# ############################################################################## | |
# check_dhcp_all_pools.sh - Nagios plugin | |
# | |
# This script querys a MS Windows DHCP-Server via SNMP v2 to fetch informations about the given DHCP-Pool. | |
# | |
# Copyright (C) 2006, 2007 Lars Michelsen <[email protected]>, | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License |
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
$Host.UI.RawUI.BufferSize = New-Object Management.Automation.Host.Size(500,300) | |
$server = $env:COMPUTERNAME | |
$global:debug = "" | |
$global:n_stat = "" | |
$global:n_stattext = "" | |
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
$Host.UI.RawUI.BufferSize = New-Object Management.Automation.Host.Size(900,900) | |
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin | |
$check_name = "Exchange_SG_LogTrunc" | |
$OK = 0 | |
$Warn = 1 | |
$Crit = 2 | |
$Unk = 3 |
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
$Host.UI.RawUI.BufferSize = New-Object Management.Automation.Host.Size(900,900) | |
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin | |
$check_name = "Exchange_SG_CopyStatus" | |
$OK = 0 | |
$Warn = 1 |
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
@echo off | |
REM Note that SysNative is available on x86 2008, and on x86 2003 with KB942589 applied | |
set CONSOLE_WIDTH=500 | |
CD %ProgramFiles(x86)%\check_mk\local-64 | |
FOR /R %%X IN ("*") DO ( %WINDIR%\SysNative\windowspowershell\v1.0\powershell.exe -File "%%X") |
OlderNewer