Saturday, May 8, 2010

Appended column stores by Version Control settings

OK, I feel really stupid with this one.  I use the Appended Column setting as a Log Column all over the place.

A user was wondering why they were only seeing the last 6 appended entries and not all of them. The appended column setting only stores as many Versions as you have set in your List Version Control settings. DUH, I knew that of course but had completely forgotten about it.

Can not delete a master page " This item cannot be deleted because it is still referenced by other pages "

I came across this bug the other day.  When creating a custom master page, I then wanted to delete it. When trying to delete the page I got the following error

"This item cannot be deleted because it is still referenced by other pages. This item cannot be deleted because it is still referenced by other pages " 

but I knew my page was not attached to any other pages. I finally found this KB from Microsoft http://support.microsoft.com/?kbid=926812 stating this is a known bug.

Rather than "hiding" the page as they suggest, I chose to create a Folder called "DeleteMe" in the MasterPage Gallery, then I had to turn my Version Control off completely and Content Approval off too. Then I opened the gallery using SPD and was able to drag the master pages into the DeleteMe Folder, then I went back to the Master Gallery web page and deleted the Folder.

Technorati Tags: SharePoint Master Page,can not delete

Site Owner can not Create a Page (Publishing Page)

This occurs more on architectures where the majority of sites are NOT a Site Collection but merely a Site under a Site Collection. While the Site Owners group has Full Control of their site they still are not able to Create a Page from the publishing pages library in their site.

This is because they must also have Read access to the Master Page Gallery at the Site Collection level.

Site Actions - Site Settings - Modify All Site Settings - Master Pages and Page Layouts - Settings - Permissions - New - add all users with Read only permissions.

SharePoint BlueGlassBand.master template

If you are working with the BlueGlassBand.master file, there are many items different than the default.master since this is a publishing template.  Here are some of my notes from working with it.

  • MaximumDynamicDisplayLevels="1"
    • will add a right arrow in the right side of the banner area that when you hover over it will show your 1st level of items in your Global Navigation (top menu bar)
    • Why would I want this?  If you want to remove your Global Navigation (top menu bar) from the area below to save space.
  • StaticDisplayLevels="2"
    • will add the 1st level Global Navigation plus the banner directly underneath resulting in a column
    • Why would I want this?  Only if you want it to display in a column format...not likely.
  • No Global Breadcrumb because the datasource is different
  • Different Local Breadcrumb because the datasource is different (here I just edited it and replaced with one from default.master)
  • Site Title next to logo/banner will be the Site Collection if in Global Navigation you choose to inherit the menu from above rather than the local Site Title (I hate this one!)

Although the layout is nice and clean and you may be tempted to want to use it for sites, just remember it was intended for Internet facing sites, so many items are different and will be confusing for the users if they are use to the default.master.

I would recommend copying the default.master and changing that copy to look how you want.

Change the NEW! item display

I have posted this before, but I just needed to do it the other day again.  If you want to change the number of days SharePoint displays that NEW! icon here is the command.

Enter 0 to hide it all together, or enter 2-6 for the days.  If you enter 0...say to upload some bulk items that you don't want it to show the NEW! on...but you want to turn it back on say to 3 days later...you can, but make sure you wait until the 4th day from your upload to issue the new command otherwise your documents will show the NEW! for how ever many days are left. It goes by the Created On date field.

cd /d %programfiles%\Common Files\Microsoft Shared\Web Server Extensions\12\BIN

stsadm.exe -o setproperty -pn days-to-show-new-icon -pv 0 -url http://WebApplicationDefaultManagedPath

cd /d %programfiles%\Common Files\Microsoft Shared\Web Server Extensions\12\BIN

stsadm.exe -o setproperty -pn days-to-show-new-icon -pv 5 -url http://WebApplicationDefaultManagedPath

Reference Material:  http://support.microsoft.com/kb/825510

Performance Monitor - Base Objects to Monitor

Again this is an old article that did not get migrated over to this new site.

I am always surprised at how many senior engineers do not understand how to use the Windows Server built-in Performance Monitor to determine hardware, software, network bottlenecks...or that have never even used it.  

First thing to remember, is that while you are running Performance Monitor that will cause a performance hit to your server too.  Now, obviously you do need to run it to create a good baseline to compare against, and to troubleshoot...but you should just perform short captures of less than 30 minutes if possible, during times not used, then average use, then peak times or with forced hits. 

Below is the baseline object counters that I always start with, then I eliminate different Performance Objects one by one, by their results, until I have just 2 or three that I have narrowed it down to.  I suggest you create a baseline like this and save it locally so the next time you need to capture you can do so very quickly by just opening and starting it.  I have had this baseline for literally years, I am sure I probably got it from a Microsoft white paper, but can't remember where.

Start - Run - type Perfmon   or

Start  - Administrative Tools - Performance - System Monitor. You have 3 display formats; graph, histogram and text report.

Adding Performance Counters

  • Right click the counter pane and select Add Counter
  • Select whether you are monitoring the local computer counters by selecting Use local computer counter option or another remote computer by selecting Select counter from computer option by providing the UNC path
  • Select from the Performance object drop down list
  • Select the counter, these are different according to the selected performance object
  • Click Add to add it in the System monitor
  • Click Explain button if you need more details about the counter

Performance Object

Count

Threshold

Description

Processor

Percent processor time_total

80 to 85 percent averaged over three intervals

The total percentage of processor usage for a server.

Network Interface

Bytes total per second_network interface

50 percent of the available network interface bandwidth -- for example, a 100-MB network interface running at 50,000 KB per second

The rate at which bytes are sent and received over each network adapter.

Logical Disk

Percent idle time_ (drives C:,D:, and so on)

20 percent over idle time_.

Reports the percentage of time during the sample interval that the disk was idle. If this value is very low, the logical disk is very busy.

Paging File

Percent usage

Above 70 percent

Review this value in conjunction with memory -- available megabytes and page faults per second -- to understand paging activity on the server.

Memory

Available MBs

128 MB -- assuming 2 GB of RAM as prescribed on servers

The amount of physical memory, in MBs, immediately available for allocation to a process or for system use on the server.

Memory

Page faults per second

20

A high rate of page faults indicates a lack of physical memory.

System

Processor queue length

The number of CPUs + 1

Exceeding the threshold indicates that the processors are not fast.

ASP.NET Applications

Requests per second_total

Through ongoing monitoring, trends begin to emerge that equate requests per second with CPU consumption

The number of requests executed per second; this roughly equates to the number of HTTP pages per second.

Disk

Physical Disk\% Free Space

15%

Disk

Logical Disk\% Free Space

15%

Disk

Physical Disk\% Disk Time

90%

Disk

Logical Disk\% Disk Time

90%

Disk

Physical Disk\Disk Reads/sec, Physical Disk\Disk Writes/sec

Depends on manufacturer's specifications;15,000 RPM vs 10,000 RPM, etc.

Check the specified transfer rate for your disks to verify that this rate does not exceed the specifications. In general, Ultra Wide SCSI disks can handle 50 to 70 I/O operations per second. Note that whether or not the I/O is sequential or random can have a strong impact on values for disk reads/sec and disk writes/sec.

Disk

Physical Disk\Current Disk Queue Length

Number of spindles plus 2

This is an instantaneous counter; observe its value over several intervals. For an average over time, use Physical Disk\Avg. Disk Queue Length.

Memory

Memory\Available Bytes

For larger memory computers, greater than 4 MB

Research memory usage and add memory if needed.

Memory

Memory\Pages/sec

n pages/sec per pagefile

Research paging activity. Note the amount of I/O going to the disks with pagefiles.

Paging File

Paging File\% Usage

Above 70%

Review this value in conjunction with Available Bytes and Pages/sec to understand paging activity on your computer.

Processor

Processor\% Processor Time

85%

Find the process that is using a high percentage of processor time. Upgrade to a faster processor or install an additional processor.

Processor

Processor\Interrupts/sec

Depends on processor; 1,000 interrupts per second is a good starting point

A dramatic increase in this counter value without a corresponding increase in system activity indicates a hardware problem. Identify the network adapter, disk, or other hardware causing the interrupts.

Server

Server\Bytes Total/sec

If the sum of Bytes Total/sec for all servers is roughly equal to the maximum transfer rates of your network, you may need to segment the network.

Server

Server\Work Item Shortages

3
If the value reaches this threshold, consider
adding the DWORD entries InitWorkItems
(the number of work items allocated to a
processor during startup) or MaxWorkItems
(the maximum number of receive buffers that
a server can allocate) to the registry (under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\LanmanServer\Parameters). The entry
InitWorkItems can range from 1 to 512 while
MaxWorkItems can range from 1 to 65,535.
Start with any value for InitWorkItems and a
value of 4,096 for MaxWorkItems and keep
doubling these values until the Server\Work
Item Shortages threshold stays below 3.

Server

Server\Pool Paged Peak

Amount of physical RAM

This value is an indicator of the maximum paging file size and the amount of physical memory.

Server

Server Work Queues\Queue Length

4

If the value reaches this threshold, there may be a processor bottleneck. This is an instantaneous counter; observe its value over several intervals.

Multiple Processors

System\Processor Queue Length

SharePoint Performance Limits

I wrote this article over a year ago, but many of my old posts are missing from this new blog location.

Below are all of the SharePoint 2007 performance guidelines post SP1 summarized.  Note not all of these are "limits" but many are just suggested thresholds by Microsoft. Referenced Material: http://technet.microsoft.com/en-us/library/cc262787.aspx

  • SSP Shared Service Providers   · 3 per Farm sugg, 20 max
  • Zone   · 5 per Farm
  • Web Application   · 99 per SSP
  • IIS Application Pool  · 8 per Web Server
  • Site Collection   · 50,000 per Web Application
  • Site Collection   · 50,000 per Content Database
  • Site Collection   · 150,000 per Web Application * if spread across multiple Content DB
  • Content Database   · 100 CDB per Web Application
  • Index Servers   · 1 per SSP
  • Excel Calculation Services/Apps   · No Limit
  • Query Servers   · No Limit
  • Web Server/Database Server Ratio   · 8 Web Servers per Database server
  • Web Server/Domain Controller ratio   · 3 Web Servers per Domain Controller
    • however Microsoft is ASSUMING that your current DC are following their Guidelines for DC Capacity Planning recommendations according to those best practices of aproximately 1 DC per 10,000+ users.  Most customers have MANY more DCs than they should have, because they don't do proper DC capacity planning.
  • Web Site   · 250,000 per site collection
  • Subsite   · 2,000 per Web Site
  • Documents   · 5 million per library (sugg < 2,000 per Folder, Folders not nested too deep)
  • Document file size   · 2 GB  * the limit is NOT 50MB that is simply the "default" setting, most customers change this to 2GB
  • Item   · 2,000 per View
  • List   · 2,000 per Web Site
  • Field Type   · 256 per list
  • Column   · 2,000 per Document Library
  • Column   · 4,096 per list
  • Web Part   · 50 per page
  • Content Query,Cross List Web Parts
  • limit of 1,000 cross lists to query however, this IS over-ridable at the command level
  • Managed Paths   · 20 per Web Application
  • User in groups   · 2 million per Web Site
  • User Profile   · 5 million per farm
  • Security Principals   · 2,000 per ACL on any object
  • Search Indexes   · 1 per SSP
  • Search Indexes   · 20 per Farm
  • SSPs   · 20 SSPs per Farm
  • Indexed Documents   · 50,000,000 per Content Index
  • Content Sources   · 500 per SSP
  • Start Addresses   · 500 per content source
  • Alerts   · 1,000,000 per SSP
  • Scopes   · 200 per site
  • Display groups   · 25 per site
  • Crawl rules   · 10,000 per SSP
  • Keywords   · 15,000 per Site
  • Crawled Properties   · 500,000 per SSP
  • Managed Properties   · 100,000 per SSP
  • Authoritative Pages   · 200 per relevance level
  • Results removal · 100 during one operation
  • Crawl Logs   · 50,000,000 individual log entries

Microsoft Best Practices:

  • Separate NICS to handle inbound and outbound traffic. 
  • Use Gigabit NICs with sefl-switching cards set to over-ride to use 1 Gigabit. 
  • If using a Gigabit switch ensure the same number of inbound/outbound channels.
  • All front end servers should have LAN bandwidth and latency to the SQL back end server up to 1 millisecond latency. 
  • Custom Coding: No more than 2-3 SQL round trips. 
  • Consider moving the SSP databases onto a different physical database server.
  • Always use 15,000 RPM disks where possible.
  • Segregate the configuration database and content databases into different SCSI disks in a RAID 5.
  • Segregate search databases, temporary databases, and temporary database logs onto different high-speed SCSI disks in a RAID 10.  Add additional drives to the disk array to increase total I/O.
  • Defrag databases and drives on a regular basis.    
  • Build a temp data file for each processor core on the server.
  • WSS & MOSS are CPU intensive. Use 64bit 4 multi-core processors
  • · Implement a caching strategy, or distribute databases across multiple physical servers. 
  • · TTL issues: Keep Page download size small.
  • · Use 64bit OS and 8-16 GB RAM
  • · Exclude SQL databases files from antivirus software scans.

1/17/2009 8:03 PM

Failure decompressing data from a cabinet file error

Recently I got the following error when trying to save a site as a template with Content.  This site's size was well under the supported 25-50MB.  So I really should not have gotten the error.  However, this site did have much custom work and third party content types, etc.  So I think we sometimes get this error for other reasons than the KB article says.

Error:  Failure decompressing data from a cabinet file.

Resolution: none really, you can try increasing your template size by running on the front end servers:  Stsadm.exe -o setproperty -pn max-template-document-size -pv 524288000   However, in my case it didn't fix my error.  I ended up having to backup the site using SPD and restore it to a new location and work on my Lists from there.

Microsoft KB Article:  http://support.microsoft.com/kb/960969

Published: 6/1/2009 11:05 PM

How to add columns to Folders

Well as you probably know, you can add fields/columns to your document library lists, and populate those same field on the Folders themselves by going into Datasheet Mode.  The problem with this is that not all fields can be edited in Datasheet Mode. For example using this method you cannot edit a Data Lookup column to a Folder, or People Picker field, or Multi-line Text field while in Datasheet Mode.

Another way is to create your own Folder Content Type.

  1. On your site with the document library
  2. Site Actions - Site Settings -Galleries - Site content types
  3. Create
  4. Name = whatever you want, mine is "FolderPlus"
  5. Parent Content Type = Folder Content Types
  6. Parent Content Type = Folder
  7. Then either add it to an existing group or create a new group.
  8. Click OK
  9. Then in Columns select to Add from existing site columns or create new depending on your needs.
  10. Click OK
  11. At your document library select Settings - Library Settings 
  12. Select Advanced and select Yes to Allow management of content types - OK 
  13. In the Content Types section click Add from existing site content types - select the new FolderPlus 
  14. Now at your Document Library if you select NEW you will see the content type.
  15. Upon creating a new FolderPlus folder it should show you your columns you added to enter data in.

Whether you create this new Content Type at the Site Collection or Site level will depend on whether your additional columns are standard ones or unique.

Published 2/1/2007 9:01 PM

Know a little CSS do ya?

WELL, then have fun with this! As you know with SharePoint to get corporate branding looks you can create Custom Themes, Master Pages, etc.  Well what about those users that are not server admins, just a site owner?  If you know CSS (Styles) even just a little you can change the colors and fonts on your home page or any other pages you are the Site Owner to. 

All you have to do is add a Content Editor Web Part to the bottom of your page. Then hide the Title and Border, then select Source Code and enter <style> then your CSS custom styles </style> that's it.

What's the catch?  Well you do need to know what the SharePoint Controls Styles are called, that part is hard. But you can right click on a page select View Source, and you can see most of the controls there. Also Heather Solomon has a chart of course. Also this will only apply this style on this one page.  Also it will be slower this way because  it will actually apply this CSS control last, meaning after it loads the styles from Site Definition, Themes, etc.

But this is excellent to show regular Site Owners.  Have fun with it.

Published: 11/1/2007 8:29 PM

Good SharePoint Services 3.0 Power User Level Book

Too many books try to combine MOSS 2007 (Portal Server) in the same book as WSS 3.0 and therefore much ends up not being relevant to a pure WSS configuration. 

So I just looked over mine, and I think that the following one is best for users, power users and Site Owners.  I have a copy in my document library. Careful if you choose to open it or download it, it is 44MB in size, a PDF file. But for those preferring to order the book the information is below.

  • Microsoft Windows SharePoint Services 3.0 Step by Step
  • ISBN-13: 978-0-7356-2363-7
  • ISBN-10: 0-7356-2363-5
  • $24.99

Published: 3/3/2008 10:51 PM

Free SQL 2008 eLearning!

Check out these free SQL 2008 eLearning courses from Microsoft Learning site. I went through them this weekend and they are okay beginner courses to get you up to speed with what is new in 2008...and did I mention its free? Clinic 6188, 6189, and 6190 Here is a link to all their current FREE online courses:  http://learning.microsoft.com/Manager/Catalog.aspx?view=free

Published: 11/5/2007 10:19 AM

System Center Operations Manager 2007 presentation

This week I presented System Center Operations Manager 2007 and its differences from its predecessor MOM 2005 and the migration path, for Microsoft at the Utah IT Pro Users Group.  It was a 2 hour presentation. I am posting the presentation for any of you interested in Operations Manager. There is allot of content in my Speaker Notes so look there.

It is in my document library here. Beware it is 3MB and in PowerPoint 2007 SCOM 2007 Presentation

Org Published: 10/9/2007 10:06 PM

Book of Choice - sorry but its...Microsoft Press

People always ask me what books I recommend for SQL, AD, SharePoint, etc.  It always seems to be a disappointment to them when I say the Microsoft Press books are by far my favorite.  I don't deny that I am partial, I used to sit on their review/editing board for the MOC training classes and the MS Press publishing.  I liked their process for how they decided what content they left in did away with, by polling experts from different lines of business.

This newest set, the blue books, I find are very logical and easy to follow. I think I have everyone they've published so far!  I especially like the Administrator's Pocket Consultant series; SQL 2005, Exchange 2007, IIS 6.0.

But it is easier for me to say what books I have bought and read that were not worth the money or time spent; Syngress "How to cheat at Managing Microsoft Operations Manager 2005", horrible, they somehow just took the Installation ReadMe Text file that comes with MOM and reworded it to fill up 467 pages!  Don't waste your money!

Published: 1/5/2008 8:19 PM

Troubleshooting Forest Trusts Batch Output

This is one of the batch files I put together to troubleshoot forest trust relationship problems.  It was based off a Microsoft Port Query template batch file.

@echo off
Goto START

************************************************************************
* Created By:  Linda Chapman
* CMD File to facilitate PortQry test for Domain Controllers
* INPUT SYNTAX: OpenPorts.cmd <DC NetBIOS name>
* OUTPUT: This will generate a <DC NetBIOS name>TrustedDomainResults.txt file.
* DEPENDENCY: PortQry.exe
*
************************************************************************

:START
echo.
echo Testing with PortQry against %%s
echo AD/DC specific ports
echo.
echo.

:ERRORCHECK

echo Press any key to continue the test...
pause

:PINGTEST
echo Pinging %%s
Echo    ************* > TrustedDomainResults.txt
Echo    * Ping Test * >> TrustedDomainResults.txt
Echo    ************* >> TrustedDomainResults.txt

for /f "eol=; tokens=1 delims=," %%s in (TrustedDomainServerList.txt) do ping %%s >>TrustedDomainResults.txt
pause
Echo. >> TrustedDomainResults.txt
Echo. >> TrustedDomainResults.txt
echo.
echo.

:PORTWORK
echo Testing DNS
Echo    ************************ >> TrustedDomainResults.txt
Echo    * DNS (53) UDP and TCP * >> TrustedDomainResults.txt
Echo    ************************ >> TrustedDomainResults.txt
Echo    Performing    Portqry -n %%s -p both -e 53
for /f "eol=; tokens=1 delims=," %%s in (TrustedDomainServerList.txt) do Portqry -n %%s -p both -e 53 >>TrustedDomainResults.txt
echo.
echo.
pause
echo Testing Kerberos
Echo    ***************************** >> TrustedDomainResults.txt
Echo    * Kerberos (88) UDP and TCP * >> TrustedDomainResults.txt
Echo    ***************************** >> TrustedDomainResults.txt
Echo     Performing  portqry -n %%s -p both -e 88 >> TrustedDomainResults.txt
for /f "eol=; tokens=1 delims=," %%s in (TrustedDomainServerList.txt) do portqry -n %%s -p both -e 88 >>TrustedDomainResults.txt
echo.
echo.

echo Testing RPC End Point Mapper Service
Echo    ********************************** >> TrustedDomainResults.txt
Echo    * RPC End Point Mapper (135) TCP * >> TrustedDomainResults.txt
Echo    ********************************** >> TrustedDomainResults.txt
echo    performing portqry -n %%s -p TCP -e 135 >> TrustedDomainResults.txt
for /f "eol=; tokens=1 delims=," %%s in (TrustedDomainServerList.txt) do Portqry -n %%s -p TCP -e 135 >>TrustedDomainResults.txt
Echo.   >> TrustedDomainResults.txt
Echo.   >> TrustedDomainResults.txt
echo.
echo.

echo Testing NetBIOS Name Service
Echo    ********************* >> TrustedDomainResults.txt
Echo    * NetBIOS (137) UDP * >> TrustedDomainResults.txt
Echo    ********************* >> TrustedDomainResults.txt
echo   performing portqry -n %%s -p UDP -e 137 >> TrustedDomainResults.txt
for /f "eol=; tokens=1 delims=," %%s in (TrustedDomainServerList.txt) do Portqry -n %%s -p udp -e 137 >>TrustedDomainResults.txt
Echo. >> TrustedDomainResults.txt
Echo. >> TrustedDomainResults.txt
echo.
echo.

echo Testing NetBIOS Datagram Service
Echo    ********************* >> TrustedDomainResults.txt
Echo    * NetBIOS (138) UDP * >> TrustedDomainResults.txt
Echo    ********************* >> TrustedDomainResults.txt
echo    performing portqry -n %%s -p udp -e 138 >> TrustedDomainResults.txt
for /f "eol=; tokens=1 delims=," %%s in (TrustedDomainServerList.txt) do Portqry -n %%s -p udp -e 138 >>TrustedDomainResults.txt
Echo. >> TrustedDomainResults.txt
Echo. >> TrustedDomainResults.txt
echo.
echo.

echo Testing NetBIOS Session Service
echo    ********************* >> TrustedDomainResults.txt
Echo    * NetBIOS (139) TCP * >> TrustedDomainResults.txt
Echo    ********************* >> TrustedDomainResults.txt
echo    performingportqry -n %%s -p tcp -e 139 >> TrustedDomainResults.txt
for /f "eol=; tokens=1 delims=," %%s in (TrustedDomainServerList.txt) do Portqry -n %%s -p tcp -e 139 >>TrustedDomainResults.txt
Echo. >> TrustedDomainResults.txt
Echo. >> TrustedDomainResults.txt
echo.
echo.

echo Testing LDAP
Echo    ************************** >> TrustedDomainResults.txt
Echo    * LDAP (389) UDP and TCP * >> TrustedDomainResults.txt
Echo    ************************** >> TrustedDomainResults.txt
echo    performing portqry -n %%s -p both -e 389 >> TrustedDomainResults.txt
for /f "eol=; tokens=1 delims=," %%s in (TrustedDomainServerList.txt) do Portqry -n %%s -p both -e 389 >>TrustedDomainResults.txt
Echo. >> TrustedDomainResults.txt
Echo. >> TrustedDomainResults.txt
echo.
echo.

echo Testing SMB Direct Hosting
Echo    ***************** >> TrustedDomainResults.txt
Echo    * SMB (445) TCP * >> TrustedDomainResults.txt
Echo    ***************** >> TrustedDomainResults.txt
echo    performing portqry -n %%s -p tcp -e 445 >> TrustedDomainResults.txt
for /f "eol=; tokens=1 delims=," %%s in (TrustedDomainServerList.txt) do Portqry -n %%s -p tcp -e 445 >>TrustedDomainResults.txt
Echo. >> TrustedDomainResults.txt
Echo. >> TrustedDomainResults.txt
echo.
echo.

echo Testing Secure LDAP
Echo    ******************* >> TrustedDomainResults.txt
Echo    * LDAPS (636) TCP * >> TrustedDomainResults.txt
Echo    ******************* >> TrustedDomainResults.txt
echo    portqry -n %%s -p tcp -e 636 >> TrustedDomainResults.txt
for /f "eol=; tokens=1 delims=," %%s in (TrustedDomainServerList.txt) do Portqry -n %%s -p tcp -e 636 >>TrustedDomainResults.txt
Echo. >> TrustedDomainResults.txt
Echo. >> TrustedDomainResults.txt
echo.
echo.

echo Testing GC LDAP
Echo    ******************* >> TrustedDomainResults.txt
Echo    * LDAP (3268) TCP * >> TrustedDomainResults.txt
Echo    ******************* >> TrustedDomainResults.txt
echo    performing portqry -n %%s -p TCP -e 3268 >> TrustedDomainResults.txt
for /f "eol=; tokens=1 delims=," %%s in (TrustedDomainServerList.txt) do Portqry -n %%s -p tcp -e 3268 >>TrustedDomainResults.txt
Echo. >> TrustedDomainResults.txt
Echo. >> TrustedDomainResults.txt
echo.
echo.

echo Testing GC Secure LDAP
Echo    ******************** >> TrustedDomainResults.txt
Echo    * LDAPS (3269) TCP * >> TrustedDomainResults.txt
Echo    ******************** >> TrustedDomainResults.txt
Echo    Test GC SSL (3269) TCP >> TrustedDomainResults.txt
echo    performing portqry -n %%s -p tcp -e 3269 >> TrustedDomainResults.txt
for /f "eol=; tokens=1 delims=," %%s in (TrustedDomainServerList.txt) do Portqry -n %%s -p tcp -e 3269 >>TrustedDomainResults.txt
Echo. >> TrustedDomainResults.txt
Echo. >> TrustedDomainResults.txt
echo.
echo.
echo End of Script
echo pause
Goto END

:END

Published: 4/30/2008 11:39 PM

Charting for SharePoint

I like Dundas Charts and Gauges for SharePoint. Aproximately $1999 or $2999 for both Charts and Gauges. http://dundas.com/Technologies/Sharepoint/DashBundle.aspx

I would have liked AnyChart.com's product better, but they need to integrate into SharePoint more. They need to figure out to how point to a Sharepoint List and have their tool automatically generate the XML file and modify it so that the user doesn't have to try to figure this out.  They also had TERRIBLE SUPPORT!  No one would ever answer the emails.  They tried to say they were caught up in their spam filter.  I am sorry, but when your site says your primary means of support is over EMAIL, then you better make sure you can get all the emails.

Published: 1/1/2009 1:38 PM

Blog vs Discussion Threads

Okay I have been blogging for over 3 years now, before it was even well know of, and I have to say, I happen to like Discussion Threads better than Blogs.

I really like how Discussion Threads make it so easy to see the "tree" of the discussion.  With Blogs, regardless of what tool you are using, they are all the same in that you do not easily see the entire threaded discussion back and forth.

So there it is my vote is for Discussion Threads...I rarely express my opinion about stuff like this, but I am really just not getting the Blog over a Discussion Thread.  If Microsoft would modify Windows Live Writer to post to Discussion Forums then I would switch to a Discussion Forum in a heart beat.  But I do like the convenience that Windows Live Writer provides when documenting, so I use it for almost everything, which in turn means I have to use Blogs for almost everything!  Just do me a favor and modify Live Writer to post to Microsoft Discussion Forums so I can use those.

Published: 12/26/2008 1:36 PM

SQL 2005 Express Edition Backups

If you are using or have an application that is using the free version of SQL 2005 (Express), then you should install the free utility to manage it, Microsoft SQL Server Management Studio Express.  It provides a simple interface to manage instances of SSDE.  You can download this from Microsoft here.

It is very light weight, not taking up much space.  You can still use SQLcmd to script and schedule it through Scheduled Tasks if you prefer.  It can be found in C:\Program Files\Microsoft SQL Server\90\Tools\binn  or  C:\Program Files\Windows Resource Kits\Tools  .

First create a TSQL file.  You can create this using SQL Server 2005 Express Studio to get the proper syntax.  First create a backup, then while in the backup, go to the top bar and select Script - Script Action to File, and it will create the .sql file for you :

You will notice that Express defaults to a Simple Recovery.  If you need to perform a Full Recovery you will need to right click on your database, select New Query, paste the code below changing [Linda] for your database name, then select Execute.  Then you will notice you will now have the Transaction Log as an option under Backup Method.

USE [master]
GO
/****** Object:  Database [Linda]    Script Date: 09/04/2008 12:57:52 ******/
ALTER DATABASE [Linda] SET RECOVERY FULL
GO

Example of Backup of a Database:

BACKUP DATABASE [Linda] TO  DISK = N'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\Linda.bak' WITH NOFORMAT, NOINIT,  NAME = N'Linda-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
GO

Example of Backup of a Database with FULL, Append to Existing and Verify:

BACKUP DATABASE [Linda] TO  DISK = N'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\Linda.bak' WITH NOFORMAT, NOINIT,  NAME = N'Linda-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N'Linda' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'Linda' )
if @backupSetId is null begin raiserror(N'Verify failed. Backup information for database ''Linda'' not found.', 16, 1) end
RESTORE VERIFYONLY FROM  DISK = N'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\Linda.bak' WITH  FILE = @backupSetId,  NOUNLOAD,  NOREWIND
GO

Example of Shrink of a Transaction Log:

USE [Linda]
GO
DBCC SHRINKFILE (N'Linda_log' , 1)
GO

You should always backup the Transaction Log before Shrinking it.  Example:

BACKUP LOG [Linda] TO  DISK = N'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\Linda.bak' WITH NOFORMAT, NOINIT,  NAME = N'Linda-Transaction Log  Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N'Linda' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'Linda' )
if @backupSetId is null begin raiserror(N'Verify failed. Backup information for database ''Linda'' not found.', 16, 1) end
RESTORE VERIFYONLY FROM  DISK = N'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\Linda.bak' WITH  FILE = @backupSetId,  NOUNLOAD,  NOREWIND
GO

Then create your command for the Scheduled Task:

Example:  SQLcmd -S ComputerName\Instance -E -i "LocationOfINPUTfile\Backup.sql"

4/6/2009 11:13 PM

SharePoint Services 3.0 - SQL Database Moves

This is a list of good MS articles to reference in respect to your WSS SQL server and databases.

Published: 12/1/2008 9:24 PM

On Vista or Windows 7 you get "This file is read-only" when editing a SharePoint Services 3.0 document

Problem:
Using Vista, Office 2007 and Internet Explorer 7, or Windows 7 Office 2007 and IE8, you get any of the following errors when trying to edit and save a document from a SharePoint Document Library, or any other WebDAV based service.

  • This file is read-only.

  • Unknown error trying to lock file.

  • This document was checked out to your local drafts folder but the local copy could not be checked in to the site. Close any application that is editing the document and try to check in again, or discard the checkout.
Cause:
This problem is caused from a Vista and Windows 7 WebDAV problem when you do not have a Proxy Server defined.
Refer to Microsoft KB Article 943280.  Please note if Service Pack 1 for Vista is already applied then you only have to perform the  Registry change shown below.
Resolution:
Please follow the steps in the KB article above.
Step Summary

  1. Start - Run - RegEdit

  2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters

  3. From top menu select Edit

  4. New - Multi-String Value

  5. Enter:   AuthForwardServerList

  6. Press ENTER

  7. From top menu select Modify

  8. In the Value Data box type:
http://YourSharePointApplicationURLs
Then reboot.
Published: 2/15/2008 9:21 PM

Issue tracking list data is not saved when you save a site as a template

Problem:

Issue tracking list data is not saved when you save a site as a template.

Cause:

This is due to using the built-in Issue Tracking List as the original template.

Resolution:

Microsoft has confirmed this to be a problem, and there is currently no fix.

Microsoft Knowledge Base: http://support.microsoft.com/kb/948141/en-us

Your only options are to re-create the list and copy the data over.

Published: 12/4/2008 9:20 PM

SharePoint - Cannot see custom site template in subsite

Problem:

You save a site as a Site Template, and you see it listed in the Site Collection Gallery but you cannot see it as an option in a site under the Site Collection.

Cause:

If you create a Site off a built-in or custom template, then you create a sub-site based off a different built-in or custom template, then save that sub-site as a Site Template, you will not see this new Site Template as an option to create from under any sub-sites that are not built off the same template as the saved template site was.

Resolution:

Basically there is no workaround for this issue. You must create both sites from the same template to be able to see the Custom-CustomSiteTemplateName . You will either need to re-create a new top site based of the same original template the saved sub-site was…or re-create your sub-site to be based off the same original template the top site was, then re-customize it and re-save it back up to the Gallery again.

I did NOT find a Microsoft KB article on this exact problem, but did find a similar one on this same issue with a saved List Template, then tested this and found Site Templates have the same problem.

Published: 12/20/2008 9:17 PM

SharePoint Services 3.0 scheduled tasks backup

How to perform Full Farm Backups through Scheduled Tasks.

Go to Start - Control Panel - Scheduled Tasks - Open - Add Scheduled Task

At the Task tab:

  • Run:  "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.EXE" -o backup -directory \\SQLServerName\backupShare\FolderNameWSSbackups -backupmethod full
  • Start in:  "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN"
  • Run as:  Domain\WSSserviceAdminAccount
  • Enabled Checked
  • Then fill out the Schedule, Settings, and Security tabs as needed.

Do not forget to write or schedule another routine that goes and deletes old Farm Backups out of the backup directory listed above, otherwise you can fill up that server quite quickly.

Published: 12/21/2006 9:15 PM

How to view the current Operations Master role holders

Referenced Material

"www.microsoft.com/technet/solutionaccelerators/cits/mo/

winsrvmg/adpog/adpog5.mspx#EOBBG"

To view the current operations master role holders, use Ntdsutil.exe with the roles option. This option displays a list of all current role holders.

Procedure Requirements

  • Credentials: User or Administrator
  • Tool: Ntdsutil.exe (System Tools)

Procedure Steps

To view the current operations master role holder

  1. In the Run text box, type ntdsutil and press ENTER.
  2. At the ntdsutil: prompt, type roles and press ENTER.
  3. At the fsmo maintenance: prompt, type connections and press ENTER.
  4. At the server connections: prompt, type connect to server servername (where servername is the name of the domain controller that belongs to the domain containing the operations masters).
  5. After receiving confirmation of the connection, type quit and press ENTER to exit this menu.
  6. At the fsmo maintenance: prompt, type select operation target and press ENTER.
  7. At the select operations target: prompt, type list roles for connected server and press ENTER.
  8. The system responds with a list of the current roles and the Lightweight Directory Access Protocol (LDAP) name of the domain controllers currently assigned to host each role.
  9. Type quit and press ENTER to exit each prompt in Ntdsutil.exe. Type quit and press ENTER at the ntdsutil: prompt to close the window.

Published: 7/1/2008 9:14 PM

Migrations - IntraForest Domain Migration and Collapse

As a consultant, I have specialized in large enterprise migrations for 13 years.  Over that time I have lead the migration effort for over 10 large global enterprises all from complex mixed environments (MS, Unix, Novell, etc).  Below is the methodology I have developed over the years trying to follow all best practices.  This is my first article in a series of "Migration" topics.

The focus of this article is: Performing a IntraForest Domain Migration and Collapse using the free tool ADMT v3 (Active Directory Migration Tool).  This article does not take into consideration Exchange, SharePoint or any other application specifically.  It is a high level migration planning approach to get you started.

Important Concepts

  • The domain you are migrating or collapsing should be operating at Windows Server 2003 Functional Level.
  • Objects are migrated and no longer exist in the Source location.
  • SID history is required.  Using ADMT it will create a new SID but it will use the SID History or SID Walker old tool method to retain the original SID as an Attribute of the object, therefore AD is aware of the old SID.
  • Passwords are retained.
  • Local Profile Migration
    • Migrating user profiles is a completely separate step from migrating the user account.
    • Be prepared with the manual steps to migrate user profiles manually for ones that didn't work.
    • Users computer must be powered on and accessible on the network prior to the account, profile, and computer migration.
    • For workstations that run the Microsoft Windows 2000 Server operating system and later, local profiles are migrated automatically because the user’s GUID is preserved.
    • For Windows NT 4.0 and earlier you must use ADMT to migrate local profiles.
  • You must migrate accounts in closed sets. This means that all users in all groups you are migrating are only in your source domain, and all users that are in a group you are migrating are also being migrated, and all groups a user is in that is being migrated are being migrated. This is the only way the Global Group will be migrated to another Global Group.  If it is an "open set" then ADMT will migrate the Global Group to a Universal Group.  Remember, you don't want to have any more Universal Groups than necessary as they are replicated throughout the entire Trusted Forest structure from Global Catalog Server to Global Catalog Server causing un-necessary traffic over the network.
    • You migrate User Accounts, Global Groups together, and Resources (computers, servers, printers) and Local Groups together. The order you migrate objects is extremely important.  You will migrate Groups right before Users, not after.
    • When you migrate a Global Group it creates a Universal Group in the target domain to migrate the users into until all members of that Global Group have been migrated, and then it changes the Universal Group to a Global Group.  This is another reason it is important to migrate "closed sets".
  • Users must decrypt encrypted files before their account migration.

Active Directory Migration Tool

You must use ADMT to perform a domain migration or collapse properly. You can script it, use command prompt or use the Wizard.  Many things can go wrong in a migration using ADMT, especially if you have never performed a domain migration before.  Therefore, for this migration I highly suggest using the Wizard rather than scripting.

You will need to create at least one Migration Service Account that ADMT will use to perform the migration functions.

Object Migration Order

Remember you migrate 2 sets; 1) Groups and Users, and 2) Resources and Local Groups

  1. Run the Service Account Migration Wizard to identify all Service Accounts (it does not migrate them)
  2. Universal Groups
  3. Global Groups (exclude built-in groups)
  4. User Accounts that are members of the Global Groups migrated
    1. If you have any NT 4.0 computers then you need to Translate Local User Profiles next.
    2. This is not necessary for workstations > NT 4.0 because SID to GUID mapping will preserve in the registry the profile of the user and then re-associate it to the new SID.
  5. Service Accounts
  6. Resources - migrated users computers - you must reboot computer immediately afterwards
  7. Run Security Translation Wizard on any Software Distribution Points
  8. Resources - Printers
  9. Resources - File Servers - you must reboot immediately afterwards
  10. Resources - Member Servers (and Application Servers) - you must reboot immediately afterwards
  11. Resources - Infrastructure Servers (DHCP, DNS, all DCs except FMSO roles) and Domain Local Groups (exclude built-in groups) - you must reboot  immediately afterwards
  12. Resources - Infrastructure Server FSMO roles, leave the Root DC for last - you must reboot immediately afterwards

Migration Steps - high level

A domain migration and collapse is no minor task, and if not done in the proper order can orphan objects and lose their ACLs.  If you know me at all, you would know that I like to follow a phased approach for my migrations, as I was taught from my years work with Microsoft Consulting and EDS.

  1. Phase I - Preparation
    1. Clean up AD, remove all old user accounts, groups, OUs, computer accounts. 
    2. If you need to rename any accounts, groups or OUs you should do this prior to the migration, not during so that you do not experience naming conflicts.
    3. Identify all Login Scripts in the NTTL domain, track in a List recording what actions it takes.
    4. Identify all Service Accounts in the NTTL domain, track in a List recording; what permissions it requires, groups groups it is in, what GPOs are applied, and what applications and users use it.
    5. Identify all Domain Local Groups and ensure that the Domain Local Groups are NOT used ANYWHERE in the ACLs. 
      1. IMPORTANT:  Most companies do NOT leave enough time for this.  They "assume" that they don't have any or many ACLs using Domain Local Groups...and I have NEVER been to a company where they didn't under estimate this and ended up spending weeks re-ACLing at the last minute because they didn't address it properly.
    6. Identify all applications, scripts and batch files on all servers and workstations to ensure they do not have the fully qualified domain name hard coded anywhere.
      1. Again, I have stressed this to every customer and every customer insists they don't have any hard coded references to the domain names.  And again I have never had a customer that didn't have them.  I have had migrations come to a halt because of many domain references found at the last minute, that needed to be re-worked. 
      2. I suggest you purchase tool that can search the inside of batch files and other script files to search for your domain names.
    7. If there is currently only a one way trust, then create a two-way trust for the migration process as it just makes the steps easier.
    8. Identify all data, and printers on source domain controllers and migrate that data and objects over to other Member Servers if possible.
    9. Create a Service Account for ADMT that has Domain Administrator permissions in both domains.  It must also have delegated permission on the user, group, computer, OUs and the extended right to migrate SID history.
      1. In the TRI domain, delegate permissions on OUs that are targets for resource migration to the ADMT Service Account.
    10. OU Preparation - If you have a different OU structure then you will need to modify TRI to account for all computer, user, and application OUs.  You will need to map out which target OUs the computers and users will be migrated into.
  2. Phase II - Closed Set 1 Migration
    1. Use ADMT to migrate the following:
      1. Run the Service Account Migration Wizard to identify all Service Accounts (it does not migrate them)
      2. Universal Groups
      3. Global Groups (exclude built-in groups)
      4. User Accounts that are members of the Global Groups migrated
        1. If you have any NT 4.0 computers then you need to Translate Local User Profiles next.
        2. This is not necessary for workstations > NT 4.0 because SID to GUID mapping will preserve in the registry the profile of the user and then re-associate it to the new SID.
      5. Service Accounts
      6. Resources - migrated users computers - you must reboot computer immediately afterwards
    2. After each number verify migration logs for errors and verify the group types.
  3. Phase III - Closed Set 2 Migration
    1. Use ADMT to migrate the following:
      1. Run Security Translation Wizard on any Software Distribution Points
      2. Resources - Printers
      3. Resources - File Servers - you must reboot immediately afterwards
      4. Resources - Member Servers (and Application Servers) - you must reboot immediately afterwards
    2. After each number verify migration logs for errors and verify the group types.
  4. Phase IV - Collapse
    1. Use ADMT to migrate the following:
      1. Resources - Infrastructure Servers (DHCP, DNS, all DCs except FMSO roles) and Domain Local Groups (exclude built-in groups) - you must reboot  immediately afterwards
      2. Resources - Infrastructure Server FSMO roles, leave the Root DC for last - you must reboot immediately afterwards
      3. Perform ADMT Security Translation Wizard on Member Servers to clean up ACLs, and to remove the source domain SIDs from the ACLs..
    2. Only after ALL OBJECTS are migrated out of the child domain can you perform the DCPROMO back to a member server.
    3. Ensure all entries for the domain name and domain controllers are cleaned out of DNS, WINS, and Sites and Services properly.

Referenced Material:  Chapter 12 Restructuring Active directory Domains Within a Forest.doc

del.icio.us Tags: Migration Specialists,Active Directory migration,Active Directory Collapse,ADMT

Category: Active Directory;Migration

Published: 6/1/2008 9:11 PM

FSMO roles and how to transfer roles

In a forest, there are at least five FSMO roles that are assigned to one or more domain controllers. For best performance and recovery purposes you should not have all 5 FMSO roles on the same DC unless just to temporarily transfer to it for short-term maintenance. These are high level steps to transfer the Windows 2003 FSMO Roles to another DC for maintenance to be performed on the original DC.

For best performance and recovery purposes you should never have all 5 FMSO roles on the same DC unless just to temporarily transfer to it for short-term maintenance.

You can transfer FSMO roles by using the Ntdsutil.exe command-line utility or by using an MMC snap-in tool.

Depending on the FSMO role that you want to transfer, you can use one of the following three MMC snap-in tools:

  • · Active Directory Schema snap-in
  • · Active Directory Domains and Trusts snap-in
  • · Active Directory Users and Computers snap-in

If a computer no longer exists, the role must be seized. To seize a role, use the Ntdsutil.exe utility. Please use extreme caution when using this utility.

Transferring FSMO Roles – high level steps

Below are the high level steps required to perform any FSMO role transfers. What additional Change Management steps would be required would be determined following normal Change Management guidelines. At a minimum an RFC would always be required with a backup and restore plan.

If you have never transferred FSMO roles including the Schema Master role before you should perform this first in the lab. If you would perform a step out of sequence or when other DCs are not fully synchronized with the FSMO DCs you could have to revert to your back out plan.

  1. Go into Sites and Sites for that domain and force replication
  2. Check Event Viewer to see when the last reboot of both servers occurred, if over a week or prior to any other changes, then reboot both servers separately prior to proceeding to ensure stable after the reboot.
  3. Go into the Event viewer on all DCs and verify that Directory Services Replication has occurred successfully on all DCs, and no major errors on the target DCs. You can verify replication using EV or RepAdmin
  4. Verify all trusts are working using NLTest.exe
  5. Perform an NTBackup including System State and all drive data to an off disk location
  6. Verify that backup is restorable
  7. View and record the FSMO roles for the forest and target domain
  8. Transfer the Domain Naming Master Role
  9. Verify in Event Viewer or using NTDSutil, or MMC snap-in that the role transferred successfully.
  10. Go into Sites and Sites for that domain and force replication
  11. Verify successful replication to all DCs using Event Viewer, or repadmin /showrepl command, nltest, etc.
  12. Transfer RID Master, PDC Emulator, and Infrastructure Master Roles
  13. Verify in Event Viewer or using NTDSutil, or MMC snap-in that the role transferred successfully.
  14. Go into Sites and Sites for that domain and force replication
  15. Allow 30 minutes for all role changes to replicate throughout the forest, more if previously you found replication problems.
  16. Go into the Event viewer on all DCs and verify that Directory Services Replication has occurred successfully on all DCs, and no major errors on the target DCs. You can verify replication using EV or RepAdmin
  17. Transfer the Schema Master Role
  18. Verify in Event Viewer or using NTDSutil, or MMC snap-in that the role transferred successfully.
  19. Go into Sites and Sites for that domain and force replication
  20. Allow 30 minutes for all role changes to replicate throughout the forest, more if previously you found replication problems.
  21. Go into the Event viewer on all DCs and verify that Directory Services Replication has occurred successfully on all DCs, and no major errors on the target DCs. You can verify replication using EV or RepAdmin

Transferring FSMO Roles – Detailed Steps

The following steps to transfer FSMO Roles are from Microsoft white papers referenced below. These are not specific to any one environment, but are general steps.

Transfer the Domain Naming Master Role

  1. Click Start, point to Administrative Tools, and then click Active Directory Domains and Trusts.

  2. Right-click Active Directory Domains and Trusts, and then click Connect to Domain Controller.

  3. You must perform this step if you are not on the domain controller to which you want to transfer the role. You do not have to perform this step if you are already connected to the domain controller whose role you want to transfer.

  4. Do one of the following:

    • In the Enter the name of another domain controller box, type the name of the domain controller that will be the new role holder, and then click OK.

    • In the Or, select an available domain controller list, click the domain controller that will be the new role holder, and then click OK.

  5. In the console tree, right-click Active Directory Domains and Trusts, and then click Operations Master.

  6. Click Change.

  7. Click OK to confirm that you want to transfer the role, and then click Close.

Transfer the RID Master, PDC Emulator, and Infrastructure Master Roles

  1. Click Start, point to Administrative Tools, and then click Active Directory Users and Computers.

  2. Right-click Active Directory Users and Computers, and then click Connect to Domain Controller.

  3. You must perform this step if you are not on the domain controller to which you want to transfer the role. You do not have to perform this step if you are already connected to the domain controller whose role you want to transfer.

  4. Do one of the following:

    • In the Enter the name of another domain controller box, type the name of the domain controller that will be the new role holder, and then click OK.
    • In the Or, select an available domain controller list, click the domain controller that will be the new role holder, and then click OK.
  5. In the console tree, right-click Active Directory Users and Computers, point to All Tasks, and then click Operations Master.
  6. Click the appropriate tab for the role that you want to transfer (RID, PDC, or Infrastructure), and then click Change.
  7. Click OK to confirm that you want to transfer the role, and then click Close.

Transfer the Schema Master Role

It is very important that you ensure you have a complete backup and verified replication is successful on all DCs prior to transferring the Schema Master Role. If you have replication problems you could transfer the role and it not be accepted in the target DC or it accepts it and the remaining DCs still see the original schema master as still holding the role. This conflict would cause Forest wide problems potentially. So use with caution.

Use the Active Directory Schema Master snap-in to transfer the schema master role. Before you can use this snap-in, you must register the Schmmgmt.dll file.

Register Schmmgmt.dll

  1. Click Start, and then click Run.
  2. Type regsvr32 schmmgmt.dll in the Open box, and then click OK.
  3. Click OK when you receive the message that the operation succeeded.

Transfer the Schema Master Role

  1. Click Start, click Run, type mmc in the Open box, and then click OK.
  2. On the File, menu click Add/Remove Snap-in.
  3. Click Add.
  4. Click Active Directory Schema, click Add, click Close, and then click OK.
  5. In the console tree, right-click Active Directory Schema, and then click Change Domain Controller.
  6. Click Specify Name, type the name of the domain controller that will be the new role holder, and then click OK.
  7. In the console tree, right-click Active Directory Schema, and then click Operations Master.
  8. Click Change.
  9. Click OK to confirm that you want to transfer the role, and then click Close.

This document is based on the best practices for transferring FSMO Roles from Microsoft at:

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

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

http://technet2.microsoft.com/WindowsServer/en/Library/ea7f8494-ee1e-4d99-b28f-8f2fd8a72df21033.mspx?mfr=true

Published: 1/4/2008 9:09 PM

Granular AD permissions and tools to accomplish it

Okay I will be unpopular with this...but I really can't stand it when a product/application says in their instructions that you must give the application account or service account local Administrator permissions...and the engineers believe it!

Recently I just did a short contract for software development company.  A name most of you have heard of.  I was extremely surprised at their huge lack of knowledge about the Microsoft products they were developing off the shelf software for.  Even when I showed them how to use a Service Account to run their app and how their app only needed read permissions in the place they were coding, they simply didn't care.  They insisted that "...we always state our application requires Domain Administrator privileges..." and they wouldn't stop. Need less to say for those that know me, I gave my notice and quit that contract.

Several years ago, I was on a Microsoft contract where we were applying the tightest security on our Microsoft servers. I was tasked with taking our entire application layer and determining what the lowest level permissions were actually needed for every service account and every application.  This of course took quite a bit of time in the lab, by me installing with the permissions the application owners said it needed (usually Administrator), then re-imaging and reinstalling with the individual permissions one by one until the install and application worked.  End result was there was absolutely no applications that we tested for our deployment that needed Administrator permissions. Some of the products I tested were; Veritas, Norton AV, several web applications, Office, Active Directory functions, DNS functions, Account and Server functions, and many other off the shelf products, including some Microsoft ones. Now this is not saying that none do.  If they don't take the time to code it right then it can.  But many don't even know themselves.

Vendors typically will say it needs Administrator permissions because they don't want to bother with testing the permissions one by one to see what exact granular permissions it needs.  Yes, even Microsoft has become worse about doing this.  Most applications only really need 4 NT rights to operate and those 4 rights added to an application account is what is a Service Account.  There are some that need some other additional privileges of course too.

If you want a tighten down environment you will always take the time to test the actual granular permissions needed, and never believe the vendor when they say it takes Administrator. 

ALSO, I come across so many engineers that will test it using the built-in groups (Administrators, Backup Operators, Account Operators, etc)  and say...see it only worked when I added the account into the Administrators group.  Open your eyes and learn your operating system better.  There are about 35+ granular permissions you can grant...but you have to use the proper tools to grant or remove them!  This is probably not a complete list either, but the two tools I use the most often to get the granular permissions needed.

DSacls found in the Support Tools

   Permissions

  • GR - Generic Read
  • GE - Generic Execute
  • GW - Generic Write
  • GA - Generic All
  • SD - Delete
  • DT - Delete an object and all its child objects.
  • RC - Read security information
  • WD - Change security information
  • WO - Change owner information
  • LC - List the child objects of an object
  • CC - Create child object. If {Object|Property} is not specified to define a specific property, this applies to all properties of an object. Otherwise, it applies to the specified property of the object.
  • DC - Delete child object. If {Object|Property} is not specified to define a specific property, this applies to all properties of an object. Otherwise, it applies to the specified property of the object.
  • WS - Write to self object. If {Object|Property} is not specified to define a specific property, this applies to all properties of an object. Otherwise, it applies to the specified property of the object.
  • RP - Read property. If {Object|Property} is not specified to define a specific property, this applies to all properties of an object. Otherwise, it applies to the specified property of the object.
  • WP - Write property. If {Object|Property} is not specified to define a specific property, this applies to all properties of an object. Otherwise, it applies to the specified property of the object.
  • CA - Control access right. If {Object|Property} is not specified to define a specific property, this applies to all properties of an object. Otherwise, it applies to the specified property of the object.
  • LO - List the object access. Can be used to grant list access to a specific object if List Children (LC) is not also granted to the parent. Can also be denied on specific objects to hide those objects if the user or group has LC on the parent. By default, Active Directory does not enforce this permission.

NTrights.exe found in the Resource Kit

  • SeTcbPrivilege
    Act as part of the operating system
    Allows a process to authenticate like a user and thus gain access to the same resources as a user. Only low-level authentication services should require this privilege.
  • SeMachineAccountPrivilege
    Add computers to a domain
    Allows the user to add a computer to a specific domain. For the privilege to be effective, it must be assigned to the user as part of local security policy for domain controllers in the domain.
  • SeBackupPrivilege
    Back up files and directories
    Allows the user to circumvent file and directory permissions to back up the system. The privilege is checked only when an application attempts access through the NTFS backup application programming interface (API). Otherwise, normal file and directory permissions apply.
    • By default, this privilege is assigned to Administrators and Backup Operators. See also Restore files and directories in this table.
  • SeChangeNotifyPrivilege
    Bypass traverse checking
    Allows the user to pass through folders to which the user otherwise has no access while navigating an object path in any Windows file system or in the registry. This privilege does not allow the user to list the contents of a folder; it allows the user only to traverse its directories.
    • By default, this privilege is assigned to Administrators, Backup Operators, Power Users, Users, and Everyone.
  • SeSystemTimePrivilege
    Change the system time
    Allows the user to set the time for the internal clock of the computer.
    • By default, this privilege is assigned to Administrators and Power Users.
  • SeCreatePagefilePrivilege
    Create a page file
    Allows the user to create and change the size of a page file.
    • By default, this privilege is assigned to Administrators.
  • SeCreateTokenPrivilege
    Create a token object
    Allows a process to create an access token by calling NtCreateToken() or other token-creating APIs.
  • SeCreatePermanentPrivilege
    Create permanent shared objects
    Allows a process to create a directory object in the Windows 2000 or Windows Server 2003 object manager.
  • SeRemoteShutdownPrivilege
    Force shutdown from a remote system
    Allows a user to shut down a computer from a remote location on the network. See also Shut down the system in this table.
    • By default, this privilege is assigned to Administrators.
  • SeAuditPrivilege
    Generate security audits
    Allows a process to create, generate, and add entries in the security log. The security log is used to track unauthorized system access. See also Manage auditing and security log in this table.
  • SeIncreaseQuotaPrivilege
    Increase quotas
    Allows a process that has Write Property access to another process to increase the processor quota that is assigned to the other process. This privilege is useful for system tuning, but it can be misused, as in a denial of service attack.
    • By default, this privilege is assigned to Administrators.
  • SeIncreaseBasePriorityPrivilege
    Increase scheduling priority
    Allows a process that has Write property access to another process so that it can increase the execution priority of the other process. A user with this privilege can change the scheduling priority of a process in the Task Manager dialog box.
    • By default, this privilege is assigned to Administrators.
  • SeLoadDriverPrivilege
    Load and unload device drivers
    Allows a user to install and uninstall Plug and Play device drivers. Device drivers that are not Plug and Play are not affected by this privilege and can be installed only by Administrators. Because device drivers run as trusted (highly privileged) programs, this privilege can be misused to install hostile programs and give them destructive access to resources.
    • By default, this privilege is assigned to Administrators.
  • SeLockMemoryPrivilege
    Lock pages in memory
    Allows a process to keep data in physical memory, which prevents the system from paging the data to virtual memory on disk. Exercising this privilege can significantly degrade system performance. This privilege is obsolete and should therefore never be selected.
  • SeSecurityPrivilege
    Manage auditing and security log
    Allows a user to specify object access auditing options on individual resources such as files, Active Directory objects, and registry keys. Object access auditing must first be enabled in Audit Policy (under Security Settings, Local Policies). With this privilege a user can then specify individual objects for auditing in Windows Explorer. A user who has this privilege can also view and clear the security log from Event Viewer.
    • By default, this privilege is assigned to Administrators.
  • SeSystemEnvironmentPrivilege
    Modify firmware environment values
    Allows modification of system environment variables either by a process through an API or by a user through System Properties.
    • By default, this privilege is assigned to Administrators.
  • SeProfileSingleProcessPrivilege
    Profile a single process
    Allows a user to run Windows 2000® and Windows Server 2003 performance-monitoring tools to monitor the performance of nonsystem processes.
    • By default, this privilege is assigned to Administrators and Power Users.
  • SeSystemProfilePrivilege
    Profile system performance
    Allows a user to run Windows 2000 and Windows Server 2003 performance-monitoring tools to monitor the performance of system processes.
    • By default, this privilege is assigned to Administrators.
  • SeAssignPrimaryTokenPrivilege
    Replace a process-level token
    Allows a parent process to replace the access token associated with a child process.
  • SeRestorePrivilege
    Restore files and directories
    Allows a user to circumvent file and directory permissions when restoring backed-up files and directories and to set any valid security principal as the owner of an object. See also Back up files and directories in this table.
    • By default, this privilege is assigned to Administrators and Backup Operators.
  • SeShutdownPrivilege
    Shut down the system
    Allows a user to shut down the local computer. See also Force shutdown from a remote system in this table. In Windows XP Professional:
    • By default, this privilege is assigned to Administrators, Backup Operators, Power Users, and Users. In Windows Server 2003 :
    • By default, this privilege is not assigned to Users, only to Administrators, Backup Operators, and Power Users.
  • SeTakeOwnershipPrivilege
    Take ownership of files or other objects
    Allows a user to take ownership of any securable object in the system, including Active Directory objects, files and folders, printers, registry keys, processes, and threads.
    • By default, this privilege is assigned to Administrators.

Published: 7/25/2007 9:06 PM

Scripts - Creating Users, Home Directories, Shares

This batch file is one that I created many years ago, but still use.  It is a simple non-complicated way to automatically create users, apply a password, create their home directory and home share.  Your list of users have to be one to a line in the referenced u:\user.txt  file.  There are many different ways you can script something like this.  I use this on contracts where they don't have someone that can support a script but could a simple batch file.

rem    NB: user home directory is set at Z:\
rem    Use: Users.bat, LogonName, LastName, FirstName   
rem       
net use u: /delete
Net use u: \\ServerName\ShareName
u:
PAUSE
REM for /f %%v in (u:\user.txt) do net user %%v P@ssword /add /fullname:%%v

for /f "eol=; tokens=1,2,3,4 delims=," %%v in (u:\user.txt) do net user %%v P@ssword /add /fullname:"%%w"
PAUSE
for /f "eol=; tokens=1,2,3,4 delims=," %%v in (u:\user.txt) do net user %%v /Comment:"enter comment here" /scriptpath:LogonScript1.bat
PAUSE
REM for /f %%v in (u:\user.txt) do net user %%v /Comment:"enter comment here" /scriptpath:LoginScript1.bat
for /f %%v in (u:\user.txt) do net group "Domain Users" %%v /add
for /f %%v in (u:\user.txt) do net group GlobalGroupName %%v /add
for /f %%v in (u:\user.txt) do net group GlobalGroupName %%v /add

PAUSE

::creates directory for each user
u:
for /f %%v in (u:\user.txt) do md u:\%%v

::Gives the user ownership to his directory
for /f %%v in (u:\user.txt) do subinacl /subdirectory u:\%%v /setowner=%%v /grant=%%v=F

::Creates a remote hidden share and Gives Change permissions to the user

for /f %%v in (u:\User.txt) do net share %%v=d:\users\SubDirectory\%%v /grant:%%v,CHANGE

REM if you need to delete shares perform the following command
REM for /f %%v in (u:\user.txt) do net share \\ServerName\%%v /DELETE

PAUSE

Published: 8/10/2005 9:03 PM

Troubleshooting NetBIOS Name Resolution Problems

Use NbtStat to verify that you have the right IP address for a specific NetBIOS name is to use a tool that displays protocol statistics and TCP/IP connections using NBT (NetBIOS over TCP/IP). The syntax is case sensitive. For example, nbtstat -A lists the remote computer name table when given its IP address, and nbtstat -a lists the remote computer name table when given its name.

Examples of NetBIOS name resolution problems:

  1. You can ping another computer, however Nbtstat believes it is a computer other than the one that you specified. This means that there is a problem with name to address mapping. (An Nbtstat result overrules a Ping result.)
  2. You cannot ping another computer, and you receive a "Bad IP Address" error. This means that the name cannot be found.
  3. You cannot ping and you receive a "Request timed out" error. This means that either there are name resolution or connectivity problems or that the server is not functioning.
Using Nslookup for Name Resolution

You can use Nslookup to perform DNS queries and to examine the contents of zone files on local and remote servers.  To use Nslookup in interactive mode and to verify name resolution, at the command prompt, type the following:  NSLOOKUP

Published: 8/4/2008 9:01 PM

Troubleshooting DCdiag

This is continuing my entries on troubleshooting.  Use DCdiag to perform a fully automatic analysis with little intervention. It is a read-only tool that does not affect the state of the object. Although it allows specific tests to be run individually, it is not intended as a general toolbox of commands to perform specific tasks. Best use is to run all commands at once and compare the outcome of each as some my be related.

Use the Dcdiag tool to diagnose domain controller status for the following:

  • Connectivity
  • Replication
  • Topology Integrity
  • Directory Partition Head Permissions
  • User Permissions
  • Locator Functionality
  • Inter-site Health
  • Trust Verification
  • Diagnose Replication Latencies
  • Replication of Trust Objects
  • File Replication Service
  • Critical Services Check

Published: 8/1/2008 8:57 PM

Forest to Forest Trust - Ports Required

For Active Directory to function correctly through a firewall, the Internet Control Message Protocol (ICMP) protocol must be allowed through the firewall from the clients to the domain controllers so that the clients can receive Group Policy information.  You will need the following ports opened to create the trust and to perform the user/group administration after the trust is established.

Resource Material: Microsoft KB http://support.microsoft.com/default.aspx/kb/179442/

http://technet2.microsoft.com/WindowsServer/en/library/108124dd-31b1-4c2c-9421-6adbc1ebceca1033.mspx?mfr=true

(migrated content from old site, need to relink pictures)

* NOTE: The port for WINS is optional.  It is not required for a trust but only if YOUR Active Directory configuration is dependent on WINS still for resolution.

Published: 12/1/2008 8:54 PM

Configure RPC ports from Dynamic to Limited Range

Many things require communication for RPC over ports 1024-65535/TCP.  In many cases having all of these ports open is not practical.  Microsoft recommends you reduce this number of ports. Material References:  http://support.microsoft.com/kb/154596

This is nothing new, I have been doing this per Microsoft's recommendations for several years, although this referenced KB is newer, if you search you will find similar articles published since Active Directories first release.

This is a best practice for security lock down, and has been for years. I heard an engineer once say it breaks your support contract with Microsoft to make ANY edits to the registry.  That is simply incorrect, contact Microsoft to verify.  If it is to fix known reported problems where Microsoft publishes a KB article instructing you how like above, this is supported.

  1. Start - Run - Regedt32 - modify the following parameters for RPC. The RPC Port key values are all located in the following key in the registry: HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc\Internet\ Key Data Type Ports REG_MULTI_SZ
  2. If any entries are outside the range of 0 to 65535, or if any string cannot be interpreted, the RPC runtime treats the entire configuration as invalid. Select a smaller range like 25000-25500.
  3. PortsInternetAvailable REG_SZ Y or N (not case-sensitive)
    If Y, the ports listed in the Ports key are all the Internet-available ports on that computer. If N, the ports listed in the Ports key are all those ports that are not Internet-available.
  4. UseInternetPorts REG_SZ ) Y or N (not case-sensitive Specifies the system default policy.
    If Y, the processes using the default will be assigned ports from the set of Internet-available ports, as defined previously. If N, the processes using the default will be assigned ports from the set of intranet-only ports.
  5. Example:
  6. 1. Add the Internet key under: HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc
  7. 2. Under the Internet key, add the values "Ports" (MULTI_SZ), "PortsInternetAvailable" (REG_SZ), and "UseInternetPorts" (REG_SZ).
  8. The new registry key appears as follows:
         Ports: REG_MULTI_SZ: 25000-25500
         PortsInternetAvailable: REG_SZ: Y
         UseInternetPorts: REG_SZ: Y 
  9. Then restart the server.

Published: 10/31/2008 8:53 PM

How to disable firewall in WinPE 2.0

Hopefully you are using WinPE 2.0 if so you can open a command prompt and type  net stop ipnat  .  That is temporarily disable your firewall.  You cannot open and close individual ports using WinPE, just the disable and enable.

Published: 4/30/2008 12:52 AM

Performance Monitor – Base Objects to Monitor

I am always surprised at how many senior engineers do not understand how to use the Windows Server built-in Performance Monitor to determine hardware, software, network bottlenecks...or that have never even used it.   First thing to remember, is that while you are running Performance Monitor that will cause a performance hit to your server too.  Now, obviously you do need to run it to troubleshoot...but you should just perform short captures of less than 30 minutes if possible, during times not used, then average use, then peak times or with forced hits.  Below is the baseline object counters that I always start with, then I eliminate different Performance Objects one by one, by their results, until I have just 2 or three that I have narrowed it down to.  I suggest you create a baseline like this and save it locally so the next time you need to capture you can do so very quickly by just opening and starting it.  I have had this baseline for literally years, I am sure I probably got it from a Microsoft white paper.

Start - Run - type Perfmon   or

Start  - Administrative Tools - Performance - System Monitor. You have 3 display formats; graph, histogram and text report.

Adding Performance Counters

  • Right click the counter pane and select Add Counter
  • Select whether you are monitoring the local computer counters by selecting Use local computer counter option or another remote computer by selecting Select counter from computer option by providing the UNC path
  • Select from the Performance object drop down list
  • Select the counter, these are different according to the selected performance object
  • Click Add to add it in the System monitor
  • Click Explain button if you need more details about the counter

Performance Object

Counter

Threshold

Description

Processor

Percent processor time_total

80 to 85 percent averaged over three intervals

The total percentage of processor usage for a server.

Network interface

Bytes total per second_network interface

50 percent of the available network interface bandwidth -- for example, a 100-MB network interface running at 50,000 KB per second

The rate at which bytes are sent and received over each network adapter.

Logical disk

Percent idle time_ (drives C:,D:, and so on)

20 percent over idle time_.

Reports the percentage of time during the sample interval that the disk was idle. If this value is very low, the logical disk is very busy.

Paging file

Percent usage

Above 70 percent

Review this value in conjunction with memory -- available megabytes and page faults per second -- to understand paging activity on the server.

Memory

Available MBs

128 MB -- assuming 2 GB of RAM as prescribed on servers

The amount of physical memory, in MBs, immediately available for allocation to a process or for system use on the server.

Memory

Page faults per second

20

A high rate of page faults indicates a lack of physical memory.

System

Processor queue length

The number of CPUs + 1

Exceeding the threshold indicates that the processors are not fast.

ASP.NET applications

Requests per second_total

Through ongoing monitoring, trends begin to emerge that equate requests per second with CPU consumption

The number of requests executed per second; this roughly equates to the number of HTTP pages per second.

Disk

Physical Disk\% Free Space

15%

Logical Disk\% Free Space

Disk

Physical Disk\% Disk Time

90%

Logical Disk\% Disk Time

Disk

Physical Disk\Disk Reads/sec, Physical Disk\Disk Writes/sec

Depends on manufacturer's specifications

Check the specified transfer rate for your disks to verify that this rate does not exceed the specifications. In general, Ultra Wide SCSI disks can handle 50 to 70 I/O operations per second. Note that whether or not the I/O is sequential or random can have a strong impact on values for disk reads/sec and disk writes/sec.

Disk

Physical Disk\Current Disk Queue Length

Number of spindles plus 2

This is an instantaneous counter; observe its value over several intervals. For an average over time, use Physical Disk\Avg. Disk Queue Length.

Memory

Memory\Available Bytes

For larger memory computers, greater than 4 MB

Research memory usage and add memory if needed.

Memory

Memory\Pages/sec

n pages/sec per pagefile

Research paging activity. Note the amount of I/O going to the disks with pagefiles.

Paging file

Paging File\% Usage

Above 70%

Review this value in conjunction with Available Bytes and Pages/sec to understand paging activity on your computer.

Processor

Processor\% Processor Time

85%

Find the process that is using a high percentage of processor time. Upgrade to a faster processor or install an additional processor.

Processor

Processor\Interrupts/sec

Depends on processor; 1,000 interrupts per second is a good starting point

A dramatic increase in this counter value without a corresponding increase in system activity indicates a hardware problem. Identify the network adapter, disk, or other hardware causing the interrupts.

Server

Server\Bytes Total/sec

If the sum of Bytes Total/sec for all servers is roughly equal to the maximum transfer rates of your network, you may need to segment the network.

Server

Server\Work Item Shortages

3

If the value reaches this threshold, consider adding the DWORD entries InitWorkItems (the number of work items allocated to a processor during startup) or MaxWorkItems (the maximum number of receive buffers that a server can allocate) to the registry (under HKEY_LOCAL_MACHINE\SYSTEM\

CurrentControlSet\Services\LanmanServer

\Parameters). The entry InitWorkItems can range from 1 to 512 while MaxWorkItems can range from 1 to 65,535. Start with any value for InitWorkItems and a value of 4,096 for MaxWorkItems and keep doubling these values until the Server\Work Item Shortages threshold stays below 3. For information about modifying the registry, see Registry Editor overview .

Caution

Server

Server\Pool Paged Peak

Amount of physical RAM

This value is an indicator of the maximum paging file size and the amount of physical memory.

Server

Server Work Queues\Queue Length

4

If the value reaches this threshold, there may be a processor bottleneck. This is an instantaneous counter; observe its value over several intervals.

Multiple processors

System\Processor Queue Length

2

This is an instantaneous counter; observe its value over several intervals.