Lenovo ix4-300d SSH, root home directory and cronjobs

Categories: hacking, Homelab, ix4-300d, Lenovo, NAS, Uncategorized

Couple of weeks ago I got my hands on 3 Lenovo ix4-300d storage boxes. These boxes are no longer produced and sometimes you can get them really cheap. First I had plans to use them as iSCSI storage for my home lab but the performance is not good enough. Therefore I decided to play around […]

Get all guest IPs of all your Virtual Machines using Powershell

Categories: Scripts, Uncategorized, VMware, vSphere

This is a small powershell script to get all Guest IPs from all virtual machines $VCENTER=”10.1.1.3″ Connect-VIServer -Server $VCENTER $vms = Get-VM | Sort $file = “c:\ip_list.txt” foreach ($vm in $vms){ foreach($ip in $vm.Guest.IpAddress){ Write-Host “$vm $ip” “$vm $ip” | Out-File -FilePath $file -Append } } Disconnect-VIServer -Server $VCENTER -Confirm:$false -Force:$true

Upload file to webdav using Powershell

Categories: PowerShell, Scripts

This is small powershell script to upload a file from your local disk to a webdav server. It is also proxy capable. #Complete path of the file to be uploaded $file = “d:\test_file.txt” #URL without the last “/” $url = “https://YOUR-SERVER/webdav” $proxy = “http=PROXY-SERVER:PORT” #User and Pwd for Webdav Access $user = “USERNAME” $pass = […]

Monitor System Logs with Logwatch

Categories: Scripts, Tools, Ubuntu

I’m using the tool Logwatch to get a daily log report from all my servers by email. Install Logwatch: apt-get update apt-get install logwatch Config file: /usr/share/logwatch/default.conf/logwatch.conf To simplify the access to the config file I use a symlink. cd /etc/logwatch ln -s /usr/share/logwatch/default.conf/logwatch.conf Configuration (parameters which I have changed): #Output = stdout Output = […]