Veröffentlicht in Windows Server 2012

Windows Server 2012 R2: Netzwerk-Profil mit PowerShell auf “Privat” ändern

Es kommt immer wieder vor, dass ein Windows Server 2012 das Netzwerk-Profil (Domäne oder Privat) nicht sauber erkannt hat und stattdessen auf “Öffentlich” steht. Selbstverständlich hat dies Auswirkungen auf die gesetzten Firewallregeln.

Hierzu kommt wieder einmal die Windows PowerShell zum Einsatz 🙂

Windows PowerShell als Administrator starten
mit folgendem Befehl die aktuellen Einstellungen prüfen und InterfaceIndex notieren!

Get-NetConnectionProfile

Dann mit dem folgenden Befehl das Profil auf Privat ändern

Set-NetConnectionProfile -InterfaceIndex # -NetworkCategory Private
Veröffentlicht in Netzwerk, Ubiquiti

Ubiquiti UniFi AP – Restore zur original Firmware

The process of resetting the UAP is as follows

Please download the following software before you start this guide – http://kin.klever.net/dist/pumpkin-2.7.3.exe

  1. Unplug the ethernet from the Unifi AP
  2. Press and hold in a paper-clip or other object in to the Reset hole (next to the Ethernet plug) on the AP. Make sure you can feel it pushed in.
  3. Plug the Ethernet cable back in whilst still keeping the reset button held in.
  4. After around 25 seconds the light on the Unifi will go between flashing orange then green, orange then green etc. This means the AP is in upgrade mode.
  5. Set your PC’s network IP address to 192.168.1.25, subnet is 255.255.255.0 and gateway is 192.168.1.20 (you might wish to do this in preparation)
  6. Plug the LAN cable from the Unifi POE adapter in to your PC.
  7. Open the TFTP application (in this instance we’re using the Pumpkin software as an example) and click on „Put File“. In „Local file“ choose your original firmware file. In the „Remote host“ field enter 192.168.1.20 – then click OK.
  8. You should now have some indication of the file being transferred )in Pumpkin you’d see the numbers going up as the file is transferred).
  9. The firmware on your AP will be upgraded and the device will automatically reboot back to original settings.
  10. Re-connect the LAN cable from the Unifi POE adapter in to your broadband router.
  11. Remember to set your PC’s network IP back to what it was before (DHCP etc).

Quelle: support.purplewifi.net

Veröffentlicht in Virtualisierung

APC Powerchute Network Shutdown auf vmware ESXi Hosts mit virtuellem Storage

APC bietet zum kontrollierten Herunterfahren von Serversystemen die Software PowerChute Network Shutdown (Reliable network-based shutdown of multiple servers). Diese Software kann auch mit VMware ESX/ESXi genutzt werden.

Weitere Informationen dazu finden Sie in der VMware Knowledge Base:
Installing the APC Powerchute Network Shutdown software on VMware ESXi hosts
Installation  of PowerChute Network Shutdown version  4.1

Weiterhin habe ich dann auf ein shutdown.sh skript gesetzt das wie folgt aussieht, da ich sichergehen muss dass das virtuelle Storage zu letzt heruntergefahren wird.

#!/bin/sh
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/vmware/vma/lib64:/opt/vmware/vma/lib
export LD_LIBRARY_PATH
export PERL_LWP_SSL_VERIFY_HOSTNAME=0
SAVEIFS=$IFS
IFS=$(echo -en „\n\b“)
hosts=(ESXINAME01.DOMAIN.LOCAL ESXINAME02.DOMAIN.LOCAL)
ups_vm=“vSphere Management Assistant“
vcenter_vm=“vCenter“
sds1=“STORAGESERVER1″
sds2=“STORAGESERVER2″
dc1=“DOMAINCONTROLLER1″
dc2=“DOMAINCONTROLLER2″
for host in ${hosts[@]}; do
echo $host
source /opt/vmware/vma/bin/vifptarget -s $host
for i in `vmware-cmd -l –username root –password PASSWRORT`; do
if [ `vmware-cmd $i getstate | egrep -c „on“` -eq 1 ]; then
echo $i
if [ `echo $i | egrep -c $ups_vm` -eq 1 ]; then
echo „Skip shut down of VMA“
elif [ `echo $i | egrep -c $vcenter_vm` -eq 1 ]; then
echo „Skip shut down of vcenter“
elif [ `echo $i | egrep -c $sds1` -eq 1 ]; then
echo „Skip shut down of sds1“
elif [ `echo $i | egrep -c $sds2` -eq 1 ]; then
echo „Skip shut down of sds2“
elif [ `echo $i | egrep -c $dc1` -eq 1 ]; then
echo „Skip shut down of dc1“
elif [ `echo $i | egrep -c $dc2` -eq 1 ]; then
echo „Skip shut down of dc2“
else
echo „Shutting down $i“
vmware-cmd „$i“ stop soft
fi
fi
done
source /opt/vmware/vma/bin/vifptarget -c
done

sleep 20
vmware-cmd „DOMAINCONTROLLER1“ stop soft
sleep 10
vmware-cmd „DOMAINCONTROLLER2“ stop soft
sleep 90
vmware-cmd „STORAGESERVER1“ stop soft
sleep 60
vmware-cmd „STORAGESERVER2“ stop soft
sleep 120

vicfg-hostops –server 10.20.30.100 –username root –password PASSWORT –operation shutdown
vicfg-hostops –server 10.20.30.101 –username root –password PASSWORT –operation shutdown