Category Archives : Uncategorized

Potential issues after installing SharePoint Foundation 2010 SP1 SBS2011

http://blogs.technet.com/b/sbs/archive/2011/07/06/potential-issues-after-installing-sharepoint-foundation-2010-sp1.aspx

Potential issues after installing SharePoint Foundation 2010 SP1

to us courtesy of Fang Xie, Guang Hu and Ning Kuang from Sustained Engineering and Christopher Puckett, John Bay and Damian Leibaschoff from Commercial Technical Support]

Microsoft SharePoint Foundation 2010 Service Pack 1 (SP1) was recently released through Microsoft Update. On a default installation, Windows SBS 2011 Standard administrators should be able to see it in the SBS Console and would need to approve it for installation before it is offered for installation on the server.
Since SharePoint Foundation 2010, patching SharePoint is a two-step process. The updated binaries are first installed and then PSCONFIG must be completed to update the SharePoint databases.
Without completing PSCONFIG, you might experience unexpected SharePoint search failures and all backups may stop working on the affected server.

The Following errors may be found in the server application log:

Log Name: Application
Source: Microsoft-SharePoint Products-SharePoint Foundation Search
Event ID: 70
Task Category: Gatherer
Level: Error
User: CONTOSO\spsearch
Computer: CONTOSO-SERVER.contoso.local
Description:
The mount operation for the gatherer application 37ad8233-57f1-47b1-873e-6a91d0f1bc36 has failed because the schema version of the search administration database is less than the minimum backwards compatibility schema version supported for this gatherer application. The database might not have been upgraded.

Log Name: Application
Source: Microsoft-Windows-Backup
Event ID: 521
Level: Error
User: SYSTEM
Description:
The backup operation that started at ‘?2011?-?07?-?06T02:12:07.198000000Z’ has failed because the Volume Shadow Copy Service operation to create a shadow copy of the volumes being backed up failed with following error code ‘2155348129’. Please review the event details for a solution, and then rerun the backup operation once the issue is resolved.

You can also run the following commands to determine if you need to complete the update process with PSCONFIG:

  • Launch an elevated (Run as Administrator) SharePoint 2010 Management shell from start, All Programs, Microsoft SharePoint 2010 Products, SharePoint 2010 Management Shell.
  • Once the shell opens, type the following command followed by enter:
    (get-spserver $env:computername).NeedsUpgrade

image

If the result of this command is True, then you need to complete the steps below. If the result is False then no further action is needed, if you are encountering similar events the cause will most likely not be resolved by the following steps.

To complete the SharePoint service pack process you need to follow the same steps that were previously posted on the Official SBS Blog regarding the necessity to complete PSCONFIG after a SharePoint update. Here are the steps from the article:

In order to update the SharePoint databases, you must manually run the PSconfig utility. To run the utility:

1. Open an Administrative command prompt.
2. Change directory to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN
3. Run PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures

Note: The Companyweb site will be inaccessible while the command is running. It is best to run the command after business hours. The amount of time the command takes to run will vary on the size of the database and the speed of the machine. On a reference machine with 8 logical processors, 32GB of RAM and a 2GB content database, the command took approximately 5 minutes to execute.

Alternate SmartHost ports for Exchange 2007+

 

Set-SendConnector “SmartHost” -port 2525

At the Smarthost you have to enter the exact name of your Send connector, use the following command to get the Sendconnector name

Get-SendConnector | ft Identity,SmartHosts,port

SBS 2011 – WSUS SQL Memory Usage Is Very High – How To Reduce It from MPECS Inc. Blog

http://blog.mpecsinc.ca/2011/07/sbs-2011-wsus-sql-memory-usage-is-very.html

Our destination SBS 2011 has an SQL (S-Q-L) process that was taking up a whopping 5GB of RAM:

image

Since this was a relatively fresh install of SBS 2011 we needed to find out what SQL setup was using so much memory.

  1. Open Task Manager –> Processes tab.
  2. View –> Choose Columns –> PID, Memory, etc. (Our SBS 2011 Setup Guide has the customizations)
  3. Start –> CMD –> Right click and Run As Admin.
  4. tasklist /svc [Enter]
  5. Scroll through the resulting list looking for the PID.
    • image
  6. Start –> All Programs –> Microsoft SQL Server 2008 R2 –> Right click and Run as Admin on SQL Server Management Studio.
    • Server type: Database Engine.
    • Server name: \\.\pipe\mssql$microsoft##ssee\sql\query
      • Copy and paste the above.
    • Authentication: Windows Authentication.
  7. Click Connect.
    1. image
  8. Right click the root node (\\.\pipe\mssql$microsoft##ssee\sql\query) and left click on Properties.
  9. Click Memory.
  10. Change the amount of memory that WSUS can use. On this particular SBS 2011 VM we have 16GB of RAM allocated. So, we will set the amount of RAM to 1GB.
    1. Before:
      • image
    2. After:
      • image

Our WSUS SQL memory usage was now a lot more reasonable:

image

image

UPDATE 2011-07-16: Tweaked the steps for a typo as per Arcon’s comment.

How do I avoid needing to activate Windows when I move a VM? [Hyper-V]

http://blogs.msdn.com/b/virtual_pc_guy/archive/2011/09/12/how-do-i-avoid-needing-to-activate-windows-when-i-move-a-vm-hyper-v.aspx

How do I avoid needing to activate Windows when I move a VM? [Hyper-V]

Ben Armstrong [MSFT]

It is possible to move virtual machines around between different physical computers running Hyper-V without needing to run activation inside Windows. The trick is that you need to make sure that the virtual hardware does not change when you move the virtual machine.

The most common mistake that people make when moving a virtual machine by hand (e.g. not using SCVMM or Hyper-V Clustering) is that they just copy the virtual hard disks (.VHD files) and create a new virtual machine that uses these virtual hard disks.

This new virtual machine will have new hardware identifiers for all the virtual hardware it contains – so even if you setup the virtual machine with the same settings, Windows will ask to be reactivated.

The best way to avoid this is to export the virtual machine on the source Hyper-V server, and then import it on the target server. This will ensure that all the virtual hardware has the same identifying information, and you will not need to reactivate Windows after moving the virtual machine.

Using “built in” applications with Windows XP mode

http://blogs.msdn.com/b/virtual_pc_guy/archive/2011/12/22/using-built-in-applications-with-windows-xp-mode.aspx

Using “built in” applications with Windows XP mode

Ben Armstrong [MSFT]

Last week I was asked, on Twitter, if it was possible to publish a built in application (like Internet Backgammon) from Windows XP mode. The answer is: Yes, but it is a little tricky.

Most people use Windows XP mode to run specific applications that they have that will not run under Windows 7. These people do not want to have their start menus cluttered with all the applications that populate the Windows XP menu – they just want to access their applications. For this reason, we block publishing of all of the built in applications in Windows XP – but you can unblock them.

To test this out – I published Internet Backgammon on one of my systems. The process that you need to follow is this:

  1. Figure out the path and name of the executable that you want to publish. In my case this was “bckgzm.exe” in “C:\Program Files\MSN Gaming Zone\Windows”:
    image
  2. Then you need to open RegEdit and go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtual Machine\VPCVAppExcludeList
  3. Search the entries here and you should find a string value with a name of the executable (“bckgzm.exe” in my case) and a data value of the path. Delete this key.
  4. Reboot the virtual machine.

After doing this – the application will appear in the Windows 7 start menu:

image

And you can run it as an integrated application:

Capture2

Cheers,
Ben

Print Queue Scripting

http://blogs.technet.com/b/askperf/archive/2011/09/16/print-queue-scripting.aspx

Many methods of programmatically working with printers exist and I’ll be going over the main ones we use on the Windows platform support teams in this blog. These can be real lifesavers for print server administrators if changes need to be made across many queues.

As a quick caveat, please keep in mind that we use many of these scripts and utilities for troubleshooting during the course of support incidents but not all of them are supported. I’ll explicitly call out which tools are eligible for Microsoft support services and which ones are not while we walk through them.

In-Box Print Admin Scripts

Supportability

The print management visual basic scripts provided with the OS are fully supported.

clip_image003 Important Notes

ü These scripts are WMI-based and thus are only for use against a stand-alone print server.

ü The first versions of these scripts were included with the Windows Server 2003 Resource Kit.

ü The Resource Kit versions of these scripts are NOT supported but work against a cluster.

Script List

Location:

· Windows XP / Server 2003 – %windir%\system32

· Windows Vista / 7 / 2008 / 2008R2 – %windir%\system32\printing_admin_scripts

Scripts:

· PRNCNFG.VBS

Configures or displays configuration information about a printer.

· PRNDRVR.VBS

Adds, deletes, and lists printer drivers.

· PRNJOBS.VBS

Pauses, resumes, cancels and lists print jobs.

· PRNMNGR.VBS

Adds, deletes, and lists printers or printer connections, in addition to setting and displaying the default printer.

· PRNPORT.VBS

Creates, deletes, and lists standard TCP/IP printer ports, in addition to displaying and changing port configuration.

· PRNQCTL.VBS

Prints a test page, pauses or resumes a printer, and clears a printer queue.

· PUBPRN.VBS

Publishes a print queue to active directory.

Built-in Self Help

All of the in-box scripts display syntax information and examples if you run them without parameters.

CSCRIPT.EXE <ScriptName.vbs>

Commonly used commands:


Add HP Universal Printer Driver (UPD) 5.3 PCL 6 driver

cscript prndrvr.vbs -a -m "HP Universal Printing PCL 6 (v5.3)" -v 3 -i "C:\TEMP\hpcu115u.inf" -h "C:\TEMP"

Add HP UPD 5.3 Postscript (PS) driver

cscript prndrvr.vbs -a -m "HP Universal Printing PS (v5.3)" -v 3 -i "C:\TEMP\hpcu115v.inf" -h "C:\TEMP"

Add Xerox GPD 2.1 PS driver

cscript prndrvr.vbs -a -m "Xerox GPD PS V2.1" -v 3 -i "C:\TEMP\x2UNIVP.inf" -h "C:\TEMP"

Delete all printer drivers that are not in use

cscript prndrvr.vbs -x

Set a print queue to RAW only (disable Advanced Printing Features)

cscript prncnfg.vbs -t -p printer +rawonly

Set a print queue to print directly to the printer

cscript prncnfg.vbs -t -p printer +direct

Create a Standard TCP/IP port with SNMP status disabled

cscript prnport.vbs -a -md -r IP_127.0.0.1 -h 127.0.0.1 -o raw -n 9100

Print a test page to a queue

cscript prnqctl.vbs -p "HP Color LaserJet" -e

Cancel all print jobs in a queue

cscript prnqctl.vbs -p "HP Color LaserJet" -x

More Information:

The unsupported 2003 Resource Kit versions of these scripts can be run against a 32 or 64-bit cluster.
2466246 – Printer VBScript error: 0x1A8. Object required
http://support.microsoft.com/kb/2466246

PrintUI.dll

Supportability

One-line PrintUI.dll commands are fully supported by Microsoft support services, but the in-box print admin scripts are always the preferred method of getting the same tasks done.

PrintUI.dll Help

PrintUI.dll contains a wealth of information and examples if you run the following command.

RUNDLL32 PRINTUI.DLL,PrintUIEntry /?

clip_image003[1] Important Notes

ü Use the /u switch when connecting to queues or drivers may be downloaded repeatedly.

ü Adding a local port (standard tcp/ip or otherwise) is NOT supported by this tool.

ü An undocumented /x switch is required to map an IPP printer. (Content ID 314486)

ü PrintUI.dll is updated somewhat frequently, so make sure you’re using the latest version.

Commonly used commands:

Connect to a print queue:

rundll32 printui.dll,PrintUIEntry /u /in /n \\machine\printer

Add OEM printer driver using inf:

rundll32 printui.dll,PrintUIEntry /ia /m "Xerox WorkCentre 7775 PS" /h "x64" /v 3 /f C:\Xerox\x2DLEXP.inf

Add in-box printer driver:

rundll32 printui.dll,PrintUIEntry /ia /m "Brother DCP-116C" /h "x64" /v 3

Troubleshooting:

The vast majority of PrintUI.dll problems are related to incorrect or incomplete syntax.

ü Use example syntax as a template.

ü PrintUI.dll switches are case sensitive.

ü Driver names must be exactly as you see them in the GUI. (when installed manually)

ü Drivers require specification of the correct processor architecture using the /h switch. Use a simple “x86” or “x64” parameter to indicate your preference.

ü Drivers also require a version to be specified with the /v switch. You will always use 3 as the parameter for this switch. (There are no supported v2 kernel mode drivers today.)

More Information:

Deploying Printers and Print Drivers Remotely

SetPrinter (SetPrinter API wrapper)

SetPrinter Support Guidelines

SetPrinter.exe is distributed with the Windows Server 2003 Resource Kit and is subject to the Resource Kit Support Policy.

Resource Kit Support Policy

The SOFTWARE supplied in the Windows Resource Kit Tools is not supported under any Microsoft standard support program or service. Customers can, however, report issues and bugs by sending e-mail to rkinput@microsoft.com. Microsoft will, at its sole discretion, address issues and bugs reported in this manner, and responses are not guaranteed. This e-mail address is only for issues related to the Windows Resource Kit Tools and the Windows Deployment and Resource Kits.

The SOFTWARE (including instructions for its use and all printed and online documentation) is provided "AS IS" without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the SOFTWARE and documentation remains with you.

In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the SOFTWARE be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the SOFTWARE or documentation, even if Microsoft has been advised of the possibility of such damages.

Although no support services are available for this tool, it generally works with all OS’s, both clustered and stand-alone, from Windows XP to Windows Server 2008 R2.

A few sample commands are provided later in this document, but consumers of this tool will generally need to use the embedded help to customize the command line for a desired result.

clip_image003[2]Note

ü A custom script (e.g. VBScript, PowerShell, etc.) is a good alternative if SetPrinter will not accomplish a specific goal or functions in an unexpected manner.

SetPrinter Help

Running SetPrinter.exe without any arguments will display the embedded help.

Syntax: SetPrinter [-<mode>] <\\server|printer> <level> [<data> …] [<cmd>]

or SetPrinter -help <level>

or SetPrinter -examples <level>

or SetPrinter -show [-<mode>] <\\server|printer> <level>

where:

\\server : (or \\server\*) change all local printers on this server

(use "" or "*" for all printers on local machine)

\\server\\: change server (not printer) settings

printer : change this printer (printer or \\server\printer)

level : PRINTER_INFO level (0 – 9).

data : (optional) Level specific data in ‘keyword=value keyword=value’

format. Data is unchanged for keywords not specified.

cmd : (optional, but must be last if present) one of:

"pause", "resume", "purge", "setstatus"

-help : show format of data for <level>

-examples : show usage examples for <level>

-show : show current settings (no changes applied – all <data> ignored)

-<mode> : (optional) Only valid on Windows Vista and later.

Possible values: -cached, or -notcached

(See documentation for OpenPrinter2 API, pOptions parameter)

The <level> determines which members of the printer structure are used.

The most common <level> values are:

clip_image001 Level 2: Used to configure most print queue settings.

clip_image001[1] Level 3: Used to set print queue security.

clip_image001[2] Level 8: Used to set global document printing defaults.

Help for each level is available by running SetPrinter –help <level>

If there is a specific setting you are interested in, you may configure a print queue as desired in the GUI and then use the SetPrinter –show option to find the value.

Self-Help Walkthrough:

These scenarios are intended to “teach you to fish”.

Example One:

I need to know what setting controls landscape vs. portrait in the Printing Defaults, and then set that to landscape for all print queues.

1) This is a global setting that I want all clients to get when the print queue is connected to for the first time, so 8 is the appropriate level.

2) Run SetPrinter –help 8 to see the level-specific help.

3) Run SetPrinter –examples 8 to see some examples.

4) Create a printer called HP and configure it to print in portrait mode.

5) Run setprinter -show "HP" 8.

6) Use the GUI to reconfigure the HP printer to print in landscape mode.

7) Run setprinter -show "HP" 8.

8) Compare the SetPrinter –show results to discover dmOrientation has changed from 1 to 2.

9) Roll out the change to all print queues with SetPrinter "” 8 pDevMode=dmOrientation=1.

Example Two:

I need to know what setting controls a print processor, and then switch all queues to WinPrint.

1) This is a general setting for the print queue, so 2 is the appropriate level.

2) Run SetPrinter –help 2 to see the level-specific help.

3) Run SetPrinter –examples 2 to see some examples.

4) Create a printer called Xerox and set it to the WinPrint print processor.

5) Run setprinter –show “Xerox” 2.

6) Use the GUI to reconfigure the Xerox printer to use a 3rd party print processor.

7) Run setprinter –show “Xerox” 2.

8) Compare the SetPrinter –show results to discover pPrintProcessor has changed.

9) Roll out WinPrint to all print queues with SetPrinter "" 2 pPrintProcessor=WinPrint.
Note: Most 3rd party drivers work fine with WinPrint. When in doubt, ask your OEM.

Example Three:

I need to mirror the security settings on one print queue to all other queues.

1) This is a security setting for the print queue, so 3 is the appropriate level.

2) Run SetPrinter –help 3 to see the level-specific help.

3) Run SetPrinter –examples 3 to see some examples.

4) Create a printer called Lexmark and set security as desired.

5) Run setprinter –show “Lexmark” 3 and copy the security descriptor.

6) Roll out the security descriptor to all print queues with SetPrinter "" 3 <Security Descriptor>.

Note: You may need to run this as the local system account. (psexec –s –i cmd.exe)

TechNet Script Repository

The TechNet Script Repository provides printer management scripts with support provided through the forums. Whether you’re a developer or a “script kiddie”, this is the place to go for all of your custom printer management scripting needs. Maybe you can even contribute something to the community? J

TechNet Script Center Repository
http://gallery.technet.microsoft.com/scriptcenter

Disclaimer: The sample scripts are not supported under any Microsoft standard support program or service. The sample scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.

I hope you’ve enjoyed reading this information as much as I have putting it together for you, and I sincerely hope one or more of these options can save you some time in the near future.

Aaron Maxwell

Dual Boot Windows 8 from VHD using Windows Setup

http://blog.concurrency.com/infrastructure/dual-boot-windows-8-from-vhd-using-windows-setup/

 

Post Pic

Dual Boot Windows 8 from VHD using Windows Setup

Posted on September 15, 2011 by Shannon Fritz in Infrastructure

Are you running Windows 7 and have things just the way you like them, but you’re really curious to see how Windows 8 looks and feels? Using this method, you can boot your computer between your existing Windows 7 installation or Windows 8 without needing to sacrifice disk space! Using a Dynamic Virtual Hard Disk (VHD), you can install Windows 8 to a single file that is stored on your Windows 7 file system, and then boot directly from that Virtual Hard Disk when you can then choose to load your existing OS or the new Windows 8. You are not doing an in-place upgrade and you are not doing a rebuild. It’s just a new install of Windows 8 and you don’t have to trash your existing setup to do it. Let’s get started!

On the computer which already has windows 7 installed, boot from the Windows 8 media and you’ll launch the installer. Before clicking “Install Now”, hit Shift+F10 and the WinPE command prompt will appear.

Note: If you want to boot from USB instead of burning a DVD, you can use the very handy WUDT tool from CodePlex which will make a bootable USB stick from the ISO for you.

It’s time to create the VHD that will be your Windows 8 drive. Run “diskpart” from the CMD window, then issue the following commands to diskpart:

  1. list disk … This shows your currently attached hard disks. In this example I only have one, Disk 0.
  2. select disk 0 … You want to select the disk where you’re current operating system (Windows 7) is installed, so if you have multiple disks available, you might use a different number.
  3. list vol … Show all the volumes that exist on that disk. Existing installations of Windows 7 will usually have a 100MB volume that is the “System Reserved” partition (used as the boot loader and leveraged by BitLocker) and then the actual OS volume is much larger. In example you can see my Windows 7 volume is actually assigned to letter D (although when booting normally it would be my C: drive).
  4. create vdisk file=d:\Windows8.vhd maximum=100000 type=expandable … This creates a Dynamic VHD that can grow to ~100GB in the root of my Windows 7 partition.
  5. select vdisk file=d:\Windows8.vhd … after selecting this vdisk, the following commands will apply to it
  6. attach vdisk … The VHD will be mounted and the disk will be available to the windows installer
  7. exit … we’re done with diskpart

All those commands will look like this:

Now you can close the Command Prompt and return to the Install Windows wizard and click Install Now. When asked where you want to install Windows, you should see a new Disk 1 listed with Unallocated Space. You’ll notice that when you select this disk the installer will tell you that “Windows cannot be installed to this disk” but the Next button is enabled. If you click Next, it will in fact install Windows there just fine.

Once the installation is complete and your computer reboots, you will see a new boot loader that asks you to “Choose an operating system” and you can select either the new install of Windows 8 or your previously existing OS. The first time this appears you get about 3 seconds and it auto loads Windows 8 to finish the setup. On subsequent reboots it’ll give you 30 seconds before auto selecting it.

Now you can browse around Windows 8 on your Native hardware! You can also still access files on your Windows 7 disk. Open Explorer and you’ll see it appear as a different drive letter (D:\ in this case) and you can browse around and copy/modify files as you wish.

Notice that the D:\ looks full? This is because the VHD you created for Windows 8 is reporting its maximum size instead of its actual size. When you boot into windows 7 you’ll see the VHD is actually only about 8GB.

All done with Windows 8 and can’t figure out how to shut down? Take your mouse and hover over the start button, or touch your mouse cursor to the bottom left corner of the screen and a small start menu will appear. Click on Settings, then Power and choose Shutdown.

Now you can enjoy the best of both worlds…N’joy!

« Previous PageNext Page »
Back to Top