I have used Hyper-V for as long as there has been Hyper-V. Today I use it much less than I once did, but it is still handy for running VMs on my laptop. I run a particular VM called ‘Sandbox’ in which I do all sorts of things that I would not want to do on my live system… things that I can simply try and then wipe.
When I built the Sandbox VM I was spending a lot of time at home, and portability was not a huge issue. I ran it on one of my external drives, and it worked fine. I allocated 100GB and was good to go.
When I realized I was going to be on the road again I could just as easily take my external hard drive with me, but the shortage of USB ports on my Surface Pro meant making a decision… I was going to shrink the VHDX file and put it on my internal hard drive.
76GB free space. That’s going to be a problem.
Step 1: Shrink your partitions
My 100GB virtual hard drive (.vhdx file) meant that somewhere within the VM I had a 100GB partition (or at least a few partitions that added up to that). I had to shrink as much as I could.
- If you have a Pagefile.sys, Swapfile.sys, and Hiberfil.sys you should eliminate them now. Remember that even if you turn off Memory Paging the files don’t disappear until you reboot.
- Defragment the disk. We may not talk much about it anymore, but the old faithful defrag.exe C: still works.
- Use the Disk Manager console to shrink your C: as much as you can… but not too much. When I tried it I had the option to shrink it down to 11.5 GB… I’m pretty sure that would render my VM pretty useless. Pick a number that works for you. I chose 60GB.
- Using the diskpart tool delete any partitions at the end of your drive. I had a 450MB Recovery partition on mine.
Because it was a Recovery (read: SYSTEM) partition I needed to do the following:
Select Partition 5
Delete Partition OVERRIDE
Good… Now we can shrink the VHDX file.
In the older versions of Hyper-V this would have meant shutting down the VM. You don’t have to do that anymore… but you do have to run PowerShell as an Admin. Once you do:
Step 2: Shrink your VHDX file
The cmdlet is easy…
- Navigate to the directory where you keep your VHD file;
- Resize-VHD -Path .\Sandbox-PC.vhdx -SizeBytes 60GB
It will only take a minute and you will be done. Simple as pie!
Every so often Microsoft releases a bunch of new books that they give away for free. Most of the time they are for the latest and greatest software and systems, so they are worth checking out. Currently they have books for:
Microsoft SQL Server 2016
Windows Server 2016
Microsoft Power BI
Microsoft SharePoint Hybrid Capabilities
Mobile App Development
…and much more. Check out the list here.
While it is nice to be able to download these as PDF files, I am really happy that I can also download all of these files as proper e-Books from www.kobobooks.com for my Kobo, and I assume from www.Amazon.ca for my Kindle (I don’t have a Kindle… but you know what I am saying).
Here is what I like to do to make sure I don’t miss a thing:
- I log on to my Kobo account.
- I enter the name of the product I am looking for in the Search bar (say, Windows 10).
- When the list comes up I change the Sort parameters to Sort By: Price: Low to High. This ensures that the FREE books come up first.
Let me be clear though, there are some excellent books on all of these subjects that are not free, and are probably worth buying. That is not the point of the article though
Thanks Microsoft Virtual Academy!
My day started with an urgent matter at the office… It was a small thing to fix but it prevented someone from working, so it was my priority. Unfortunately for some reason I couldn’t connect to my corporate VPN, so I went into the office and fixed it.
Because I am not working full time right now I normally would not have gone in today… in fact, knowing how I was feeling after not getting a lot of sleep last night I might just have stayed home and taken a lazy day until my appointments which start late in the afternoon. No, I was in the office at 9:30am instead.
I was not upset about this… far from it. I have been getting things done that I needed to do today, some of which I have been putting off for a while. I went to the Microsoft Store to pick something up (and exchange another), and I am not going to head downtown to pick up a gift certificate I won on the radio.
There are going to be bad days, no question. But there are also days that can be looked at from different perspectives, and the difference between a good day and a bad day may just be how you decide to view it. I decided to make today a good day… I hope yours is too!
Ok, not about everything…
It was the best of times, it was the worst of times… This is certainly one of the most familiar opening lines of any book written since Genesis (which, it should be noted, was not a book at all). The opening sentence from A Tale of Two Cities can certainly describe the last couple of years of my life.
To look at Facebook, 2016 was the worst year ever. from the deaths of celebrities from David Bowie and Allan Rickman and Glenn Frey and myriad others, to the nastiest U.S. Election Campaign in history (culminating in the election of who can best be described as ‘The Lesser of Two Evils’) , 2016 was simply a terrible year.
I rang in 2016 at a beach resort in Cuba, with the woman I expected to spend the rest of my life with, having just finished implementing the largest IT project I had ever architected. My family was healthy, and things were looking good.
January and February of 2016 were certainly good months for me.
Professionally, as well as financially, 2016 were not terrible years for me. I re-joined and subsequently re-left Microsoft as a contractor… I taught a few classes. I earned a decent if not spectacular living… but I was able to pay my bills and still put a couple of shekels aside for a rainy day.
I remembered that while my responsibilities are important, it is also important to live. So I went on more vacations in 2016 than in any previous year, bar none. That is to say, trips where I got onto an airplane to a destination where NO work had to be done:
- I went to Cuba over New Year with my (then) girlfriend… Ten days in Paradise, in the Las Tunas province, far from everything but the beach and the bar.
- I went to Las Vegas in May with the same girlfriend (shortly after we got back together following our first breakup) and a couple of friends. We had some good food, we saw two amazing bucket-list concerts.
- I went twice more to Cuba with a friend (this time to Varadero), with numerous side trips into Havana).
Unfortunately not all was sunshine and cigars… Things with the girlfriend were going so well… until she ended things… twice. When we got back together she made it clear that we were forever. Unfortunately Forever didn’t last… in fact it didn’t quite make it to Thanksgiving. And so I am single again. I will spare you a retelling of the drama.
My best friend in the whole world… my four-legged friend who always meant everything to me passed away in March. I do not know if it was the saddest day of the year… yes, I do. It was heartbreaking to watch him suffer, and to hold him as he closed his eyes for the last time. I cannot think of anything that made me cry like I did that night. I also cannot think of anything that made me drink like I did that night.
While the attachment was not at all like with Jacob, my now ex-girlfriend’s dog passed away a few months later. Sir Gunter Red-Mane was another wonderful friend, and that was another very sad day.
As a father, it is amazing to watch my children grow, to mature. It is also very painful to watch their growing pains. My older son has grown into an amazing 18-year-old who is at a stage where he wants to be a man, but like any kid of that age he does not have all of the tools he needs to be one. However he has gone off to university, and one day he will conquer the world.
My younger son is a happy little boy who has some issues, and we are dealing with them. I thank G-d every day for his mother who does an amazing job with him. I know that I am the ‘weekend Dad’ who gets to have fun with him and watch movies and go out, but she is the one who deals with the times when he is not all smiles and giggles. She and I may not have been good as a married couple, but I am so grateful to have her as a co-parent.
My health is okay, my weight today (despite all my best efforts) is about 5lbs less than it was a year ago… better than 5lbs up, but still not enough. That is my continuing struggle. I have spent a good amount of time working out at the gym over the past year… not as consistent as I need to be, but much better than I could be.
And now, looking forward at 2017, I do not know what will be… I will strive to make it the best year that I can, and hope I can deal with any problems that arise as well as possible.
I know I am 18 days late folks… but Happy 2017 to all of you!
Like most IT Managers I manage myriad servers, most of which are both remote and virtual. So when I configure them initially I make sure that I can manage them remotely… including in most cases the ability to connect via RDP (Remote Desktop).
But what happens if you have a server that you need to connect to, but does not have RDP enabled? Using PowerShell it is rather simple to enable the RDP feature remotely:
Enter-PSSession -ComputerName computername.domain.com –Credential domain\username
Set-ItemProperty -Path ‘HKLM:\System\CurrentControlSet\Control\Terminal Server’-name “fDenyTSConnections” -Value 0
Enable-NetFirewallRule -DisplayGroup “Remote Desktop”
Set-ItemProperty -Path ‘HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp’ -name “UserAuthentication” -Value 1
That should get you going. Good luck!
As you know, I have worked closely with the team at ChargeTech recently to tell you about some of their products. Well it may be a little late, but they sent me a Black Friday / Cyber Monday coupon for you to use to get incredible deals off their Portable Power Outlet! From now until the end of the week you can save 60% off the retail price – only US$99, but only if you buy it from here: “The Best Deals we Can Find“, and only if you use the coupon code: 583PPO758!
I look forward to hearing your thoughts about the PPO, and Happy Holidays!
Recently I wrote an article called Free Will… about people using their computers as they want. I mentioned I had written a piece that was to be my introduction to a presentation I was going to do on BYOD, and I promised I would look for it. I found it, and here it is. I look forward to reading your comments! –MDG
I want to tell you a story, and to some of you it will sound like a fairy tale.
Once upon a time there was a company without any computers. Then one day the King decreed: ‘We can be more productive with computers!’ And so the company bought computers… but they didn’t know what to do with the computers.
There was a humble serf in the company who had more than a passing interest in the new technology. The King noticed this, and asked him about the new machines. He sounded like he knew what he was talking about, and when he sat down at the computer he was able to speak with it in a sort of code, and after a few minutes of talking the machine did his bidding… it produced magic, performing seemingly impossible mathematical calculations… but more importantly to the king, he was able to make the company name fill the screen. The King was awed by this magic, and knighted the serf ‘Sir In Charge of Computers.’
The years passed by, and the knight was able to help the company increase its revenues and proved that the original decree that the company could be more productive with computers was in fact true, and way beyond the wildest dreams of the king. Over time the knight spent all of his free time learning more about these machines, increasing his magic, and earning industry certifications which grew his standing among his fellow magicians. He brought more of these magical machines into the company, and increased his domain with larger computers that nobody touched but him called servers, and these servers allowed the users to share information, collaborate on projects, and increase even further the productivity.
Of course the King was not simply impressed, he realized that he had grown richer beyond what he thought possible because of the knight, and one day he brought him into the palace, had him kneel before the King, and with his mighty sword tapped both of his shoulders and claimed ‘You, good Sir Knight, are now Prince Director of IT.
The new prince knew that in order to continue to prove his worth he would need to enlist help, and so he hired several brave knights – Sir Systems Administrator, Sir Desktop Expert, and the mysterious, great, and powerful Lord Infrastructure Architect. Together these magicians made the company prosper for the ages.
The serfs were taught to use their computers but only exactly how the Prince and his band decreed; unauthorized magic was punished harshly. To drive home the importance of the prince’s Acceptable Use Policies, those who veered from the path were struck with plagues – viruses and malware infected them, diminishing their productivity, and causing epidemics that reduced the collective productivity of the kingdom; the King empowered Prince Director of IT to work with Prince Director of Human Resources to severely punish and even banish serfs who veered from the path. These princes were viewed with awe, for those who dared to offend them might be fed to the dragon.
The wheels of time continued to turn, and as the medieval ages of the 80s and 90s made way for the new millennium; many efforts were made to bring magic to the masses, because while some great wizards had predicted that the world would never need more than 640 magicians, the desire to impart the knowledge of magic to the world was great. As magic was simplified, its mystique was slowly diminished.
Times were changing not only for this kingdom, but around the world. The serfs had become accustomed to their magical boxes, and were comfortable performing their daily tasks on them… but they were still wary of the great magic contained within. However the children of the serfs, whose schools began teaching computers very early on, did not see magic, and were not in awe of Prince Director of IT and his Merry Men. As the awe diminished, the serfs became haughty and uppity. ‘We do not wish to follow the Acceptable Use Policies of the prince! We want to use our magic boxes the way we want to use them! We wish to perform our own magic on these boxes!’
The King, understanding that the dangers were great that revolution would destroy the kingdom, told the Prince that he must allow the serfs to use their magic boxes to do their own magic… but because the boxes still belonged to the company, it was still the responsibility of the Prince and his band of men to ensure that these boxes remained safe, and to cure them of any potential illnesses before they could spread and infect others.
The serfs, realizing they could do more with these magical boxes than just work, bought them for their homes. They played, and they connected to the Internet, which opened their eyes to the true power of the magic. Their ire continued to grow within… quietly.
And then, in the second decade of the millennium, the revolution came. ‘We are no longer willing to use the devices that you decree. We want to use our own devices! While you wish to enslave us in a world of magical Windows, we want to explore other worlds, ones replete with fruits of the Apple tree, and robotic Androids, and Berry bushes which may be Black. We will continue to serve the king, but we will only do so on our own terms!
The Prince and his men were appalled; surely the serfs could never properly serve the King with these strange and alien devices. He and his men fought back against the revolution, reassured that they had the full support of the King…
…And then the unthinkable happened. King CEO called the prince into his chambers and decreed ‘You must allow the serfs to use the devices that they choose. You shall not prevent them from doing their own magic on these devices, but at the same time you must ensure the safety and security of our kingdom, and make sure that no epidemics are brought in, and that none of our secrets are compromised. Because you are such a great and powerful magician, so much so that I made you a Prince when you yourself were once a serf, I trust that you will be able to do this. Now go.’
Welcome to the age of Bring Your Own Device.