Category Archives: Microsoft

Installation of .NET 3.5 fails on Windows 8 with Error Code 0x800F0906

Windows_8_Logo

You would have thought that installing .NET 3.5 on Windows 8 will be relatively straight forward – wrong answer!

The easiest way to do this is to go to Control Panel –> All Control Panel Items –> Programs and Features and simply add .NET Framework 3.5 (includes .NET 2.0 and 3.0)

Installation_of_.NET_3.5_fails_on_Windows_8_with_Error_Code_0x800F0906_1

but you are likely to hit one of the following errors:

“Windows couldn’t complete the requested changes. Windows couldn’t connect to the internet to download necessary files. Make sure that you’re connected to the internet, and click ‘Retry’ to try again. Error code: 0x800F0906”

“Update NetFx3 of package Microsoft .NET Framework 3.0 failed to be turned on. Status: 0x800F0906.”

“Update NetFx3 of package Microsoft .NET Framework 3.0 failed to be turned on. Status: 0x800F081F.”

“Update NetFx3 of package Microsoft .NET Framework 3.0 failed to be turned on. Status: 0x800F0907.”
Continue reading

Enabling BitLocker fails with “BitLocker Setup could not find a target system drive. You may need to manually prepare your drive for BitLocker”

Windows_7_Logo

My workplace has finally decided to start encrypting their mobile devices with BitLocker. After number of laptops completed successfully (and without any major issues) today we have hit problems when BitLocker wizard would fail with the following message:

“BitLocker Setup could not find a target system drive. You may need to manually prepare your drive for BitLocker”

Enabling_BitLocker_fails_with_BitLocker_Setup_could_not_find_a_target_system_drive_You_may_need_to_manually_prepare_your_drive_for_BitLocker_1

So far only one machine was affected but there could easily be others. Solution to this issue was not immediately obvious but its essentially due to Windows (or BitLocker wizard) not being able to shrink the drive to create the system partition that’s required for BitLocker (there was only one partition). Trying to manually shrink the drive using Disk Management would not work too as “Size of available shrink space in MB:” was equaling to 0:

Enabling_BitLocker_fails_with_BitLocker_Setup_could_not_find_a_target_system_drive_You_may_need_to_manually_prepare_your_drive_for_BitLocker_2

Now this number was showing 44MB before I ran Windows Defrag tool but now is 0MB meaning you cannot shrink the drive at all (not even by 1MB!) In Windows Explorer, internal hard drive was showing 120GB in size with roughly 60GB free so there was plenty of free disk space available in order to re-size the partitions.

Two quick fixes that were applied to finally resolve this are as follows:

  • Since the problematic machine was a laptop (Dell Latitude E6230) hibernation was turned off (powercfg -h off in command line)
  • System Restore points were also deleted (cleanmgr is the command, then More Options tab, System Restore and Shadow Copies and Clean up)
  • After this I re-run BitLocker drive encryption wizard and all was happy again!

    Side note – trying to manually prep the drive using bdehdcfg i.e. bdehdcfg -target c: shrink -size 300 -quiet -restart was not working too.

    Changing Windows 7 system locale for non-Unicode programs

    Changing Windows 7 system locale for non-Unicode programs in registry

    Something rather strange crept up today and its do to with non-Unicode language settings in Windows 7 which weren’t working properly. Basically some of our printers didn’t print barcodes properly and after some extensive troubleshooting the culprit was language in Windows that was set to English (United States) instead of English (United Kingdom) You can find system locale settings for non-Unicode programs under:

    Changing_Windows_7_system_locale_for_non-Unicode_programs_in_registry_2

    Continue reading

    Scripting DHCP server deployments using netsh in Windows Server 2008 R2

    Windows_Server_2008_R2_Logo

    Another quick post to show how you can quickly deploy fully working DHCP server with multiple scopes in a matter of seconds. In my case it was a single server with 90 very different scopes and doing this manually would be just soo boring and long that’s unreal. Unfortunately Windows Server 2012 wasn’t an option so no PowerShell love but Windows Server 2008 R2 is still pretty decent and using netsh wasn’t as painful as it seemed. To get us started we need to install the DHCP Server role and start the required service (dhcpserver):

    Next step is to authorize DHCP server in the enterprise so we can actually use it to dish out IP addresses:

    Other useful commands here would include:

    To deauthorize the server –

    and to list all authorized servers –

    Continue reading

    Windows Server 2008 R2 SP1 – How to Sync Time from External Time Source?

    Windows_Server_2008_R2_Logo

    Quick post to show how you can sync your domain controllers with external time source (time.windows.com or ntp.pool.org for example). By default, all machines in the domain will sync time from the domain controller which is the internal time server – if you have more than one DC then time will sync from the DC that holds the PDC emulator FSMO role. To check which DC is PDC emulator in your domain you need to run netdom /query fsmo command like so:

    Windows_Server_2008_R2_SP1_How_to_Sync_Time_to_External_Time_Source_1

    Once PDC emulator role is established there is few commands we need to run in order for time to sync, these are (run on PDC emulator):

    Continue reading

    Windows 7 / Server 2008 R2 “Changing the Primary Domain DNS name of this computer to “” failed….”

    Windows_Server_2008_R2_Logo

    Windows Server 2008 R2 VMs started giving me errors while joining the domain recently, here is the exact error message that comes up:

    Windows_7_Server_2008_R2_Changing_the_Primary_Domain_DNS_name_of_this_computer_to_failed_1

    netsetup.log (%SystemRoot%\debug\netsetup.log) shows no errors and my VMs appears to be joined properly:

    Windows_7_Server_2008_R2_Changing_the_Primary_Domain_DNS_name_of_this_computer_to_failed_2

    Now to fix this there are two potential solutions/recommendations:
    Continue reading

    How to List Add/Remove Programs on a Local/Remote Machine

    Windows_7_Logo

    Another quick post to show how to list installed programs in Add/Remove programs on local and/or remote machine(s).

    wmi is what makes this possible and the command we need on local machine is as follows:

    wmic product get name,version

    – on remote one we have to add node parameter to our wmi statement:

    wmic /node:”FQDN_Goes_Here” product get name,version

    Either one can be exported by adding:

    /format:csv > Export.csv

    at the end.

    That’s it!

    Active Directory Script to Shutdown Computers per OU

    Windows_Server_2008_R2_Logo

    If you need to shutdown computers per OU in Active Directory here is one way of doing it:

    The only change you have to make for this script to work is to provide an LDAP string/path to the OU in AD where you’d like to shut the PCs.

    In my company we had to come up with a solution to comply with the “green” policy enforced upon us. Initially I have tried the built-in shutdown command and feeding in computer names using Excel and CONCATENATE function. Issue with that approach was that my script was trying to reach out to each machine to check if its on the network and pingable taking too long to complete. Script above doesn’t have the same issues – it literally fires up shutdown request simultaneously to all machines on the specified OU – much quicker and definitely more effective!

    If you guys have other ideas or have other solutions please let me know in comments below!

    Active Directory “computer name contains” search string

    Windows_7_Logo

    You just have to love the simple things in this world that are not so obvious at first thought…

    In AD if you try to search for computer name and would like to be slightly more specific you have a problem. Here is the default choice:

    The rather obvious choice would include “computer name contains” but sadly the option is not there! Solution? Simple – use LDAP search string instead! In ADUC define new query with custom search for:

    (&(objectcategory=computer)(name=*0112*))

    where 0112 is what you’re looking for (or computer name contains)

    Continue reading

    How to import .nk2 file from earlier versions into Outlook 2010 suggested contacts

    Microsoft_Office_2010_Logo

    Here are the steps you need to preform in order to import .nk2 file from Outlook 2007 and earlier versions into Outlook 2010 and Exchange suggested contact list:

    1] Copy the .nk2 file to:

    %AppData%\Microsoft\Outlook

    Please Note: .nk2 file name must match your current Outlook profile name. If Outlook profile has been left at the default setting it will be called simply “Outlook” therefore .nk2 file must be named as Outlook.nk2

    To check your profile name go to: Start / Control Panel / Mail / Show Profiles. If your profile is not named Outlook please rename the .nk2 file accordingly.

    2] Go to Start / Run and type cmd.exe to open a new command prompt window.

    3] For 32bit OS and 32 bit version of Ooutlook type:

    %ProgramFiles%\Microsoft Office\Office14\Outlook.exe /importnk2

    If you happen to be running 64bit OS type:

    %ProgramFiles(x86)%\Microsoft Office\Office14\Outlook.exe /importnk2

    Hit enter key, Outlook will open and you should have your contacts all imported!

    Please Note: Once the import happens .nk2 will get renamed to .nk2.old and you need to rename it back to .nk2 if you need re-importing.