Rexxer

Some tips for me and other

News

Create UEFI booting flash

run diskpart and: select disk N clean create partition primary format fs=fat32 quick active assign list volume exit Copy Win10 files from ISO to flashdrive.

FTP-log + get IP-addresses

cat ftp.txt | grep incorrect | awk ‘{print $8};’ | tr -d “(” | tr -d “)>” | sort -u

PFSense + import DHCP-mappings from dhcpd.conf

I wanted migrate my static mapping from my dhcpd.conf to PFSense. Script to parse data from dhcpd.conf to xml-text: #!/usr/bin/awk -f # # Author: Matt Pascoe – matt@opennetadmin.com # Forked: Konstantin Shalygin – kostya@opentech.ru # Forked2: Rexxer, for PFSense # USAGE: # ./dhcpparse.awk /etc/dhcpd.conf # Note that for hosts, it will try a reverse lookup […]

Exchange 2010 + Default Folder Permissions

Exchange 2007 CAS Role VDir Authentication SSL Management done through Default Web Site Anonymous Yes IIS and HTTP Keep Alive should be on /Owa Basic Yes EMC/Powershell /Exchange Basic Yes EMC/Powershell /Public Basic Yes EMC/Powershell /Exchweb Basic Yes EMC/Powershell /Oab Integrated No EMC/Powershell /Autodiscover Basic and Integrated Yes Powershell /Ews Integrated Yes Powershell /UnifiedMessaging Integrated […]

Powershell + Remote

Run powershell on the remote PC and run it: Enable-PSRemoting -Force Set-Item wsman:\localhost\client\trustedhosts * Restart-Service WinRM Test the connection from the local PC: Test-WsMan COMPUTERNAME Run the remote command: Invoke-Command -ComputerName COMPUTERNAME -ScriptBlock { COMMAND } -credential USERNAME

DHCPD + Classes e.g. MAC-address

subnet 192.168.30.0 netmask 255.255.255.0 { option routers 192.168.30.1; option domain-name-servers 192.168.30.11, 192.168.30.2; class “Hyper-V” { match if substring(hardware,1,3) = 00:15:5d; } class “VMWare” { match if substring(hardware,1,3) = 00:0c:29; } class “Winemu” { match if substring(hardware,1,3) = 00:03:ff; } pool { range 192.168.30.100 192.168.30.130; allow members of “Hyper-V”; } pool { range 192.168.30.131 192.168.30.160; allow […]

Get-ADUser scripts

Get users with the specified manager: Get-ADUser -Filter { Manager -eq “CN=Ivan Ivanov,OU=Users,DC=contoso,DC=com” } -Properties Mal, Title | ft Name, Title Do not forget to run before: import-module ActiveDirectory Get info about users which are in the group: Get-ADGroupMember groupname | Get-ADUser -Properties Name, Title | ft Name, Title

Zabbix 3 + Adding VMWare hosts

Create vSphere host Add 4 macros: – {$USERNAME} – username which has an administrative privileges on VMware – {$PASSWORD) – password for username – {$URL} – https://10.10.10.10/sdk (where 10.10.10.10 is the address of vSphere host, not VMware supervisor) – {$UUID} – $UUID can be obtain by requesting the hypervisor webservices like https://hostname/mob/?moid=ha-host&…are.systemInfo You will see […]

Zabbix 3 Appliance + Extend disk space

Extend HDD in your VM on Hyper-V, ESXi, … Rescan drives in VM: echo “- – -” > /sys/class/scsi_host/host#/scan Check it: fdisk -l Create a new partition with code 8E (Linux LVM): cfdisk /dev/sda Reboot (or reread info about disks) Create new partition for LVM: pvcreate /dev/sda6 Extend LVM (vg_name was zabbix-vg in my case): […]

Certificate + Add a private key

Copy-pasted from: http://www.entrust.net/knowledge-base/technote.cfm?tn=7905 Entrust Certificate Services Support Knowledge Base Audience: General Last Modified: 2011-01-18 08:42:02.0 TN 7905 – What are the steps to recover the private key of an SSL certificate in an IIS environment? Problem: The SSL certificate is installed but the private key is missing. What are the steps to recover the private […]

Previous Posts Next posts