Torx's Mind
Random IT Stuff I have picked up here and there.
Tuesday, April 23, 2013
Powershell mass rename / replace file name
get-childitem *.txt | foreach { rename-item $_ $_.Name.Replace("some_text", "") }
Tuesday, January 08, 2013
Clustering CLI add Dependency
cluster res "cluster Disk 2" /AddDep:"Cluster Disk 3"
Simple command put it here because I keep forgetting it :)
Simple command put it here because I keep forgetting it :)
Clustering a VB script
I was in the need to test some clustering items, but did not need a specific application to be installed. So I had the following VB script to do nothing more than keep writing the current date and time every 30 seconds.
'Option Explicit
Dim objShell
Dim strOutputFile
'//initialize WMI objects
Set objShell = WScript.CreateObject("WScript.Shell")
'//initialize variables
strOutputFile = "C:\temp\super_awesome_log_file_for_keith.log"
tfDoWhileLoopExit = "false"
'//engage
Do While tfDoWhileLoopExit = "false"
'wscript.echo "boo"
objShell.Run("cmd /c ECHO " & Now & chr(62) & chr(62) & " " & strOutputFile)
wscript.sleep 30000
Loop
'//cleanup
Set objShell = Nothing
strOutputFile = ""
tfDoWhileLoopExit = ""
So I created a Generic Application with the follow settings:
'//initialize script components
On Error Resume Next'Option Explicit
Dim objShell
Dim strOutputFile
'//initialize WMI objects
Set objShell = WScript.CreateObject("WScript.Shell")
'//initialize variables
strOutputFile = "C:\temp\super_awesome_log_file_for_keith.log"
tfDoWhileLoopExit = "false"
'//engage
Do While tfDoWhileLoopExit = "false"
'wscript.echo "boo"
objShell.Run("cmd /c ECHO " & Now & chr(62) & chr(62) & " " & strOutputFile)
wscript.sleep 30000
Loop
'//cleanup
Set objShell = Nothing
strOutputFile = ""
tfDoWhileLoopExit = ""
So I created a Generic Application with the follow settings:
Wednesday, May 23, 2012
Mounting a ISO to a HP iLO over HTTP - Part 3: Finally Mounting..
In Part 1 we created a repository, and in Part 2 we created a XML file that will tells the iLO what to do. Now we just have to instruct the iLO to execute the XML. There is two ways to do this with a c7000 chassis and blades.
Mounting a ISO to a HP iLO over HTTP - Part 2: Configuring xml file
In Part 1 I walked you thru setting up a IIS repository for ISO images. Now we have to create a XML file that will instruct the iLO what to do. This part is the easiest as the HP Lights-Out XML Scripting Sample for Windows has a INSERT_Virtual_Media.xml file that we can modify.
Mounting a ISO to a HP iLO over HTTP - Part 1: Setting up IIS
Al server administrators have the common problem of getting media attached to a server (some times multiple). Do you copy it to the server OS or burn it? This becomes a larger problem when you are not in the same physical location of the server, unless you have really, really long arms.
While having a task of updating 65 HP c7000 chassis and the associated 1000 server blades to the latest HP Proliant Support Pack (SPP), I had a big issue with this since I am not located at that data center. After some digging around I found some references in the iLO scripting guide to mounting media. After a lot of trial and error I finally got it to work!
Since this is part one I will walk you thru the steps of setting up a repository to store the iLO xml files and iso images. These steps are done with IIS7 and Windows 2008
Friday, May 11, 2012
QR Codes Rule!
QR Codes are becoming more and more popular. Did you know that you can insert all kinds of information in them? Checkout the QR code generator from QRDroid.com
QR codes are build with a level of redundancy where you can actually cover up part of the QR Code with a company logo. The QR Code in this post is a example of this:
Saturday, October 01, 2011
Monday, August 22, 2011
When was Windows Installed?
Run this little command to find out..
systeminfo | find /i "install date"
systeminfo | find /i "install date"
Thursday, March 24, 2011
Setting time on Data Movers
server_date ALL timezone -name America/Chicago
server_date ALL 1103101315 (EXAMPLE: 11=year 03=mo 10=day 13=hr 15=min)
server_date ALL timesvc stop ntp
server_date ALL timesvc start ntp -sync_delay 10.10.10.10
server_date ALL timesvc update ntp
server_date ALL timesvc
server_date ALL timezone
server_date ALL 1103101315 (EXAMPLE: 11=year 03=mo 10=day 13=hr 15=min)
server_date ALL timesvc stop ntp
server_date ALL timesvc start ntp -sync_delay 10.10.10.10
server_date ALL timesvc update ntp
server_date ALL timesvc
server_date ALL timezone
Subscribe to:
Posts (Atom)
