Tuesday, December 4, 2012

Raspberry Pi

So my Raspberry Pi arrived today. If you dont know what it is, its a tiny computer the size of a credit card. You connect it to a TV, add an SDHC card, mouse and keyboard. To find out more go to the Raspberry Pi site.

The cool thing about this is that you can add components to it and you have so many possibilities. While tiny, it has a lot of potential. I will post more more as I fiddle with it.




Monday, October 29, 2012

Incorrect Time on Windows XP SP3 Computers

We had an odd thing happen this morning with some Windows XP SP3 workstations. Even though we sync the workstations time with the DC's, they were still off by an hour.

My first assumption was that they didn't have the DST update (before knowing that these were SP3 machines)

Once we saw that they did in fact have SP3 installed I was even more confused as I thought the new DST times were included in SP3. After some digging it looks like you need an update to make sure that the DST works.

You can find the updates HERE.

Once we installed this cumulative update the time was set to normal.

Keep in mind that if you have Outlook and/or Exchange you need to run another update as well. This does not impact Exchange or Outlook 2010.

Tuesday, August 7, 2012

Monday, August 6, 2012

Monday, July 30, 2012

Script to Copy Specific Folders From One Directory to Another

I had a need to copy specific folders from a folder share to another folder share. I found a script that I had to tweak a little but it will take the contents of a txt file and copy only the folders that you put in it using Robocopy.

For those of you unfamiliar with robocopy, its a copy utility on Windows 7 that has many, many options to copy files and folders from local drives, mapped drives and even UNC paths to a destination path. If you are an old DOS guy like me, just think of xcopy on steroids.

Here is the code:


@echo off
for /F "tokens=*" %%A in (dirlist.txt) do (
  robocopy Y:\%%~A\ Y:\%%~A\ /E /R:1 /W:1 /COPY:DATS
)

Save this to a bat file (ie, copy2dir.bat) and run the bat file. Lets go over the script:

dirlist.txt is where you will put the folder names (new line for each one)

The script will take each line in the txt file, look for a corresponding folder and then copy it to the destination folder. In my case I mapped a shared drive to my Y: drive letter and used that. You could use a UNC path or local drive letter as well.

Robocopy has MANY options. Do a robocopy /? at the command prompt and you will get a listing. The options I chose were:

/E - This copies sub directories, even empty ones.
/R:1 - Retry files only 1 time. the default is literally 1 million times!
/W:1 - Wait only 1 second between tries. Default is 30 seconds
/COPY:DATS - this copies Data, Attributes, Timestamps and Security (NTFS ACLs)

You have many more options to chose from including logging.

Hopefully you may find a use for this simple script.

Friday, July 13, 2012

Granting access to admin$

Recently Microsoft has been taking security serious (well, they are at least trying). For those of you who have installed Exchange 2010 you know what I'm talking about. Previously when installing Windows (or Exchange) everything was wide open. Pretty much an "enable everything, close it later if you don't want it" type of mentality. Lately they have been closing or disabling services, not installing all components unless needed and turning on all software firewalls.

Recently I was installing software from a server that needed to connect to the admin$ share on a computer and install components. So i did my usual:

net share admin$ /users:5


I was able to connect but couldn't make a directory. After looking at the help I needed to add the admin$ share using this command:

net share admin$ /users:5 /grant:username,full


username being either a local or domain username. If using a domain username make sure to put the domain name followed by a backslash and then the username (ie, contesto\bsmith)

Wednesday, June 27, 2012

Thursday, May 24, 2012

File is larger than the maximum size supported by datastore '

I got this error when trying to take a snapshot of a VM with a 1TB Thin Provisioned HDD:



Create virtual machine snapshot VM NAME


File <unspecified filename> is larger than the maximum size supported by datastore '<unspecified datastore>


The used space was only around 9GB.

The problem here is VMFS block size. When I formatted the VMFS LUN I did it using 4MB block size (seeing as how my largest VMDK file would be 1TB).

However (and I should have known this), the file size was just over 1TB (1,073,742,000.00KB). Had I created it with 900GB I probably would have been ok.

The solution? I moved the VM to a VMFS datastore that had 8MB block size (this allows for 2TB files).

Depending on who you talk to people will say that its a waste of space. I dont think it is. Yes, you do have several files attached to a VM that take only 20-30k (but because of the VMFS block size are actually taking 8MB for each file) but in the long run if you need a large VMDK file you need to do this. You lose more space when creating the LUN (my 1.5TB LUN is actually 1.36TB once I format) than you would by selecting a bigger block size.

For those of you not familiar with block size, you have a few options:


• 1MB block size – 256GB maximum file size
• 2MB block size – 512GB maximum file size
• 4MB block size – 1024GB maximum file size
• 8MB block size – 2048GB maximum file size

The block size determines the maximum size for any one file on the VMFS datastore. So, if you think you will need a VM with a hard drive size of 256GB you will need to have a 1MB block size, 512GB you will need 2MB, so on and so forth. Do not get this confused with the files that are INSIDE the VM (ie, windows OS files, etc). The block size is for the VMDK file and the files associated with the VM (config files, snapshot files, etc.)

Wednesday, May 16, 2012

The consistency check failed for the component Microsoft Exchange Server\Microsoft Information Store\

I was getting the above error when trying to backup our Exchange environment. I was using the Windows 2008 R2 backup utility.

It was working previously as I was backing up while migrating users from our 2003 Server. We moved several people one day and noticed that we only had around 6GB on our partition that held our log files. We started the backup utility and after several minutes we got this error. Even though the backup would continue we would get a message saying that we could not restore from this backup. We also noticed that the logs were not getting removed.

After much searching I found a post on the Microsoft Technet site that mentioned enabling circular logging, dismount and then remount the databases and then removing circular logging with another dismount and remount of the databases. This pretty much just deletes the logs for each database.

While this isn't the most ideal way (since now you can't replay your logs if anything happened between this step and a full backup), it worked and we were able to do a full backup.

We had to use the Windows backup utility until we got our third party backup software working properly.


Saturday, February 25, 2012

Exchange 2010 and Outlook Issues

After installing Exchange 2010 I was getting errors in the event viewer and in Outlook I couldn't view the GAL and every couple minutes I would get a prompt that said Outlook was trying to get retrieve data from exchangeserver.domain.com.

Another issue that would happen is when removing the outlook profile and re creating, it would not find the user.

After searching and looking at posts the fix was simple.

Reboot the Domain Controllers and then Exchange 2010.

Wednesday, February 22, 2012

Exchange 2010 Event ID 1002

I'm in the middle of migrating to Exchange 2010 from Exchange 2003. During installation, the mailbox role failed with this error:

Error:
The following error was generated when "$error.Clear();
              $InstallerScriptFileName = 'Scripts\ManageScheduledTask.ps1'
              $OneCopyScriptFileName = 'Scripts\CheckDatabaseRedundancy.ps1'
              $PsInstallerScriptPath = Join-Path $RoleInstallPath $InstallerScriptFileName
              $PsOneCopyScriptPath = Join-Path $RoleInstallPath $OneCopyScriptFileName
            
                  & $PsInstallerScriptPath -RunFromSetup -Install -DeleteExisting -ServerName $RoleNetBIOSName -TaskName "Database One Copy Alert" -PsScriptPath $PsOneCopyScriptPath -PsScriptArgs "-MonitoringContext -ShowDetailedErrors -ErrorAction:Continue" -Verbose
        " was run: "[ManageScheduledTask.ps1] Could not find script: '\\SERVERNAME\C$\Program Files\Microsoft\Exchange Server\V14\Scripts\CheckDatabaseRedundancy.ps1'.".

[ManageScheduledTask.ps1] Could not find script: '\\SERVERNAME\C$\Program Files\Microsoft\Exchange Server\V14\Scripts\CheckDatabaseRedundancy.ps1'.
Click here for help... http://technet.microsoft.com/en-US/library/ms.exch.err.default(EXCHG.141).aspx?v=14.1.218.11&e=ms.exch.err.Ex88D115&l=0&cl=cp

Elapsed Time: 00:00:01


Finalizing Setup
Cancelled


When looking at the error, the install is trying to go through the network and access the scripts from C$. This is strange since I ran the install from the local hard drive.

After a lot of searching it seems to me as though Microsoft put a lot of protection on the C$ share. No matter what I did I was unable to connect to the C$ share.

What I ended up doing was installing Exchange 2010 to my D drive where the D$ share worked with no problem.

While this is not the best fix (what happens if you don't have an extra partition?), I was able to get it installed and continue with my migration.

If anyone has come across this before or knows the fix to allow C$ to be accessed through the network, please post.

****UPDATE JUNE 26th 2012****
I found out how to make C$ accessible from the network and from the computer. Open your network connections and go the to the TCP/IP Settings (IPv4). Click Properties and then click Advanced. Click the WINS Tab and then select the radio button for "Enable NetBIOS over TCP/IP."

This will require a reboot.

User unable to login to RDP Farm after you re-enable them?

We had a strange issue. We had a user leave and since we knew when she was leaving i set the account to expire at a certain date. A couple d...