Rexxer

Some tips for me and other

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 […]

Exchange + Search mail

get-mailbox -resultsize unlimited | Search-Mailbox -SearchQuery ‘attachment:”Filename”‘ -TargetMailbox UserName -TargetFolder “FolderName” -LogOnly -LogLevel Ful another lookup: Search-Mailbox -Identity “vasya.pupkin” -SearchQuery “to:domainname.com” -TargetMailbox “ivan.ivanov” -TargetFolder “Folderame” -LogLevel Full

Exchnage + Restore Deleted Items between dates

Search-Mailbox -identity ivan.ivanov -SearchDumpsterOnly -SearchQuery “Received:2016-01-01..2016-04-01” -TargetMailbox ForDeletedMail -TargetFolder RestoredDeleted Another example: Search-Mailbox Superman -SearchDumpster -SearchQuery “(Received:1/1/2012..5/18/2016) AND (To:Batman@DC.com OR From:Batman@DC.com OR CC:Batman@DC.com OR BCC:Batman@DC.com OR ‘Batman’ OR ‘Bruce’ OR ‘Wayne’)” –targetmailbox BobTheLawyer -loglevel full -targetfolder “Search_Batman” Keywords for SearchQuery: https://msdn.microsoft.com/library/ee558911%28v=office.15%29.aspx?f=255&MSPPError=-2147217396 Script (I haven’t try it): https://blogs.msdn.microsoft.com/emeamsgdev/2012/04/27/powershell-script-to-recover-all-deleted-items-in-a-mailbox/

iPhone + DFU mode

Для того что бы перевести телефон в DFU режим нужно зажать кнопки HOME и POWER на 10 секунд, потом не отпуская HOME отпустить POWER (экран телефона должен быть черным), держать HOME еще 10 сек. Телефон в это время должен быть подключен к компьютеру. iTunes определит что телефон находится в режиме восстановления, на экране телефона не […]

WSUS + Repairing

You can try to connect to Windows Internal Database with SQL manager(run as admin) by \\.\pipe\MICROSOFT##WID\tsql\query link. In my case I found SUSDB with Pending repairing status. I took it offline and then online after 2-3 attempts. I could backup it and shrink but this didn’t help – the DB was about 6Gb. So I […]

Server reboot + variants

Нормальная работа reboot проблемы с софтом reboot -f проблемы с ядром/маунтами/libc echo b>/proc/sysrq-trigger проблемы с ядром/маунтами/libc и нет открытой консоли ipt_SYSRQ (надо подготовить заранее) проблемы с ядром/железом ipmitool chassis power cycle проблемы с ядром/железом без открытой консоли ipmitool -H ipmi.server.local chassis power cycle проблемы с автономной переферией/БП/ipmi ребут через IP-розетку

Previous Posts Next posts