6996690148_6d10596113_h-2

Repairing Corrupted System Files in Windows 8 and Windows 8.1

by jess on January 11, 2014

6 Comments

I recently had an issue with a corrupted file on one of my Windows 8.1 Pro computers. When I would run the System File Checker command (sfc /scannow), which was used by other versions of Windows in the past, I would receive a message that corruption was found, but could not be repaired:

1-unable

In investigating the CBS.log file, located at C:\Windows\Logs\CBS\CBS.log, I saw entries like the following:

2014-01-11 10:41:19, Info CSI 000004c7 [SR] Beginning Verify and Repair transaction
2014-01-11 10:41:23, Info CSI 000004c8 Hashes for file member \SystemRoot\WinSxS\amd64_prncacla.inf_31bf3856ad364e35_6.3.9600.16384_none_9590ba64d5b91f79\Amd64\CNBJ2530.DPB do not match actual file [l:36{18}]"Amd64\CNBJ2530.DPB" :
Found: {l:32 b:iFGN8kqBrULckYGGWwjgESo5hfk/GDgVttoobZ/7h/o=} Expected: {l:32 b:n520k714Uu3utHa5JGQ6HQYbZphKhlMWq5pEmfnCDuw=}
2014-01-11 10:41:23, Info CSI 000004c9 [SR] Cannot repair member file [l:36{18}]"Amd64\CNBJ2530.DPB" of prncacla.inf, Version = 6.3.9600.16384, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type = [l:24{12}]"driverUpdate", TypeName neutral, PublicKey neutral in the store, hash mismatch
2014-01-11 10:41:28, Info CSI 000004ca Hashes for file member \SystemRoot\WinSxS\amd64_prncacla.inf_31bf3856ad364e35_6.3.9600.16384_none_9590ba64d5b91f79\Amd64\CNBJ2530.DPB do not match actual file [l:36{18}]"Amd64\CNBJ2530.DPB" :
Found: {l:32 b:iFGN8kqBrULckYGGWwjgESo5hfk/GDgVttoobZ/7h/o=} Expected: {l:32 b:n520k714Uu3utHa5JGQ6HQYbZphKhlMWq5pEmfnCDuw=}
2014-01-11 10:41:28, Info CSI 000004cb [SR] Cannot repair member file [l:36{18}]"Amd64\CNBJ2530.DPB" of prncacla.inf, Version = 6.3.9600.16384, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type = [l:24{12}]"driverUpdate", TypeName neutral, PublicKey neutral in the store, hash mismatch
2014-01-11 10:41:28, Info CSI 000004cc [SR] This component was referenced by [l:186{93}]"Microsoft-Windows-Printer-Drivers-Package~31bf3856ad364e35~amd64~~6.3.9600.16384.INF_prncacla"

After some additional research, I found a very useful post on the newer Deployment Imaging and Servicing Management (DISM) tool. One of the benefits of this newer command, is that it can download updated files from Windows Update, rather than relying solely on an offline cache.

I then ran the following command to use DISM to check for corruption, as well as repair any issues it found:

DISM /Online /Cleanup-Image /RestoreHealth

After running the command, it says it found corruption, and repaired the issue. I returned to the CBS.log file and saw the following:

Checking System Update Readiness.

(p) CSI Payload Corrupt (Fixed) amd64_prncacla.inf_31bf3856ad364e35_6.3.9600.16384_none_9590ba64d5b91f79\Amd64\CNBJ2530.DPB

Summary:
Operation: Detect and Repair
Operation result: 0x0
Last Successful Step: Entire operation completes.
Total Detected Corruption: 1
CBS Manifest Corruption: 0
CBS Metadata Corruption: 0
CSI Manifest Corruption: 0
CSI Metadata Corruption: 0
CSI Payload Corruption: 1
Total Repaired Corruption: 1
CBS Manifest Repaired: 0
CSI Manifest Repaired: 0
CSI Payload Repaired: 1
CSI Store Metadata refreshed: True

Total Operation Time: 655 seconds.

I was also able to see where DISM had downloaded new files through Windows Update:

2014-01-11 11:08:14, Info CBS Appl: Evaluating package applicability for package KB2878971-printscan~31bf3856ad364e35~amd64~~6.3.9600.16384, applicable state: Installed
2014-01-11 11:08:14, Info CBS REPR: WU scans package KB2878971-printscan~31bf3856ad364e35~amd64~~6.3.9600.16384 that is required by CBS
2014-01-11 11:08:14, Info CBS DWLD: PopulateDownloadFileList is called, must be express package.
2014-01-11 11:08:14, Info CBS Repr: File list: Payload amd64_prncacla.inf_31bf3856ad364e35_6.3.9600.16384_none_9590ba64d5b91f79\Amd64\CNBJ2530.DPB requested
2014-01-11 11:08:14, Info CBS Exec: (Repair) Job has been saved for package: KB2878971-printscan~31bf3856ad364e35~amd64~~6.3.9600.16384.
2014-01-11 11:08:14, Info CBS Asynchronous Session: 30346991_3064396655 finalized. [HRESULT = 0x00000000 - S_OK]
2014-01-11 11:08:14, Info CBS Session: 30346991_3071347097 initialized by client WindowsUpdateAgent.
2014-01-11 11:08:19, Info CBS Session: 30346991_3113639432 initialized by client WindowsUpdateAgent.
2014-01-11 11:08:19, Info CBS DWLD: Bundled index = 0
2014-01-11 11:08:19, Info CBS DWLD: Windows update server URL: http://download.windowsupdate.com/d/msdownload/update/software/tool/2013/08/dummyrepairpackage_cd97f5d6cb54bf63a4e4adc376edadf6f2b8352c.cab
2014-01-11 11:08:19, Info CBS DWLD:Content is Full-Cab package.
2014-01-11 11:08:19, Info CBS DWLD: Windows update server URL: http://download.windowsupdate.com/d/msdownload/update/software/tool/2013/09/kb2878971-amd64-neutral-printscan_fab8de7db6bf7a153de2ad5aa3a88a56e540e076.cab
2014-01-11 11:08:19, Info CBS DWLD:Content is Express package.
2014-01-11 11:08:19, Info CBS DWLD: Windows update server URL: http://download.windowsupdate.com/d/msdownload/update/software/tool/2013/09/kb2878971-amd64-neutral-printscan_d8f2afcbf3c0790cd01d857c1ed0972a5138983c.psf
2014-01-11 11:08:19, Info CBS DWLD:Content is Express package.
2014-01-11 11:08:19, Info CBS Repr: Finished collecting payload.
2014-01-11 11:08:19, Info CBS Repr: Finished repairing CBS Store.

When running the SFC utility a second time, it verified that there were no issues – it was fixed!

Fixed

Fixes in SharePoint 2010 Service Pack 2

by jess on July 31, 2013

No Comments

Microsoft recently released Service Pack 2 for SharePoint, which can be downloaded on “Updates for SharePoint 2010 Products” page. Below are the fixes specifically included in the updates:

Fixes in the SP2 Update

http://support.microsoft.com/kb/2687453

  • Navigating to a SharePoint site with a BlackBerry device may open a non-mobile page.   Adding RIM6 into compat.browser allows users to access SharePoint pages and view documents in mobile view.
  • If anonymous access is enabled for SharePoint 2010 SP1 (or later Cumulative Update), attempts to to access the site via a mobile device will receive an authentication prompt.
  • Customers are unable to use spell check in Korean when running SharePoint on Windows Server 2012.
  • Displaying Summary Links Web Part in personalizing view; generating confusing error message.
  • Deployment fails for content types containing a formula field in Italian.
  • File attachments are not deleted due to incorrect URL formatting.
  • If requireExactUrl is not set for openweb calls, the PublishingWeb constructor may spawn variation pages  into incorrect locations while attempting re-creation of failed label during create hierarchies.
  • Incremental content deployment fails, giving the following error: FatalError: The given key was not present in the dictionary.
  • Spell Checker doesn’t work properly with Internet Explorer 10.
  • Rich text editor spell checker may work incorrectly on 64 bit machines.
  • Customers encounter issues sending e-mail from workflows when the From address uses a non-Unicode character set.
  • Updated VBE7.dll to fix safe array corruption for x64 hosts when calling UDF methods using safe array arguments directly from the host.
  • SQL exceptions will appear in the log when running update statistics timer.
  • Improved performance of the AllUserData table.
  • Getting a feed against a discussion board fails if feed contains more than zero items.
  • SharePoint 2010 client object model now has compatibility for accessing SharePoint 2013 servers.
  • Windows 8 users with Internet Explorer 10 receive an error when trying to open a document from SharePoint 2010 directly in the Office client.
  • Call GetChanges won’t return changes in certain cases where the change log has been edited and no parameters are set.
  • STSAdm MigrateUser fails when SQL server is not in domain.
  • Attempting to delete a child web from site settings causes the page to fail.
  • There is no exposed method to recalculate the second stage recycle bin size.
  • April 2011 Calendar View does not display correctly with Amman System Time zone.
  • Users can create a scenario where a site loses permissions.
  • After deleting a web that contains historical document versions in the RecycleBin, rows are abandoned in the database.  These rows bloat the size of the database, causing difficulty with database management operations such as backup/restore, complicating upgrade and other scenarios.
  • After creating alerts on a document library with unique permissions and moving the contents using SPFolder.MoveTo method, the permissions seem to be lost and even the farm administrator is not able to delete these alerts.

We aren’t in the coffee business, serving people. We’re in the people business, serving coffee.- Nabi Saleh

6276180519_1a8a7f1d02_o_sm

Redirect non-encrypted HTTP traffic to SSL-enabled HTTPS in IIS 7+

by jess on July 12, 2013

1 Comment

It used to be that redirecting HTTP traffic to the SSL-enabled equivalent was a convoluted process, especially in IIS 6 and previous versions. Weird tricks using error codes on specific default files in the web site, etc. Back in the IIS 6 days, it made me greatly miss using mod_rewrite with Apache on Linux.

Thankfully Microsoft caught on a few years back, and released an official IIS extension called URL Rewrite, which is essentially the equivalent of Apache’s mod_rewrite. Using URL_Rewrite, you can fairly easily implement a rule to detect if the browser session is using SSL, and if not, redirect it to wherever you want the browser to go.

Below are the steps to handle the SSL direct of a web site using URL_Rewrite within IIS:

  • Set up your web site to listen on both port 80 (HTTP) and port 443 (HTTPS), or whatever ports you are choosing to use. In the bindings, make sure you have associated a valid SSL certificate, etc. I’m kind of assuming you have already done this, and just want to handle a redirect at this point.
  • On your IIS 7+ web server(s), install URL Rewrite. My preferred method is to use the Microsoft Web Platform Installer, which will sometimes do some extra work for you beyond just installing an .msi file, depending on the IIS extension you are installing (like Web Deploy).
  • Once you have URL Rewrite installed, open the IIS Manager.
  • In the left-hand pane, select the web site you would like to apply the redirect rule to.
  • In the main window for the web site, under the IIS category, click the icon for URL Rewrite to add a new rule that only applies to this site.

2013-07-12_0923

  • You should see the URL Rewrite configuration screen for this web site. Under Actions on the right, click Add Rule(s)…

2013-07-12_0925

  • Go ahead and take the default rule template of Blank rule, and click OK.

2013-07-12_0926

  • In the Edit Inbound Rule screen, give a meaningful Name to the rule, such as “Redirect HTTP Traffic to HTTPS”.

2013-07-12_0928

  • Leave the Requested URL field set to “Matches the Pattern”, and leave the Using field set to “Regular Expressions”.

2013-07-12_0929

  • In the Pattern field, enter the pattern of (.*) because we want to match anything in the URL. We are more concerned about whether or not SSL is being used or not, rather than what is contained within the URL in this case.

2013-07-12_0930

  • Expand the Conditions section, and click Add.

2013-07-12_0944

  • In the Condition input field, enter {HTTPS}. This will detect if SSL is being used by the web browser session.

  • In the Pattern field, enter ^OFF$. This is what will trigger the rule if SSL is not being used for the web session. Then click OK.

2013-07-12_0947_001

  • Scroll down to the Action section, and change the Action type to Redirect.

2013-07-12_0949

  • In the Redirect URL field, enter the following: https://{HTTP_HOST}/{R:1}

  • This action does a couple things. The {HTTP_HOST} variable will assign whatever host name is being used by the web client. That way you don’t have to hard code a domain name in the rule – although you could if you wanted. The {R:1} variable takes whatever is after the host name, and appends it to the redirect URL. So for example, if the browser is calling http://www.example.com/contact/form.aspx, the {R:1} variable appends the highlighted section of the URL to the redirect URL.

2013-07-12_0956

  • Next, make sure to check the checkbox for Append query string. This will make sure any URL parameters will be automatically appended to the redirect URL. Using the previous example, if the URL is http://www.example.com/contact/form.aspx?Subject=Hi&To=Webmaster the checkbox ensures the highlighted section is automatically appended to the redirect URL.

2013-07-12_0957

  • The next step is to decide the HTTP redirect type code you want to send the browser. You could send a Permanent (301) code if you always browsers and search engines to consider the HTTP URL to be essential an old and “shouldn’t be used” URL. However, I typically prefer to us the code for See Other (303), as that allows some flexibility in the future. Choose whatever makes sense in your situation.

2013-07-12_1000

  • Then click Apply in the Actions menu on the right, and then Back to Rules.

2013-07-12_1001

  • When you return to the URL Rewrite rules screen, you should see a new entry for the redirect rule we just created:

2013-07-12_1002

Now, try browsing to your web site using the HTTP version of the URL. You should be able to see within the web browser the URL is changed dynamically to the HTTPS equivalent of whatever URL you used, even if it had a long path with URL parameters in it. Any previously created links or bookmarks should now dynamically redirect to the SSL-enabled equivalent of the web site.

Hide Distribution List Membership in SharePoint 2010 User Profiles

by jess on July 9, 2013

No Comments

To hide Exchange distribution list memberships on SharePoint 2010 user profiles, follow these steps:

  • Access Central Administration
  • Access the User Profile Service Application
  • Under People, click Manage Policies

2013-07-09_1432

  • Under Memberships, click Distribution List, then click Edit Policy

2013-07-09_1434

  • Change the Policy Settings field to: Disabled
  • Uncheck the checkbox for User can override

2013-07-09_1444

  • Click OK

The distribution lists should now no longer display on individual User Profiles in SharePoint.

window_pic_crop

Spring Cleaning: Virtual Server 2005 Migrations to Hyper-V

by jess on July 6, 2013

No Comments

Doing some Spring cleaning (late) on some of our virtual infrastructure for some of our lab virtual machines. We have an old Virtual Center 2005 server that has multiple VM’s on it, and needed to migrate some of them to one of our Hyper-V servers. Once the process was down, it is fairly simple, and basically consists of:

  1. Convert the boot drive from SCSI to IDE
  2. Uninstall the network device
  3. Uninstall Virtual Server Additions
  4. Check the hardware abstraction layer (HAL)
  5. Move the virtual disk to the Hyper-V server
  6. Convert the virtual machine configuration using VMC2HV
  7. Power on the Hyper-V virtual machine
  8. Install a DVD Drive
  9. Install Integration Services
  10. Re-Activate Windows if needed

Some posts that I found helpful in the process were:

Windows Server 2008 Hyper-V Resource Kit: Chapter 8: Moving from Virtual Server 2005 R2 to Hyper-V

Virtual Machine Migration Guide: How To Migrate from Virtual Server to Hyper-V

Yale Library

Moving Windows Live Photo Gallery Managed Photos to Another Drive

by jess on December 22, 2011

4 Comments

We recently purchased a better digital camera for our family’s use, which takes photos at a much higher resolution than our previous camera. I decided it was time to move all of our photos from the current hard drive they were on to a larger drive.

Below are the test steps I took to migrate the photos to a different drive, and have everything synced in Windows Live Photo Gallery 2011.

Test Setup

  • I created a Windows 7 virtual machine using VMware Player, and attached a virtual second hard drive as E:
  • I installed Windows Live Photo Gallery 2011
  • I created a “Photos” directory on the C: drive
  • I copied over some photos to use as samples, and tagged them with names and keywords

original

Remove the Original Library

Windows Live Photo Gallery (WLPG) uses the Pictures Library locations configured in Windows. I have my source photo directory located at C:\Photos. I needed to remove this from the Windows Pictures Library.

  • Open the Pictures folder

pictures

  • Click the “locations” link in the Pictures Library

libraries

  • Then remove the directory you want to move

remove_library

If you open up WLPG at this point, you should no longer see any of the photos or videos that are in this directory.

Copy or Move the Original Directory

I then moved the directory from C:\Photos to E:\Photos.

Add the New Pictures Library

Now I added the new location as a Pictures Library location in Windows.

  • Open the Pictures folder

pictures

  • Click the “locations” link in the Pictures Library

libraries2

  • Click Add, and browse to the new directory location

new_location

View in Windows Live Photo Gallery

Now, when I opened Windows Live Photo Gallery, I could see all of the photos, tags and all, but they are in the new location.

Results

Enjoy!

Expand the virtual disk size of Windows 2008 Server with VMware Player / Workstation

by jess on October 27, 2011

No Comments

VMware Disk (~20 minutes)

For Workstation 7 and later and Player 3.x and later, you can increase the virtual disk from the GUI:

  1. Select the virtual machine from the Inventory.
  2. Click Edit Virtual Machine Settings.
  3. Click Hard Disk.
  4. Click Utilities > Expand, enter the new size, then click Expand.

Reference: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004047

Windows 2008 OS (~2 minutes)

How to extend the boot partition in Windows Server 2008

To extend the boot partition in Windows Server 2008, follow these steps:

  1. 1. Click Start, and then click Server Manager.
  2. 2. In the navigation pane, expand Storage, and then click Disk Management.
  3. 3. In the details pane, right-click the volume that you want, and then click Extend Volume.
  4. 4. Follow the instructions in the Extend Volume Wizard to extend the boot partition.

Reference: http://support.microsoft.com/kb/325590

Install SharePoint Server 2010 SP1 with Office Web Apps

by jess on July 10, 2011

No Comments

This post is a screenshot walk through of upgrading a standalone (with SQL Server) SharePoint Server 2010 installation to Service Pack 1, along with Office Web Apps.

I’m not sure that the first run on the Config Wizard needs to take place, but since there are some prerequisites to OWA SP1 if you don’t have SharePoint SP1 installed first, I’m doing them separate.

Download:

Order of Installation:

  1. Install the binary files for Foundation SP1
  2. Install the binary files for SP Server SP1
  3. Run the SharePoint Configuration Wizard
  4. Install Office Web Apps SP1
  5. Run the SharePoint Configuration Wizard

Update I: Here is an excellent write up on the steps and procedures for installing on a full farm.

Continue Reading

7919155538_8ef0b3c95e_kb

Missing Site Column on a Custom Content Type

by jess on May 8, 2011

1 Comment

Recently, I ran into an odd issue in a SharePoint environment where a Site Column disappeared on a custom Content Type. I could still see it in the View, and it was holding a value, but I couldn’t see it on the Content Type page or anywhere else. A colleague pushed me into PowerShell, and I was able to do a quick analysis of the Site Column and see that somehow it had been set to Read Only. Once I set the value of Read Only to false, the field appeared like normal.

   1:  $site = new-object Microsoft.SharePoint.SPSite("http://site")
   2:  $web = $site.RootWeb
   3:  $missingField = $web.Fields["FieldName"]
   4:  $missingField.ReadOnlyField = $false
   5:  $missingField.Update()