Categories
How To Windows

Amazing world of dependencies !!

It has been while since I posted anything. Mainly not because I was not learning anything new, but it is because I am not getting enough time nowadays (or in other words, I just got a life now :D). But then I realized that time and time, I like to read my old post to fix some really odd issue and if I don’t keep record of troubles I had in past, I might forget them again. So I decided to find time to write often… it’s my new mid year resolution :D… lets see if I stick to this or not.

Recently I was playing with Windows 2016 Server in our test environment as part of testing it’s viability for our application suite. And so if you have ever worked with .NET Framework project you know that sometimes it can be royal pain to work if there is a version difference between Framework you have installed and Framework project is expecting.

Something like that happened with me in this case too. I need to have Framework 4.0 and Win 2016 has 4.6 installed by default. So against my better judgment, I decided to uninstalled .Net Framework 4.6 from system. It did let me uninstall it just fine but when I rebooted system, it failed to start Server Manager because guess what !! It was depending on .NET Framework 4. So I thought OK, I can download installed from Web and install it using that. But nooooo, since it’s part of OS now you can’t run installer and install framework from there. So I had catch 22 case. I can’t install .NET Framework from installer because it’s part of OS (and you have to use server manager) And you can’t start server manager for installation because you need .NET Framework 4 !!

Dependency

Categories
Windows

Unable to allocate XXX MB of RAM error in Hyper-V

So… after trying Windows 10, I ran into first annoying issue which seem to have no solution at this point.

Main reason I wanted to upgrade to Win 10 (not sure if I had choice since MSFT is literally forcing everyone to upgrade to Win 10) was to try Hyper-V. I am running at any given time @ 3 VMs together and my laptop has 8GB of ram so it has no issue running all of them together.

But today I was getting odd error when I tried to start VMs for something. Exact error was like below,

HyperV

Categories
Uncategorized Windows

Export–Import Windows Firewall Setting using PowerShell

Something I really hate is to do same thing again and again manually … and so I always try to automate that task using scripting … weather it is simple Batch Script … VB Script … Bash .. or my new favorite PowerShell Open-mouthed smile. What I really like about PowerShell is, it exposes whole .NET stack to you and you can do just about anything you can do in any .NET application … but with lot simplicity (should I add … without need to build whole project !)

From past few months I am beginning to get involved in more system preparation tasks for our production and one of the requirement is to configure Windows Firewall to have some rules for our application. And we have to repeat this process on any machine that goes into production. At one point I realized that if you keep doing something repetitively chances are you will make mistake at some point and you will not notice it until you run into some issue and you back trace your steps !!

Then I found that all of these machines have same configuration in them both hardware wise and software wise … and they will also have same firewall exceptions. So it would be nice if I can seamlessly import – export firewall rules from one machine to another machine. Actually this can be done via UI from Windows Firewall with Advance Security (which can be reached by opening up Windows Firewall in control panel and then clicking on “Advanced Settings”). And there you should see two options, Import Policy and Export Policy. And those options does what they say … import / export firewall policy.

Categories
How To Windows

Setting up Domain Controller in Virtual System … Part II

So after setting up Domain Controller (DC) next step is to configure workstations and add them into newly created Domain. It is actually not that difficult part but during my early trials I spent quite a bit time to make these workstations connect to DC. Because even though they were part of same network they were not able to “see” DC because they had different DNS and it took me while to figure that out.

Anyways, first step is to setup fixed IP of workstation. And make sure that in it’s DNS, use IP of DC.

Categories
How To Windows

Setting up Domain Controller in Virtual System … Part I

If you are like me, who like to “experiment” with random software downloaded from Source Forge, CodePlex or anything alike … on top of working on bunch of side projects in different work environments … and you have a “bug” in your mind which make you learn anything and everything .. then I am sure that you have always craved to have a domain controller of your own .. I mean imagine about trying different networking theories to server-client application development to database management … In love

But biggest issue with having personal Domain Controller is you need separate hardware which you can use as a domain controller and it has to be running all the time which could be biggest constraint for many follow IT Professionals and if you are cheapskate like me then you probably have very nice machine but just 1 or 2 machines (not talking about puny laptops … but bigass desktops)… and you want to get as much juice as you can get from that beast (!!) . But if you are not that serious then you can actually use one virtual machine to be as Domain Controller and many other virtual machines as your toys. And in this post I am going to show step by step how to do that ….

To my surprise there are not many “how to” available about setting up domain controller using virtual machines .. hack they don’t have much posts about setting up DC with real hardware !! So it took me real long .. and many tries to have some proper machine to have working domain controller (some were due to unforeseen side effect of using virtual machine). Mainly because this process is not as straight forward as it seems (or that’s what networking guys makes you think Open-mouthed smile)… Okey enough babbling … now the process ….

First you need a good clean virtual machine with new SIDs. Alternatively you can create your own clean image using SYSPREP (built into Windows). I can’t stress enough that if you have an existing image of virtual machine make sure that you use this SYSPREP to prepare nice clean image and use THAT image to setup DC otherwise you will run into weird issues and you will spend hours scratching your ….. head Winking smile. I am using evaluation edition Windows Server 2008 R2 Enterprise, because later on I also want to setup 2 node cluster but that will take some time Smile for now just stick with current task at hand … setting up virtual Domain Controller.

If the image is created using SYSPREP then once booted, it will do some installation and configuration of OS.

Domain Controller 1 Domain Controller 2 Domain Controller 3
Categories
How To Virtualization Windows

Use of SYSPREP to duplicate windows image with new SIDs

From past some time I am trying to create windows domain in home computer with bunch of VMs using Windows Server 2008 R2 for “educational” purposes Open-mouthed smile … my ultimate goal was to setup clustered windows system and have SQL Server in that environment. I want to lean about how SQL Server behaves in clustered systems and what are ups ‘n downs of any clustered system … like OS updates, SQL Server updates, SSIS – SSRS behavior in failover, system crashes etc … I mean you can always lean by reading but I think it gives better idea when you can actually test those theories on some kind of test system Nerd smile

So, by following few blogs, MSDN helps and forums … I was finally able to install and configure everything properly … I had working domain too … but when you try to setup windows cluster, it is recommended by MSFT to validate cluster before setting it up. Which basically runs bunch of tests like check all nodes, their hardware, their compatibility, storage system, network settings etc … and if any test fails then you have to fix that issue before setting up cluster. And if you are not too savvy about these items then it is really painful experience.

So when I tried to run this test .. it failed at one particular point where it validates system configuration. Unfortunately I don’t have screenshot of this error so I can’t show detailed message but it had something to do with system settings. I tried to look for this error and I was not able to find any definitive answer until I found an answer in stackoverflow which mentioned that it could be because of SIDs !

Categories
.NET How To Windows

Setting up personal Source Control Server using Visual SVN Server

I was working on one of my personal projects and I thought that it would be really cool if I have my own source control mechanism so I can always rollback to older versions if I ever need to do it. Till now, I was always just keep multiple copies of each project so if I have to rollback or even just have to compare files then I just open them up and compare it. But with my prolonged exposure to SVN, I found that it is more easy if I have some sort of source control server, I can use it to keep all of my repositories and it will make my like more easy. So just last night I finally completed that task.

Tools of trade,

To setup dedicated Visual SVN Server I used virtual machine with Windows 2008 Server (having 16 Gigs of RAM really helps Open-mouthed smile). Just make sure that machine has static IP, because DHCP will have random IP of machine and then it could be wonky for SVN Server.