Alexander’s Blog

May 1, 2013

Microsoft’s Billion Dollar Products

by @ 1:24 pm. Filed under Dev, Microsoft Office, News, Office 365, SQL Server, SharePoint, Windows 2003, Windows 2008, Windows 2012, Windows 7, Windows 8, Windows XP

Microsoft has several products that are generating good revenue for their business. Mary Jo Foley recently published this article that has more details. Most of the heavy hitters are big names but SharePoint definitely stands out.

There are over dozens products in this select group that generate over a $1 billion a year in sales for Microsoft, including the following products listed in alphabetical order.

    1.  Azure
    2.  Developer Tools
    3.  Dynamics (ERP & CRM)
    4.  Office
    5.  Online display and search advertising.
    6.  SharePoint (crossed the $2 billion mark in 2012)
    7.  SQL Server
    8.  System Center
    9.  Unified Communications
    10. Windows
    11. Xbox

    SharePoint is supposedly the only product that have crossed the $2 billion mark. If I am not mistaken, SharePoint was also the first product to cross the $1 billion in sales. You can bet all the tea in China that Office365 will be added to this list shortly.

    For more information on this topic, check out Mary Jo Foley’s article. She also has some other interesting stuff in her article.

    December 12, 2012

    Error: An attempt to initialize VM saved state failed

    by @ 5:41 pm. Filed under Virtualization, Windows 2008, Windows 8

    Problem:

    You get the following error when you create a new virtual image in Hyper-V on a Windows 8 Professional computer, configure it to boot from an ISO image, and then try and start the newly created virtual machine.

    An attempt to initialize VM saved state failed

    This error is also seen on Windows Server 2008 R2 server.

    Solution:

    Configure the permissions on the drive where the virtual machine files are located. In my case my virtual hard disk, virtual machine configuration file and snapshots were configured on drive D.

    On the root of the drive, configure the permissions so the Authenticated Users group has List permissions for the root folder. You don’t need to give the Authenticated Users group any permissions on the sub-folders at all. It only needs List permissions on the root folder. You will need to use the Advanced link on the Security tab to configure the permissions for “This folder only.” It will also add Read and Read & execute permissions, as shown below.

    There is no need to reboot your Windows 8 computer. Try to start the VM. It should start up fine.

    December 9, 2012

    What’s the Difference Between Unified Access Gateway (UAG) and Threat Management Gateway (TMG)?

    by @ 5:10 pm. Filed under Articles, Security/Firewalls, Windows 2008

    There are some major differences between Microsoft Threat Management Gateway (TMG) and Microsoft Unified Access Gateway (UAG). The two products are completely distinct and do not share any code. However, if you install UAG, it will automatically install TMG and if you remove UAG it will automatically uninstall TMG. So they are definitely linked in certain ways. TMG can be installed on Standard, Enterprise or Datacenter editions of Windows Server 2008 SP2 or R2. UAG can be installed on Windows Server 2008 R2 (Standard or Enterprise).

    TMG is a software firewall. Unfortunately, it will go away in future as Microsoft doesn’t seem to have any plans for its renewal. However, it will be supported until April 14, 2015 and won’t completely disappear from the scene until April 14, 2020. UAG is also going to be a dead duck. I would love to see Microsoft sell these Forefront products to another company that can turn them into a more useful solution, rather than making them disappear altogether.

    The following are some highlights to give you some insight on both these products. This is not a comprehensive list by any means. It’s just something to help you figure out which product might be the right choice for you.

    TMG (Threat Management Gateway)

    UAG (Unified Access Gateway)

    Replacement for ISA (Internet Security and Acceleration) Server 2006 that serves as a firewall Replacement for IAG (Intelligent Application Gateway) that serves as a remote access solution for applications
    Primarily meant to be a firewall solution for internal network Does not offer a firewall solution but installs TMG, which is used as a firewall for UAG local host (not for internal network) and allows you to only publish SMTP server
    Supports inbound and outbound access (firewall or forward proxy) Does not support outbound access
    Supports forward-proxy Does not support forward-proxy
    Supports reverse-proxy Supports reverse-proxy but because of some limitations TMG is considered a better reverse-proxy solution for certain situations
    Can be used to publish internal resources to the outside world Better for publishing internal resources than TMG because it can publish multiple applications on a single IP address using the UAG portal, which is essentially one URL that gives users access to all published applications on internal network
    Can be used for VPN connections Can be used for VPN connections
    Supports PPTP and L2TP VPNs Does not support PPTP and L2TP VPNs
    Much simpler to configure than UAG (keep in mind they serve different purposes), especially if upgrading from ISA Server 2006 because it may take just a few minutes to configure by simply exporting ISA Server 2006 configuration and importing it in TMG Complicated to configure than TMG (keep in mind they serve different purposes) because it can possibly take months to configure UAG properly
    Does not include an advanced end-point mechanism similar to Network Access Protection (NAP) Includes an advanced end-point mechanism which is similar to Network Access Protection (NAP) where you can control access to your network by setting rules, such as restricting connections only to clients that have a certain operating system and anti-virus software installed
    Licensing is per processor Licensing is per Client Access License (CAL)

    For more information check out this article on TechNet.


    Copyright ©2012 Zubair Alexander. All rights reserved.

    November 11, 2012

    How to Find the Largest Files on Your Windows Computer

    by @ 12:16 pm. Filed under Articles, SQL Server, Scripting, SharePoint, Tips & Tricks, Tools/Utils, Windows 2008, Windows 2012, Windows 7, Windows 8

    When working with Windows computers, especially Windows servers, I often run into situations where the hard drive is running out of disk space. In fact, I have often seen drives literally have no available space on a SharePoint or SQL server. There are too many reasons why a drive can run out of space, or continue to run out of space even if you keep freeing more disk space. In this article I won’t be going into the details of the reasons why drives run out of space but I can tell you that trace logs, SharePoint_Config_log.ldf file on SharePoint 2010, and cache files in %windir%\winsxs\ManifestCache folder on the server and PST files, temporary files, and thumbnails, eating up the disk on the workstation are a few common reasons. I have also blogged about other reasons in the past. The purpose of this article is to show you how to find out the size of some of the largest files on your computer so you can take action and delete them if they are not needed.

    Not all large files are needed. If they are not needed then there is no sense in keeping them on your computer. Obviously, you can delete a lot of small junk files but The question is how to find out which are the largest files. A simple way to find out the size of the largest files is to write a PowerShell script. You can then pipe the results of the script to a file and look at them one by one. Here’s a sample script that will display in GB the 5 largest files on your server or workstation. You can change the number 5 at the end of the script to display more or fewer large files.

    @echo off
    Powershell -noexit “Get-PSdrive  | where { $_.Used -gt 0 } | foreach { Get-ChildItem $_.Root -recurse -force -ErrorAction SilentlyContinue | Select Name,DirectoryName, @{Label=’Size’;Expression={($_.Length/1GB).ToString(‘F04′)}} | Sort Size -descending | select -first 5}”

    1. Paste the above script in Notepad.
    2. Save the file as a batch file (File, Save As, change “Save as type” to All files, click Save). Give it a name like Top5largestFiles.bat. Make sure you use the .bat extension, otherwise it will not execute as batch file.
    3. Start the Command Prompt as an Administrator.
    4. Go to the folder where you saved the batch file.
    5. Type the name of the batch file (e.g. Top5largestFiles). It’s optional to type the .bat at the end of a batch file because the system automatically knows that it’s an executable file.
    6. Wait a while because the batch file needs to go through every file on your computer. The results will be displayed in GB.
    7. You can also pipe the results into a text file if for some reason you want to save the results as a reference for future use. For example, type
      5ToplargestFiles > largefiles.txt
      This will send the results into a text file called largestfiles.txt.
    8. Once you know which files are the largest files you can go through them and see if some of them can be deleted. Obviously, you have to have certain level of knowledge to understand which files are safe to delete.

    As an example, on a SQL Server 2008 R2 if you run out of disk space, you can delete the file that ends with _blobs.bin (e.g. a368b368b28d9265_blobs.bin) in the %windir%\winsxs\ManifestCache folder. According to Microsoft, this file is used by Windows Update mechanism and it is safe to delete this file. However, do not delete or mess with any other files in the WinSxS foder. Even if you delete all the files in the ManifestCache folder, they may appear later after a Windows Update or a reboot but will likely be not as large. Just keep an eye on these files and deleted them when necessary. Here a post from Joseph Conway on TechNet that describes in detail what the WinSxS folder is all about. Unfortunately, there is no known solution to this problem of Windows servers and workstations running out of disk space. Until Microsoft comes up with a solution, here’s a workaround.

    Here’s how you can delete files in the Windows\WinSxS\ManifestCache folder.

    1. Run the above batch file to find out the top 5 largest files.
    2. If the files in the ManifestCache folder are among the largest files then use the following commands.
    3. Run Command Prompt as an Administrator.
    4. Run the command “net stop trustedinstaller” without the quotes to stop the Windows Modules Installer service. If your OS is running this service then make sure you wait for it to stop, if it’s not running and you get the message “The Windows Modules Installer service is not started” then go to the next step.
    5. Type EXIT to get out of the PowerShell command and run the command “takeown /f %windir%\winsxs\ManifestCache\*” without the quotes at the Command Prompt to take the ownership of the folder. This step is necessary because you must take ownership of the folder before giving the Administrators proper permission.
    6. If you get an error it’s likely because you ignored the first part of the previous step and ran the command inside PowerShell (if your prompt starts with PS then you are in the PowerShell command). If you run the command in PowerShell you will get the message “ERROR: The system cannot find the path specified.”
    7. Run the command “Icacls %windir%\winsxs\ManifestCache\* /grant Administrators:f” without the quotes to grant Administrators Full Access permissions to the folder.
    8. The last step is to delete the files in the ManifestCache folder. Run the command “del /q %windir%\winsxs\ManifestCache\*” without the quotes.
    9. Restart the Windows Modules Installer service by typing “net start trustedinstaller” without the quotes.

    Scheduling Cleanup of ManifestCache folder

    The ManifestCache folder will continue to grow in the future but you can create a batch file to cleanup the content occasionally. I would recommend that you clean up the folder only if you need disk space because the cache files will improve performance. This solution is for people who are in desperate need of additional disk space. Here’ a batch file that I use on my SharePoint 2010 server and my SQL Server 2008 R2 server. I saved the content of this batch file in Notepad and named the file CleanManifestFolder.bat. I run this file at the elevated Command Prompt.

    @echo off
    cls
    net stop trustedinstaller
    takeown /f %windir%\winsxs\ManifestCache\*
    Icacls %windir%\winsxs\ManifestCache\* /grant Administrators:f
    del /q %windir%\winsxs\ManifestCache\*
    net start trustedinstaller

    You can also schedule to run this file with Task Scheduler if necessary.

    Disk Cleanup Tool

    At this point you may want to go through additional files and delete them if they are safer to delete. On some operating systems, such as Windows 7, you also have the option Disk Cleanup on the drive properties. However, this tool is designed to delete only certain types of files that are safe to delete, such as downloaded program files, temporary Internet files, setup log files, temporary files, thumbnails, etc. It won’t find other files that can be very large and often useless. I still encourage you to go through these and delete them. Especially, the temporary files and thumbnails. I noticed that on my PC, the thumbnails were 79MB but the temporary files were a whopping 13.7GB. Your mileage may vary but the results may surprise you.


    Copyright ©2012 Zubair Alexander. All rights reserved.

    February 4, 2012

    How to Delete Inactive Profiles on Windows 7

    by @ 9:38 am. Filed under Tools/Utils, Windows 2000, Windows 2003, Windows 2008, Windows 7, Windows Vista, Windows XP

    A few years ago I wrote this article Deleting Old User Profiles in Windows 2000/XP/2003 about a User Profile Deletion utility called DelProf.exe. This tool is part of the Windows Server 2003 Resource Kit. Because it was written for older operating systems it won’t work on Windows Vista or later operating systems.

    Lucky for us, Microsoft MVP Helge Klein has written a successor utility called DelProf2 that works with newer operating systems, such as Windows 7. DelProf2 works with Windows XP/2003/Vista/Windows 7/Windows 2008/Windows 2008R2.

    DelProf2 will even handle profiles that use long paths (i.e. MAX_PATH values of longer than 260). This tool is great if you want to get rid of old profiles that are taking disk space. It will delete all profiles except the current profile. It will leave the necessary system profiles (e.g. Default profile) alone. Default profile is used by the operating system to create a profile for a new user by making a copy of the Default profile. You also have the option to delete locally cached copies of roaming profiles or delete older profiles that have not been used for a certain period of time, such as older than 90 days.

    Here is the syntax used by DelProf2.

    Usage: delprof2 [/u] [/q] [/i] [/p] [/r] [/c:[\\]<computername>] [/d:<days>]
    
           /u   Unattended (no confirmation)
           /q   Quiet (no output and no confirmation)
           /i   Ignore errors, continue deleting
           /p   Prompt for confirmation before deleting each profile
           /r   Delete local caches of roaming profiles only, not local profiles
           /c   Delete on remote computer instead of local machine
           /d   Delete only profiles not used in x days
           /l   List only, do not delete (what-if mode)

    Helge has some nice examples on his site. You can use DelProf2 to delete inactive profiles remotely (including Windows 7 computers) using their IP addresses.

    DelProf2 is a free utility that can be downloaded from Helge’s Web site here. While you are at it, you might want to check out some additional tools that he has written.

    Contact E-mail | Terms of Use | Privacy Policy

    Copyright © 2013 Zubair Alexander. All rights reserved.

    Internal Links

    Search Blog

    Categories

    Archives

    May 2013
    M T W T F S S
    « Apr    
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031  

    RSS Feeds

    TechGalaxy Visitors

    25 queries. 0.571 seconds