All posts by jim

Simple powershell automated FTP upload script

[This post was originally posted on my personal blog, http://simplystallings.com]

At work, we manually patch our web servers. Part of the process requires ftping the updates to each server. This process is tedious considering the number of web servers and number of steps required. I decided this past patch Tuesday that I would invest a little time into automating the process using powershell.

I located a simple ftp upload script located @ http://poshcode.org/1134. With a few modifications I had my script:

$file = "somefilename"
$filePath = "C:\" + $file
for ($i=0;$i-lt$servers.length;$i++)
{
"ftp url: $ftp"
#FTP URL syntax
$ftp = $servers[$i]+$file
$webclient = New-Object System.Net.WebClient
$uri = New-Object System.Uri($ftp)
"Uploading $File..."
$webclient.UploadFile($uri, $filePath)
}

I added an array that contains the ftp URL syntax for each web server then I iterate over the array using a for loop. Continue reading Simple powershell automated FTP upload script

Using the BlackBerry MDS-CS Simulator

Using the BlackBerry MDS-CS Simulator

Mobile Data System Connection Services (MDS-CS) is a BlackBerry Enterprise Server (BES) component that acts as a “gateway” between BlackBerry users and local network resources (i.e. intranet, SharePoint, file shares). RIM offers the MDS-CS component of BES as a free-standing simulator. This allows developers to test an application (that requires network access) against different modeled BlackBerry simulators without the complication of connecting each simulator to the BES. The easiest way to begin using the MDS-CS simulator is to download a BlackBerry JDE which includes the MDS-CS simulator and a variety of BlackBerry simulators.

Using MDS-CS Simulator packaged in the JDE Continue reading Using the BlackBerry MDS-CS Simulator

Add Remote Network Service Account to SQL Server

I make extensive use of virtual machines for testing purposes. I recently needed to allow the Network Service account of one of my VMs to connect to SQL Server on another of my VMs. Both machines are on the same domain, so I thought I could use the search feature on the new login dialog to find the Network Service for that machine. Unfortunately it was not so simple. I also had quite a difficult time find information about it on Google.

It turns out to be rather simple though. You just append $ to the name of the remote machine. Suppose my remote machine is on the domain “OURS”, and the machine’s name is “MINE”. Then the SQL login for the Network Service account on MINE is “OURS\MINE$”. You won’t be able to verify this with “Check Name” though. You’ll have to actually try connecting the the SQL Server from the remote machine to make sure it works properly.

Hopefully this will save someone else an hour or two of searching on Google.

Using IE to Connect to a Keberos Enabled Non-Default Port SharePoint Site

So that title may be a bit to swallow…. Basically, Internet Explorer does not handle authenticating to a Kerberos enabled website running on a non-default port..

For example, I created the SharePoint central administration site on host computer MOSS (port 1000) to use Kerberos authentication. I add the service principle name (HTTP/MOSS:1000, HTTP/MOSS.domainname:1000), required for Kerberos authentication, to the central administration site’s application pool account in Active Directory. When I attempt to browse to the central admin site from another computer in the domain (my host running ie 8) I get an unauthorized message after several failed attempts to login to the site with the farm administrator’s credentials. If you go back to the the central admin site’s host (MOSS2007) and tweak the local security policy to audit failed logins then you should see Kerberos 529 events in the security log (if you attempt to reach the page again). Continue reading Using IE to Connect to a Keberos Enabled Non-Default Port SharePoint Site

SSL Certificates, Blackberries, BES, and SilverDust

Introduction

Potential connection issues can occur between the SilverDust server, BES, and SilverDust blackberry client if SSL encryption is used. We recommended SSL be used in every production SilverDust environment to encrypt SharePoint content between SD Server and the BES/blackberry.

This post also serves as a general guide for accessing any SSL enabled website from the blackberry.

The Handshake

There are two ways a blackberry can complete a SSL handshake. The first option, called proxy mode, allow’s the BES to complete the handshake on a blackberry’s behalf. The second option, called handheld mode, allows the blackberry to directly complete the handshake.

Handheld Mode

To enabled handheld mode change the TLS default setting on the blackberry. This setting can be adjusted on the handheld by navigating to options->security options->advanced security options->TLS Default->change the setting between proxy and handheld. The default is proxy mode or set an IT policy value to force handheld mode. Continue reading SSL Certificates, Blackberries, BES, and SilverDust

Manually Patching Backup Exec Remote Agents

After installing a live update on a backup exec media server, you may be tasked with updating all your Backup Exec remote agents (it is usually mentioned in the release nots of the update/patch). Symantec included a remote agent update tool that can be run from a media server, but occasionally it flakes out (like it did today for me with no explanation in the logs when attempting to update to 12.5 SP3). As long as the patch applied successfully on the media server this method below should work.

How To Patch BE Remote Agents Manually

Warning: I only tested this with BE Remote Agents for Windows!
  1. Copy the RAWSx32 (or RAWSx64) folder from the BE Media Server (located @ C:\Program Files\Backup Exec\Agents) to any server that requires the agent update.
  2. Open the Updates directory (in the RAWS32 folder) and find the most recent .msp file (MS patch file).
  3. Run that .msp file
    • You’ll may have to restart after applying.
  4. You can verify that the patch applied successfully a few different ways.
    • Rerun the remote agent update tool against the server. If it was updated then it should pop up a msg indicating so. I guess it is useful for something!
    • Compare the BE remote agent version on the media server against the server you updated by right clicking About the BE remote agent utility on the each box.

Where Did My Server’s Disk Space Go?

Every server administrator, at one time or another, has probably built a server image with a small primary partition housing the operating system/ possibly applications (raises hand)  and in hindsight wishes they hadn’t.

With the prevalence of virtual machines now in many IT environments, it is a lot easier to expand the disk either if you get into trouble, but chances are you still have a few physical servers left in your environment (domain controllers, backup servers, etc). So what do you do when you start to see that low disk warning?

Short term solutions for freeing up space
  • Run a disk cleanup
  • Compress large folders (check the contents before attempting this)
  • Remove $folders under the %systemroot&:\windows dir – typically these folders are uninstallers for updates/patches
  • Remove unneeded logs files – search for text files with a .log extension.
  • Remove everything from the download folder located @ %systemroot%\Windows\SoftwareDistribution\Download – this is the temp location where patches are extracted to.
  • Run Windirstat

The Two Kinds of Colocation Failover

The Two Kinds of Failovers

Active/Active
  • Pros
    • Global Load Balancing (GLB) supported
    • Automated fail over
      • Less down time
    • Automated or manual roll back to primary in most cases
  • Cons
    • (Generally) More expensive then active/passive fail over
    • Setup is more complex
  • Notes

Adding a Virtual Machine Host to SCVMM 2008

For the sake of saving space in the title, SCVMM stand for System Center Virtual Machine Manager. SCVMM is a Microsoft application used to centrally manage multiple Hyper-V enabled hosts and VMs.

Today was my first chance to have some hands on time with our SCVMM instance. I had a fairly simple task to accomplish, add a Windows 2008 virtual machine host to SCVMM.

To start, click add host from the action panel on the right hand side of SCVMM. I was able to easily find my virtual machine host using the integrated AD lookup tool, but the job created to add the host timed out shortly with an error 415:

Continue reading Adding a Virtual Machine Host to SCVMM 2008

How to Enable Debug Logs on Your Blackberry

Enabling debug logs on a blackberry device can help provide useful information when troubleshooting an issue.

Blackberry Storm

  1. Bring up the keyboard on your home screen by pressing the blackberry key followed by show keyboard.
  2. Hold the 123 button in until you see a small lock icon.
  3. Type in the following sequence “/”/

Other Blackberries (This hasn’t been tested on anything newer then the Curve.)

  1. On the home screen, hold down the ALT key and type the following sequence LGLG

Log display

  1. You can adjust the minimum log level under EventLogger Options by pressing the blackberry key followed by options. You can changing the level in the top drop down box.
  2. While still under EventLogger options, you can filter certain logged events by toggling them on and off.

How to save a copy of the debug log

With the EventLog screen open:

  1. Click the track wheel and select Copy Day’s Contents.
  2. Paste the contents into the body of an email and send the message to yourself.