Categories
Windows 2008

Windows Server : A simple DFS Migration Plan

Windows Server : A simple DFS Migration Plan

I recently used the steps below to move DFS Name Spaces from one server to another without interruption to client connectivity.

  1. Install OS and configure the server that you will move the DFS namespaces to
  2. Create SMB shares on the server that you will host the DFS Namespaces from
  3. Replicate the data, either using DFS, RoboCopy or SecureCopy. For fairly static data the last two are fine, for data that changes more frequently I would choose DFS. Before proceeding make sure that all data is replicated.
  4. Add new server to DFS Namespace(s) that you have replicated the data for using the DFS Management Console
  5. Wait for AD DS replication to ensure that the additional server is listed on DFS clients (use dfsutil /pktinfo to verify)
  6. Set referral order override; configure the new server as “First amongst all targets” and the old server as “Last amongst all targets” using the DFS Management Console
  7. Again, wait for AD DS replication to ensure that the additional server is listed on DFS clients (use dfsutil /pktinfo to verify)
  8. If both DFS servers are Windows 2008 R2 then you can now disable the old server in the DFS Name Server list using the DFS Management Console, if one of the servers is running a previous version of windows not proceed to step 10.
  9. Wait for Ad DS replication, again checking with dfsutil /pktinfo
  10. Delete the old server from the Name Space(s) using the DFS Management Console
Categories
Windows 2008

Windows : Troubleshooting Automatic Updates

Windows : Troubleshooting Automatic Updates

Troubleshooting Automatic Updates, especially in version of Windows prior to Windows Server 2008, can be a bit of a pain.

Your first point of call should always be C:\Wndows\WindowsUpdate.log this log is invaluable in troubleshooting update issues.

You can trigger detection of updates using the command: wuauclt.exe /detectnow

You can trigger installation of updates using the command: wuauclt.exe /updatenow

Another useful command in a managed (WSUS) environment is: wuauclt.exe /resetauthorization /detectnow

If using WSUS you should also check the group you should also confirm the “target group” is correct. Search the log file mentioned above for “target group” to confirm this.

Categories
Windows 2008

Windows 2008 : DFS Client Referral Cache Management

Windows 2008 : DFS Client Referral Cache Management

The following commands can be used to manage the DFS Client Referral Cache. This is useful when migrating DFS namespace servers or troubleshooting client referral issues.

  • To view the current referral cache: dfsutil /pktinfo
  • To clear the referral cache: dfsutil /pktflush
Categories
General

vSphere : Building a Windows Cluster

vSphere : Building a Windows Cluster

Clustering Windows Server 2003, or 2008 under vSphere is a simple process:

  1. Create your two VM cluster nodes in the vSphere Console
  2. Install Windows Server Enterprise Edition on both nodes
  3. Add additional ‘cluster’ storage, attached to an additional shared SCSI controller (for Single Copy Clusters, SQL clusters or File/Print Clusters then do not use Paravirtual, use LSI Logic. Paravirtual is fine for an Exchange 2010 DAG.). You’ll get a new controller if you assign a SCSI ID to each new disk starting ‘1:’
  4. Ensure all disks that are shared are set to Independent Persistent
  5. Ensure all Disks are “eagerZeroedThick”
  6. Ensure the controller is set to Virtual Sharing in the VM configuration
  7. Build the cluster
The step that is often missed out is the modification of the vmx file for each cluster VM node; without these changes you’ll find that NTFS filesystems can become corrupted or SQL databases end up with torn pages / in a suspect state. You may even see chkdsk running after a failover from one node to another.
 
Add the following lines to the bottom of your vmx file to help alleviate these symptoms:
 
{code lang:ini showtitle:false lines:false hidden:false}disk.locking = “FALSE”

diskLib.dataCacheMaxSize = “0”{/code}

 

Categories
Exchange Server 2010

Exchange 2010 : Transport Server Pressure Script

Exchange 2010 : Transport Server Pressure Script

The below script will output the ResourceManager status of all transport servers, this can be useful when troubleshooting functions performed by Exchange 2010 transport servers.

{code lang:php lines:false hidden:false title:false}foreach ($srv in get-transportserver -identity "*") {
  [xml]$diag = Get-ExchangeDiagnosticInfo –Server $srv.identity –Process EdgeTransport –Component ResourceManager –Argument verbose
  $srv.name
  $diag.Diagnostics.Components.ResourceManager.CurrentComponentStates
  $diag.Diagnostics.Components.ResourceManager.ResourceMonitors.ResourceMonitor | ft –a Type, Resourc*,*Pressure* | out-string
  Get-counter -ComputerName $srv.name -Counter "\MSExchange RpcClientAccess\RPC Averaged Latency" –SampleInterval 5 -MaxSamples 2
}{/code}

To understand what pressure states mean, and the impact of each state take a look at the following TechNet article: http://technet.microsoft.com/en-us/library/bb201658.aspx

Categories
Exchange Server 2010

Exchange 2010 : High Item Count in Critical Path Folder

Exchange 2010 : High Item Count in Critical Path Folder

There is a significant performance impact of high item count in critical path folder on any version of Exchange. The script below can be used to help identify users in your environment with 20,000 or more items in any folder you specify. Change the folder in red to modify the scope of the script.

{code lang:php showtitle:false lines:false hidden:false}$data = @()
foreach($mbx in get-mailboxdatabase | get-mailbox) {
$data += get-mailboxfolderstatistics -Identity $mbx.identity -FolderScope ‘Inbox’| Where {($_.ItemsInFolder -ge 20000)} | select @{n=”Username”;e={$mbx.displayName}},FolderPath,ItemsInFolder }
# $data | ft
$data | Sort ItemsInfolder -Descending | export-csv InboxOver20k.csv {/code}

Categories
Exchange Server 2010

Exchange 2010 : Find Users with iOS 4.0 Devices (User Agent 801.29)

Exchange 2010 : Find Users with iOS 4.0 Devices (User Agent 801.29)

The following Exchange Shell Script will identify all users that have an iOS 4.0 device – these should be upgraded to 4.01+ ASAP. Save the code below into a .ps1 file and execute.

Categories
Windows 2008

Windows 2008 : Command Line Configure Network Adapters

Windows 2008 : Command Line Configure Network Adapters

Use the following commands to configure IPv4 settings for a NIC. 

First identify the NIC you wish to configure – obtain the Idx number of the NIC: netsh int ipv4 show int

Now set the IP address, subnet and gateway address: netsh int ipv4 set address 11 static 192.168.1.100 255.255.255.0 gateway=192.168.1.254

Now configure the primary DNS for the NIC: netsh int ipv4 set dnsserver 11 static 192.168.1.1

Finally, the secondary DNS for the NIC: netsh int ipv4 add dnsserver 11 192.168.1.2

Categories
Windows 2008

Windows 2008 : Command Prompt Rename COmputer

Windows 2008 : Command Prompt Rename Computer

Use the following command to rename you the computer you are currently logged on to:

netdom renamecomputer %computername% /newname:<newhostname>

Categories
General Joomla Articles

Enabling Compression on a Apache (Hostmonster) Joomla Website

Enabling Compression on a Apache (Hostmonster) Joomla Website

Edit php.ini so that the following lines read as follws (you only need ot change the first one on a Hostmonster site):

{code lang:ini showtitle:false lines:false hidden:false}output_handler = ob_gzhandler
zlib.output_compression = Off
;zlib.output_compression_level = -1{/code}

Add the following to the htaccess:

{code lang:ini showtitle:false lines:false hidden:false}
<IfModule mod.gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(js|css|html|php)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>

AddEncoding gzip .gz

<Files *.css.gz>
ForceType text/css
Header set Content-Encoding: gzip
</Files>

<Files *.js.gz>
ForceType text/javascript
Header set Content-Encoding: gzip
</Files>{/code}

Confirm compression is working using the following website: http://www.gidnetwork.com/tools/gzip-test.php