Wednesday, December 29, 2010

Full Mode Toggle in TSCLIENT on Ubuntu

Finally figured out how to toggle full screen mode on TSCLIENT in Ubuntu.

CTRL + ALT + ENTER

Pretty simple, now that I know.

-Boston Tech Guy

Thursday, December 23, 2010

Extending System & Boot Drives on VM Ware

I found a fantastic way of extending C:\ Drive (Boot & or System Drives) on Windows Servers on VM Ware hosts.

As per Microsoft and VM Ware, you cant extend the volume of a Boot and/or System drive using DISKPART. Article from Microsoft: Click Here. This has been true for years and still applies today.. BUT.

I have found a way to increase the size of a Windows Boot Drive. Yes it can be done. For this trick to work you must have the following conditions:
  1. You need two VM servers (server that needs to extend the C Drive and server that the work is done on)
  2. Both Servers must be on the same VM Host or Cluster if you are using HA Clusters
  3. Datastores of both servers must be on same Host Cluster (usually given with above statement but not always)
These directions are written quickly so I can remember them. They take liberties that you know what you are doing with DISKPART and VM Client. If not as they say at on TV: DO NOT TRY THIS AT HOME.

As always before proceeding, make a backup of all servers. Now that we have our conditions, we can proceed.

  1. Server 1 (server that needs space) needs to be shutdown and Powered Off in VM Client.
  2. Go into SETTINGS of the Server 1 and locate the exact location of DISK 1. Typically its the C Drive. If not, located the correct Disk.
  3. Add the new space you want to give to to this drive.
  4. Make note of the exact location and name of the disk on the datastore.
  5. Go to Server 2. Bring it down if not already. Once the VM is down, goto SETTINGS and click ADD.
  6. Choose HARD DRIVE then click NEXT. On the option of NEW DISK or EXISTING DISK, choose EXISTING.
  7. This will allow you to either type or locate the location of the DISK 1 from SERVER 1. Do so and save your changes
  8. Boot Server 2.
  9. Once booted up, you will see under DISK MANAGER a new hard drive with unallocated space.
  10. Run DISKPART. Select the correct Volume on the DISK from Server 1 and Extend the volume.
  11. Once the drive has been extended to the new size turn Server 2 off. Now that Server 2 is Edit the SETTINGS and remove the DISK from Server 1. NOTE: DO NOT SELECT REMOVE FROM STRORAGE. THAT WILL DELETE THE HARD DRIVE and you have a bad day.
  12. Now turn Server 1 back on. You should have a new large C Drive.

They directions are written quickly so I can remember them. They take liberities that you know what you are doing with DISKPART and VM Client. If not as they say at on TV: DO NOT TRY THIS AT HOME.

Sometime down the line I will clean up the directions with screen shots and etc. However this works for now.

Later
-Boston Tech Guy out.

Tuesday, December 7, 2010

Grass isnt greener but love the work

Ubuntu LiveCD Rocks, period.

I have used boot from CD options before in the past, not like what I see with Ubuntu LiveCD. It has the feeling of Apple's boot from "anything" option (which I love). The whole thing loaded into memory and worked perfectly on my home workstation.

Still having issues with it on my laptop. I cant get it to connect to my wireless network. Which I think is good. Gives me something to troubleshoot on why its not working.

Over the last few days I have backed up my work laptops HDD. I then uninstalled a ton of crap that I didn't need (World of Warcraft isn't crap but didn't need it on my laptop). This gave me alot of space to work with. So I am currently installing Ubuntu 10.10 with Windows 7 Dual Boot.

I chose the option of repartitioning the hard drive within the Ubuntu install menu. I want to learn how this works, why and why it doesnt work, and how Windows 7 will react to the change. I personally would not do this on my Intel I7 Machine.

About 50% through the install it crashed. I feel this is due to my laptop and not the install. Now I am checking my Windows 7 install and see what has happened....States problem with DISK please scan blah blah.. ok Windows 7 loaded, prompt log in and.... and... I am in.

Will try again on the laptop soon.

-Boston Tech Guy out

Friday, December 3, 2010

Looking over the Fence

I have been wanting to explore Linux more and more. Not only will my career in the long term require it but its good to have the experience under my belt.

I have and will most likely still be a Windows guy for a long time. I wouldn't be presumptuous in stating a Windows guy for life, but Windows 7 is a very good OS in my humble opinion.

I have decide to look at Ubuntu Desktop OS. If I am to look at Open Source Linux might as well go with the King and most open. While Red Hat does have the Enterprise Market with RHEL, I would rather cut my teeth on Ubuntu.

It seems every few years I try to go to Linux with little success. Now I am going to make it stick. I have always stated that I am not an OS hater (choose a camp and fight for it). I am a Windows guy personally and that's ok for me. However I have always stated use an OS that best fits your needs. I avoid OS fights. Especially the MAC ones. If I get pulled into another MAC fight I will toss a drink into someones' face. I will say the same for the Windows and Linux zealots. You like what you like I get that, but stop selling the other short for reasons X, Y & Z. People just needs to be cool. (Side Rant: Some have stated I am a MAC hater, this is not true. I am an Apple Hater. The difference? MAC OS is a good OS. However Apple's business practices and pricing I will not put up with. Thats why I dont buy Apple products.)

I have downloaded Ubuntu 10.10 to a CD. I love the LIVECD option that comes with most Linux Distros these days. Booting took a bit to load even on my Intel Core 7 machine with 4GBs Memory. But hey, its booting the OS directly to memory from a CD. Call me impressed. Will continue down this road and see where it take me.

I am also getting VMWARE vSphere on a server at the house. I have plans for that and linux will be involved.

Lets see what happens. BTW this entire post was down on Firefox on my Ubuntu LIVECD boot.

-Boston Tech Out

Thursday, October 14, 2010

Remotely Start/Stop Services Powershell

After some work and a whole lot of searching, I have found a script that will start and stop services using PowerShell.

I have been told that Powershell 2.0 has better options to do this but I have yet to locate it. Alot of people are stating "You can do that in PS 2.0 way easier.." Really HOW??? I have yet to see a post on how to do it...

Anyway here's the script:

$list = Get-Content "Location of List\list1.txt"
foreach ($s in $list)
{
(gwmi win32_service -computername $s -filter "name=''the service name").stopservice()
}

You can also use '.startservice()' at the end of line in the loop to start the service.

Quick, easy and to the point.

-Boston Tech Guy out.

Monday, August 9, 2010

Copy-Items, Loops and Variables

Needed to copy 310,000 files scattered all over an old archive. I know how to do loops, I know how to use COPY-ITEM cmdlet, and I know Variables. Now do I know that I can use them together? Yes you can. I built this from scratch hoping it would work and it does.

$list = Get-Content "'Location of list'\list.txt"
Foreach ($file in $list)
{
Copy-Item "Location of Original Files"
\$file C:\"Destination Location"
}


Very simple. Make a list of the files you have to grab and call it $LIST

Enter the loop where each $FILE equals a file name in the $LIST

Copy each $FILE from it original location to the destination.

Done and Done.

-Boston Tech Guy out

Tuesday, May 25, 2010

Using Powershell to Reboot Servers

I have seen a few articles on using Powershell scripts to reboot servers. I also have seen that getting a script to run from Schedule Task can be tricky. However I have been diligent to do so.

Today I think I have my script and list in a working solution. Its currently working in a lab with test VMs.

We have an SaaS environment that requires nightly reboots. Don't ask, I didn't write the app but it does. Nightmarish I know. Anyway I cant reboot the whole environment at once. I need to split it up in two segments. What I did is to have two scripts with a server list each.

Here is the code for the Powershell Script. As usual will breakdown the code down in the post:

$list = Get-Content "E:\testserverlist.txt"
foreach ($s in $list)
{
(gwmi win32_operatingsystem -ComputerName $s).Win32Shutdown(6)
}

While it appears to be fairly simple, it took some time to get. I was having a few issues locating the proper WMI commands to reboot a machine. The up side, I can use IP Addresses with "-ComputerName" so I am not being held back by any issues with DNS in our AD environment.

Break down:
Variable "$list" is loading the IPs from the TestServerList.txt
Each IP in the list is $s
For every "$S" IP Address, send the command to FORCE REBOOT.

Once figured out, its pretty direct and simple. The only issue I am currently running into is the Communication Time Out when Powershell tries to send a command to a server that is already down. With the old SHUTDOWN command in DOS,the command is sent not waiting for a response. Powershell however is waiting for a response and I have to wait for a time out. Little more research is needed for that. I would want to set a time out of five seconds then move onto the next IP. Also will look at how to email on the timeout when it occurs. I have read other scripts on how to do that.

-Boston Tech Guy Out.

Tuesday, January 5, 2010

Windows 7 "God" Folder

Microsoft appears to have created a "GodMode" folder trick into Windows 7. Here is how you create the folder.

  1. Create a new folder
  2. Name the folder as exactly: GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}
NOTE: The full name must be placed into the name of the folder. Line breaks may make this name look different. However its all one word.

The icon of the folder should change. Located inside the folder are all the configuration settings and utilities for Windows 7. This would make Windows 7 changes a lot easier for IT and DEV staff.

-Boston Tech Guy out