0

Code snippets : Handy wmic commands

-

Some handy wmic commands which might be helpful when automating OS deployment:

wmic bios get serialnumber
wmic computersystem get manufacturer
wmic computersystem get model
0

Code snippets : Downloading file from URL in PowerShell

-

To download file from URL I used following piece of code:

$fileURL = "http://server/file.zip"
$fileName = "C:\Downloads\file.zip"
$webclient = New-Object System.Net.WebClient
$webclient.DownloadFile($fileURL,$fileName)
41

Automating file transfer via SFTP i FTPS using WinSCP

-

Some time ago I received request to automate file transfer between FTP server and Development systems. Both, FTP server and Development system, are Windows-based. FTP server was running FTP over SSL only, so that automatically eliminated built-in Windows FTP command-line app. As I was using WinSCP in the past decided to do quick check if it is possible to use it in batch mode, so I can create script and run it on Windows Task Scheduler to automate whole process.

(more…)

0

How-To : Prep to SCCM 2007 R2 to SCCM 2012 SP1 Migration

-

Quick steps which should be done as pre-migration steps when you want to migrate System Center Configuration Manager 2007 R2 to System Center 2012 SP1 Configuration Manager.

Diagram below shows schematics of the lab environment prepared for migration testing.

SCCM Migration from 2007 to 2012

(more…)

0

Games : Codes : Skyrim – finding Aldis in Solitude

-

During the quest about Angeline’s daughter it might be not possible even to find Aldis. It is possible that he died during attack on Solitude. In that case some easiest way is to bring Aldis to player 🙂

(more…)

0

How-To : Autostart Parsoid on openSUSE 13.1

-

Once Parsoid is installed on openSUSE it might be handy to have is started automatically once system is restarted.

First we have to create startup script.

/etc/init.d/parsoid

#!/bin/sh

#
# description: Node.js /srv/parsoid/api/server.js
#

. /etc/rc.status

USER="root"

DAEMON="/usr/bin/node"
ROOT_DIR="/srv/parsoid/api"
LOG_ROOT="/var/log/nodejs"

SERVER="$ROOT_DIR/server.js"
LOG_FILE="$LOG_ROOT/parsoid.log"

LOCK_FILE="/var/lock/subsys/node-server"

WORKERS_NUMBER=8

do_start()
{
if [ ! -f "$LOCK_FILE" ] ; then
echo -n $"Starting $SERVER: "
runuser -l "$USER" -c "$DAEMON $SERVER -n $WORKERS_NUMBER >> $LOG_FILE &" && echo || echo
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $LOCK_FILE
else
echo "$SERVER is locked."
RETVAL=1
fi
}
do_stop()
{
echo -n $"Stopping $SERVER: "
pid=`ps -aefw | grep "$DAEMON $SERVER" | grep -v " grep " | awk '{print $2}'`
kill -9 $pid > /dev/null 2>&1 && echo || echo
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f $LOCK_FILE
}

case "$1" in
start)
do_start
;;
stop)
do_stop
;;
restart)
do_stop
do_start
;;
*)
echo "Usage: $0 {start|stop|restart}"
RETVAL=1
esac

exit $RETVAL
Remember to adjust all paths and number of worker processes accordingly to your installation.

Once startup script is in place we have to enable Parsoid to be automatically started:

chkconfig parsoid on

From now on Parsoid will be automatically started after each restart.

0

Games : Screenshots : Skyrim – Visiting Sovngard

-

(more…)

0

Code snippets : CMD : Dump Windows Server DHCP configuration

-

If you need to capture configuration of Windows-based DHCP server for documentation or review purposes, this might be handy:

netsh -r lab-dc-01 dhcp server dump > C:\dhcp-lab-dc-01.txt

NOTE: lab-dc-01 in example command is name of the Windows server which has DHCP installed.

Example DHCP server dump from Windows Server 2008 R2 you can see here. It contains one scope for subnet 172.16.90.0/24, option for DNS and default gateway defined.

0

How-to : L2L IPsec VPN between Cisco ISR 2811 and DrayTek Vigor 2850n

-

Whole idea for that article came from real environment. At home I have DrayTek Vigor 2850n as my broadband router (and in fact it is really nice piece of equipment). Same time I’m using some Cisco equipment located in remote Lab for testing purposes. Remote Lab is connected to Intrenet and before to get access to devices and systems located there I was using EzVPN. However, as Lab has Cisco ISR as main router I thought, why not to establish L2L IPsec between my home network and remote Lab. Now, question how to do that. I have DrayTek on one end and Cisco ISR on the other. After few attempts, mis-configurations and troubleshooting it did work quite well in fact. So, here it is.

Here is what needs to be achieved:

Equipment available:

  • Cisco ISR 2811 – on the left side of the diagram – internal network 10.255.0.0/24
  • DrayTek Vigor 2850n – on the right side of the diagram – internal network 10.130.1.0/24

Goal:

  • Establish IPsec VPN Tunnel between Cisco and DrayTek to make communication available between 10.255.0.0/24 and 10.130.1.0/24.

(more…)

0

Cheat Sheet : SCCM Client Versions

-

Handy information during pre-deployment checks/validations.

System Center 2012 Configuration Manager Beta 2 5.00.7561.0000
System Center 2012 Configuration Manager RC1 5.00.7678.0000
System Center 2012 Configuration Manager RC2 5.00.7703.0000
System Center 2012 Configuration Manager RTM 5.00.7711.0000
System Center 2012 Configuration Manager CU1 5.00.7711.0200
System Center 2012 Configuration Manager CU2 5.00.7711.0301
System Center 2012 Configuration Manager SP1 Beta 5.00.7561.0000
System Center 2012 Configuration Manager SP1 5.00.7804.1000
System Center 2012 Configuration Manager SP1 CU1 5.00.7804.1202
System Center 2012 Configuration Manager SP1 CU2 5.00.7804.1300
System Center 2012 Configuration Manager SP1 CU3 5.00.7804.1400
System Center 2012 Configuration Manager SP1 CU4 5.00.7804.1500
System Center 2012 Configuration Manager R2 5.00.7958.1000
System Center 2012 Configuration Manager R2   Hotfix: KB 2905002 5.00.7958.1101
System Center 2012 Configuration Manager R2 CU1 5.00.7958.1203
System Center Configuration Manager 2007 4.00.5931.0000
System Center Configuration Manager2007 SP1 4.00.6221.1000
System Center Configuration Manager2007 SP1 (KB) 4.00.6221.1193
System Center Configuration Manager2007 R2 4.00.6221.1193
System Center Configuration Manager2007 SP2 4.00.6487.2000
System Center Configuration Manager2007 SP2 (KB) 4.00.6487.2111
System Center Configuration Manager2007 R3 4.00.6487.2157