2010
01.25

I ran across an issue attempting to sysprep a machine to image.  The %WINDIR%\Panther log showed: 0x8030000b

Some people found that it was issue with Keys, Computer names, Media Center keys improperly included in the unattend.xml file.
In my case, it was caused by manually removing profiles from the machine before sysprep.  Check the registry keys @

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList – perhaps using the Profile Removal utility from system properties is cleaner?

2010
01.22

While adding a machine to AMS after restoring a sysprepped image, the adding of the machine to Acronis’ Management Console fails with the error:

The machine has been already registered

This is a quick fix:

1 – Remove the \HKLM\Software\Wow6432Node(on a 64 bit machine)\Acronis\BackupAndRecovery\Settings\MachineManager\MMSCurrentMachineID key

2 – Restart the AcronisScheduler service.

All set.

2009
11.16

I used AutoIT to create the following script to reset my Cisco 7940 IP Phones. It could be modified to script almost any telnet commands. It uses a file called “phones.txt” with a list of IP addresses (one on each line). Make sure you have that in the same directory.

Let me know if there is an interest in a compiled EXE version of this script that prompts for the password and I can put that together here.

The script follows:


$phonestxt = FileOpen("phones.txt",0)
$couldntreset = "I couldn't reset the following phones:"
$failedonce = 0
$endoffile = 0

While 1

$phonesIP = FileReadLine($phonestxt)
if @error = 1 Then
MsgBox(0,"Error!","Couldn't read phones.txt")
Exit
ElseIf @error = -1 Then
$endoffile = 1
EndIf


If $phonesIP <> "" then
TCPStartup()
Dim $IPtoTelnetTo = $phonesIP
Dim $port = "23"
Dim $ConnectedSocket = -1
$ConnectedSocket = TCPConnect($IPtoTelnetTo, $port)
If $ConnectedSocket = -1 Then
$failedonce = 1
$couldntreset = $couldntreset & " " & $phonesIP & ","
EndIf

Sleep('200')
TCPSend($ConnectedSocket, "PASSWORD" & @CRLF)
Sleep('200')
TCPSend($ConnectedSocket, "reset" & @CRLF)
TCPCloseSocket($ConnectedSocket)
TCPShutdown()
EndIf


If $endoffile = 1 Then
If $failedonce = 1 then
MsgBox(0,"Error!",$couldntreset)
Else
MsgBox(0,"Complete","All phones have been reset")
EndIf
Exit
EndIf

WEnd

2009
11.16

In my previous post I talked about how to accomplish a redirect, however there is a small snag:

Using a redirect page without enough text in the HTML file will, in some browsers (*ahem*IE*ahem*) cause them to use their own copy of the error page.  This copy won’t have a redirect to the site, obviously, and it won’t work.  This can be solved by changing the page to something like this:

<html>
<head>
<title>Microsoft Exchange Web Access - Redirect</title>
<META HTTP-EQUIV="Refresh"
CONTENT="1; URL=https://email.domain.com/owa/">
</head>
<body>
This page is attempting to redirect you to <a href="https://email.domain.com/owa/">https://email.domain.com/owa</a><br>
If you are not redirected within a few seconds, please click the link above to access Outlook Web Access.
</body></html>

2009
11.16

This simple batch file will modify a user’s UPN and also set first name, last name, and display name. It uses the dsquery command to pipe the required variable into dsmod. Simple and straightforward.

SET /P SAM=Sam Account Name:
SET /P UPN=New FULL UPN:
SET /P FIRST=First:
SET /P LAST=Last:

dsquery user -samid %SAM% | dsmod user -upn "%UPN%" -fn %FIRST% -ln %LAST% -display "%FIRST% %LAST%"

pause

2009
11.16

I took a quick look through the Central Administration page and was unable to find the Site Collection ID.

In the end the quickest way for me to retrieve this was to run a SQL query against the content database.

“select id from sites”

2009
11.16

I ran into an issue with VLAN tagging on our Hyper-V server. We are attempting to utilize this as part of an overall cable management “new years resolution” of sorts. While the setup through Hyper-V’s management console appears to be straight-forward enough, after following several sets of instructions it was still not working.  We were unable to ping the gateway address of the VLANs we were testing with.

The issue was based off of the drivers we use on that network card (It’s an Intel Pro/1000 PT). After some reading through technet, I ran across this post:
http://social.technet.microsoft.com/forums/it-IT/winserverhyperv/thread/cb771a3a-870d-4771-8658-97f0dcc47672/

The solution?  Modify VLAN filtering.  If your drivers don’t show that as an option in the advanced tab, modify the registry itself (at your own risk).

Search for 1000 PT in regedit, and modify any “VlanFiltering” keys to read 0 instead of 1.

2009
11.16

Here’s my experience installing SugarCRM on Bluehost.

1 – Uploaded contents of SugarCRM CE after downloading it from Sugar’s site.

2 – Browsed to root of directory.

3 – Ran install.

4 – Failure occurred:  The session.save_path setting in your php configuration file (php.ini) is not set or is set to a folder which did not exist. You might need to set the save_path setting in php.ini or verify that the folder sets in save_path exist.

5 – Attempted to modify the PHP.ini settings with .htaccess.  This just seemed to break PHP in general in that subdirectory, so I abandoned that effort (I’m sure it was something simple).

6 – Umcommented/Modified the PHP.ini session.save_path setting to be /home/USERNAME/tmp

7 – This STILL made no difference, so I commented out the entire part of the /install/installSystemCheck.php file that checks these kinds of things.. that allowed the install, and I’ve had no issues since.

8 – Setup the DB and DB user, and proceeded on to the next step.  Attempted to use default settings, however I received “The provided database username and/or password is invalid, and a connection to the database could not be established. Please enter a valid user name and password. 1045: Access denied for user”

9 – Changed the server name to localhost, and completed the install.

2009
11.16

Here’s a quick script for Powershell that can be used to add a secondary SMTP address in Microsoft Exchange 2007.

$username=Read-Host "Enter username to add email address too."
$secondsmtp=Read-Host "Enter a secondary email address"

$usermbx = Get-Mailbox $username
$usermbx.emailAddresses+=$secondsmtp
Set-Mailbox $usermbx -emailAddresses $usermbx.emailAddresses

2009
11.16

UPDATE: Check my next post for further info on this, and the issues it has with IE.

There are many methods for setting up IIS to redirect users to the correct site.  If a user visits http://email.contoso.com, they need to end up at https://email.contoso.com/owa.  If a user visits https://email.contoso.com, they need to end up at the same place.  This is the easiest way I could find to accomplish both tasks:

Step 1 – Force IIS to use HTTPS

Step 2 – Setup the home directory to be a redirection to a “directory below this one” and fill in /owa (use /exchange for 2003)

Step 3 – Setup a custom error page for 403.4 errors with the following code:

<html>
<head>
<META HTTP-EQUIV="Refresh"
CONTENT="0; URL=https://email.contoso.com/exchange">
</head>

Step 4 – iisreset

All set.  Leave comments with any questions or comments!