This is classic! Obama high-centered.
Obama's Car Gets Stuck At US Embassy - Watch more Funny Videos
During his visit to Ireland, Obama's car got stuck at the US Embassy's gate. Or as Fox News reported, "Oh God, This Guy Has Embarrassed America, AGAIN!"
Loading
Monday, May 23, 2011
Friday, April 22, 2011
Error Adding Windows 2008 R2 to Existing 2003 Active Directory
Tonight I'm trying to promote a spanking new Windows 2008 R2 server as a domain controller in an existing Windows 2003 AD. When I ran dcpromo on the new server I was presented with the following message from the Active Directory Domain Services Installation Wizard, "To install a domain controller into this Active Directory forest, you must first prepare the forest using "adprep /forestprep". The Adprep utility is available on the Windows Server 2008 R2 installation media in the \support\adprep folder."
I promptly opened and Command Prompt on the R2 server, navigated to the \support\adprep folder and ran adprep /forestprep. No joy! Now I got the message:
I promptly opened and Command Prompt on the R2 server, navigated to the \support\adprep folder and ran adprep /forestprep. No joy! Now I got the message:
Adprep cannot run on this platform because it is not an Active Directory Domain Controller.So, I went to one of my 2003 domain controllers and ran adprep /forestprep. Another problem!
[Status/Consequence]
Adprep stopped without making any changes.
[User Action]
Run Adprep on a Active Directory Domain Controller.
The image file C:\support\adprep\adprep.exe is valid, but is for a machine type other than the current machine.
It took a few minutes but I finally figured out I need to run adprep32 /forestprep since my 2003 server is 32 bit. Ah, hah! Of course, there's this little message:
Just a little bit more....
From the same 2003 server you'll have to run adprep32 /domainprep as well.
Now that adprep(32) /forestprep and adprep(32) /domainprep were successfull I can promote my 2008 R2 server to DC.
ADPREP WARNING:
Before running adprep, all Windows 2000 Active Directory Domain Controllers in the forest should be upgraded to Windows 2000 Service Pack 4 (SP4) or later.
[User Action]
If ALL your existing Windows 2000 Active Directory Domain Controllers meet this requirement, type C and then press ENTER to continue. Otherwise, type any other key and press ENTER to quit.
Just a little bit more....
From the same 2003 server you'll have to run adprep32 /domainprep as well.
Now that adprep(32) /forestprep and adprep(32) /domainprep were successfull I can promote my 2008 R2 server to DC.
Wednesday, March 16, 2011
How to Unlock Secure PDFs
Tonight I needed to print a couple pages of a service manual that was in a secure PDF. So I did a little googling and found a few ways to do this, however most were commercial products costing $40 or so. Then I found FreeMyPDF.com, a FREE site that will "unlock" a PDF so you can print it. Give it a try - then send them a couple bucks for this great tool.
Tuesday, February 15, 2011
Truncate (or Purge) Transaction Log in SQL 2008
Over the weekend one of our critical servers ran out of disk space on the volume which contains the transaction logs & all hell broke loose. Our DBA was at a wedding and couldn't be reached so it was up to me to get things working ASAP. I've truncated logs before in SQL 2005 and SQL 2000 (I've even written about it on this blog) with the following:
BACKUP LOG <DataBase_Name>However, our dear friends at Microsoft have removed TRUNCATEONLY from SQL 2008. Searching the 'net I found a few fragmented suggestions. But the one that was the bomb and corrected things for me right away was this great post by Otto R. Radke. There is only one item that has to be customized (highlighted) with the DB name and voila, it fixed by problem by truncating my huge transaction log. Thanks Otto!
WITH TRUNCATE_ONLY
GO
DBCC SHRINKFILE (2,1, TRUNCATEONLY)
GO
------------------------------------------------------------------------------
-- Otto R. Radke - http://ottoradke.com
-- Info: T-SQL script to shrink a database's transaction log. Just set the
-- database name below and run the script and it will shrink the
-- transaction log.
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- Update the line below with the name of the database who's transaction
-- log you want to shrink.
------------------------------------------------------------------------------
USE <YourDatabaseName>
------------------------------------------------------------------------------
-- Don't change anything below this line.
------------------------------------------------------------------------------
GO
-- Declare variables
DECLARE @SqlStatement as nvarchar(max)
DECLARE @LogFileLogicalName as sysname
-- Alter the database to simple recovery
SET @SqlStatement = 'ALTER DATABASE ' + DB_NAME() + ' SET RECOVERY SIMPLE'
EXEC ( @SqlStatement )
-- Make sure it has been altered
SELECT [name], [recovery_model_desc] FROM sys.databases WHERE [name] = DB_NAME()
-- Set the log file name variable
SELECT @LogFileLogicalName = [Name] FROM sys.database_files WHERE type = 1
-- Shrink the logfile
DBCC Shrinkfile(@LogFileLogicalName, 1)
-- Alter the database back to FULL
SET @SqlStatement = 'ALTER DATABASE ' + DB_NAME() + ' SET RECOVERY FULL'
EXEC ( @SqlStatement )
-- Make sure it has been changed back to full
SET @SqlStatement = 'SELECT [name], [recovery_model_desc] FROM ' + DB_NAME() + '.sys.databases WHERE [name] = ''' + DB_NAME() + ''''
EXEC ( @SqlStatement )
------------------------------------------------------------------------------
Windows 7 RUNDLL32 Shortcuts
Here is a good list of RUNDLL32 shortcuts / commands that can be used in Windows 7 and Windows 2008 (most also work in Vista and Windows 2003).
Add/Remove Programs
Add/Remove Programs
RunDll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,0Content Advisor
RunDll32.exe msrating.dll,RatingSetupUIControl Panel
RunDll32.exe shell32.dll,Control_RunDLLDate and Time Properties
RunDll32.exe shell32.dll,Control_RunDLL timedate.cplDevice Manager
RunDll32.exe devmgr.dll DeviceManager_ExecuteFolder Options – Opens to General Tab
RunDll32.exe shell32.dll,Options_RunDLL 0Forgotten Password Wizard (requires removable disk)
RunDll32.exe keymgr.dll,PRShowSaveWizardExWHibernate
RunDll32.exe powrprof.dll,SetSuspendStateKeyboard Properties
RunDll32.exe shell32.dll,Control_RunDLL main.cpl @1Lock Screen
RunDll32.exe user32.dll,LockWorkStationMouse Properties
RunDll32.exe shell32.dll,Control_RunDLL main.cpl @0Map Network Drive
RunDll32.exe shell32.dll,SHHelpShortcuts_RunDLL ConnectNetwork Connections
RunDll32.exe shell32.dll,Control_RunDLL ncpa.cplPower Options
RunDll32.exe Shell32.dll,Control_RunDLL powercfg.cplRegional Settings
RunDll32.exe shell32.dll,Control_RunDLL intl.cpl,,3Stored Usernames and Passwords
RunDll32.exe keymgr.dll,KRShowKeyMgrSystem Properties: Advanced
RunDll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,4Taskbar Properties
RunDll32.exe shell32.dll,Options_RunDLL 1User Accounts
RunDll32.exe shell32.dll,Control_RunDLL nusrmgr.cplWindows Security Center (Windows 7 only)
RunDll32.exe shell32.dll,Control_RunDLL wscui.cplWindows – About
RunDll32.exe SHELL32.DLL,ShellAboutWUnplug/Eject Hardware
RunDll32.exe shell32.dll,Control_RunDLL hotplug.dllWindows Firewall
RunDll32.exe shell32.dll,Control_RunDLL firewall.cplWireless Network Setup
RunDll32.exe shell32.dll,Control_RunDLL NetSetup.cpl,@0,WNSW
List of Windows 7 Shell Commands
Windows 7, Windows 2008 (including R2) and Windows Vista shell commands. These can be executed from the "run" command, the "search programs and files" dialog or straight in the address field of Windows Explorer (not Internet Explorer).
shell:AddNewProgramsFolder
shell:Administrative Tools
shell:AppData
shell:AppUpdatesFolder
shell:CD Burning
shell:CSCFolder
shell:Cache
shell:ChangeRemoveProgramsFolder
shell:Common Administrative Tools
shell:Common AppData
shell:Common Desktop
shell:Common Documents
shell:CommonDownloads
shell:CommonMusic
shell:CommonPictures
shell:Common Programs
shell:Common Start Menu
shell:Common Startup
shell:Common Templates
shell:CommonVideo
shell:ConflictFolder
shell:ConnectionsFolder
shell:Contacts
shell:ControlPanelFolder
shell:Cookies
shell:CredentialManager
shell:CryptoKeys
shell:Default Gadgets
shell:Desktop
shell:Downloads
shell:DpapiKeys
shell:Favorites
shell:Fonts
shell:Gadgets
shell:GameTasks
shell:Games
shell:History
shell:InternetFolder
shell:Links
shell:Local AppData
shell:LocalAppDataLow
shell:LocalizedResourcesDir
shell:MAPIFolder
shell:MyComputerFolder
shell:My Music
shell:My Pictures
shell:My Video
shell:NetHood
shell:NetworkPlacesFolder
shell:OEM Links
shell:Original Images
shell:Personal
shell:PhotoAlbums
shell:Playlists
shell:PrintHood
shell:PrintersFolder
shell:Profile
shell:ProgramFiles
shell:ProgramFilesCommon
shell:ProgramFilesCommonX86
shell:ProgramFilesX86
shell:Programs
shell:Public
shell:PublicGameTasks
shell:Quick Launch
shell:Recent
shell:RecycleBinFolder
shell:ResourceDir
shell:SampleMusic
shell:SamplePictures
shell:SamplePlaylists
shell:SampleVideos
shell:SavedGames
shell:SearchHomeFolder
shell:Searches
shell:SendTo
shell:Start Menu
shell:Startup
shell:SyncCenterFolder
shell:SyncResultsFolder
shell:SyncSetupFolder
shell:System
shell:SystemCertificates
shell:SystemX86
shell:Templates
shell:TreePropertiesFolder
shell:UserProfiles
shell:UsersFilesFolder
shell:Windows
shell:AddNewProgramsFolder
shell:Administrative Tools
shell:AppData
shell:AppUpdatesFolder
shell:CD Burning
shell:CSCFolder
shell:Cache
shell:ChangeRemoveProgramsFolder
shell:Common Administrative Tools
shell:Common AppData
shell:Common Desktop
shell:Common Documents
shell:CommonDownloads
shell:CommonMusic
shell:CommonPictures
shell:Common Programs
shell:Common Start Menu
shell:Common Startup
shell:Common Templates
shell:CommonVideo
shell:ConflictFolder
shell:ConnectionsFolder
shell:Contacts
shell:ControlPanelFolder
shell:Cookies
shell:CredentialManager
shell:CryptoKeys
shell:Default Gadgets
shell:Desktop
shell:Downloads
shell:DpapiKeys
shell:Favorites
shell:Fonts
shell:Gadgets
shell:GameTasks
shell:Games
shell:History
shell:InternetFolder
shell:Links
shell:Local AppData
shell:LocalAppDataLow
shell:LocalizedResourcesDir
shell:MAPIFolder
shell:MyComputerFolder
shell:My Music
shell:My Pictures
shell:My Video
shell:NetHood
shell:NetworkPlacesFolder
shell:OEM Links
shell:Original Images
shell:Personal
shell:PhotoAlbums
shell:Playlists
shell:PrintHood
shell:PrintersFolder
shell:Profile
shell:ProgramFiles
shell:ProgramFilesCommon
shell:ProgramFilesCommonX86
shell:ProgramFilesX86
shell:Programs
shell:Public
shell:PublicGameTasks
shell:Quick Launch
shell:Recent
shell:RecycleBinFolder
shell:ResourceDir
shell:SampleMusic
shell:SamplePictures
shell:SamplePlaylists
shell:SampleVideos
shell:SavedGames
shell:SearchHomeFolder
shell:Searches
shell:SendTo
shell:Start Menu
shell:Startup
shell:SyncCenterFolder
shell:SyncResultsFolder
shell:SyncSetupFolder
shell:System
shell:SystemCertificates
shell:SystemX86
shell:Templates
shell:TreePropertiesFolder
shell:UserProfiles
shell:UsersFilesFolder
shell:Windows
Monday, February 7, 2011
Bon Jovi Live in Concert
Watch live streaming video of Bon Jovi concert in State College, PA this Wednesday night at 8:30 PM EST, right here! FREE.
Friday, February 4, 2011
Smart Phones Directly Affect Bathroom Habits
With the proliferation of smartphones over the past few years time spent in the, ah, rest room has greatly increased. My wife and kids don't understand this but I'm sure all the men will relate. . .
Tuesday, January 25, 2011
Amazon Simple Email Service on Windows - How To
Today Amazon announced AWS Simple Email Service (SES) beta. SES is a great addition to Amazon Web Services, with it an organization can send marketing, transactional, subscription or system notification messages without have to manage their own messaging infrastructure. And just like all other AWS services it's pay-as-you-go - even free in some instances.
Soon as I received the announcement from Amazon I immediately set out to give it a try. Since I normally use Windows that's what I used for this. I ran into a couple of minor problems but was easily able to resolve them and now I'm sending email through SES like a mad man. . .
Sign-up for SES. If you already have an AWS account you're one step closer, if not you'll have to start there.
SES uses Perl scripts, therefore you must have Perl installed on your Windows machine. I installed ActivePerl Community Edition. Soon as that was done I ran the first SES script to get an email address verified but ran into my first problem - c:\perl\bin didn't get added to my path by the installation (for some reason it added c:\perl\site\bin) so I had to do that manually (if you don't know how to do this you probably shouldn't be here anyway. . . )
Amazon Simple Email Service Scripts
Download the SES scripts and save to a useful location - I used d:\aws\ses. This download includes the following SES scripts:
After tooling around the web for a few minutes I realized I needed to manually install XML-LibXML. This was easily done by opening the Perl Package Manager off the Start menu. In there:
Credentials File for SES Commands
All of the SES scripts or commands require authentication to AWS, which makes sense. You can save your credentials (both AWSAccessKeyId and AWSSecretKey) to a file, creds.txt and pass that to each script with the -k <filename> command.
Example credentials file:
Verify Email Address for SES
In order to send any email you must add & verify at least one email address to which you have access. The verification is a two-step process. First run the command: ses-verify-email-address.pl -k creds.txt -v test@powercram.com. Amazon will send an email to that address with a link to click to finalize verification.
NOTE: Until you are granted production access to Amazon Simple Email Service you can only send to verified addresses. Click to Request for Production Access to Simple Email Service. They say it may take up to 24 hours, but my access request was granted in about 30 minutes - now I can send to any address!
View List of Verified SES Addresses
By running the command ses-verify-email-address.pl -k creds.txt -l you are supposed to be able to view a list of verified addresses, however when I run this nothing is returned. I did discover though that using the --verbose switch, ses-verify-email-address.pl -k creds.txt -l --verbose, I am able to view a list of verified addresses:
<listverifiedemailaddressesresponse xmlns="http://ses.amazonaws.com/doc/2010-12</p><p>01/">
</listverifiedemailaddressesresponse>
<listverifiedemailaddressesresult></listverifiedemailaddressesresult>
<verifiedemailaddresses></verifiedemailaddresses>
<member>test@powercram.com</member>
<responsemetadata></responsemetadata>
Send Email With SES
Finally we are ready to send email using the command ses-send-email.pl -k creds.txt -s "Test One" -f test@powercram.com test@powercram.com. Press Enter then you can type the body of your message. When that's done press CTRL+Z, then Enter. It will hesitate for a second or two while your credentials, etc. are verified and the message is queued. Finally, check your email.
Summary
Amazon Simple Email Service looks to be a very useful tool and is a great addition to Amazon Web Services. In just a few minutes you can be sending email through SES, and it can be adapted for myriad purposes. Get started today and start emailing (useful messages - NO SPAM or other crap!).
Additional Info
Soon as I received the announcement from Amazon I immediately set out to give it a try. Since I normally use Windows that's what I used for this. I ran into a couple of minor problems but was easily able to resolve them and now I'm sending email through SES like a mad man. . .
Summary - Quick Steps
If you're anxious to get started and don't want any fluff here you go. For everyone else read below.
If you're anxious to get started and don't want any fluff here you go. For everyone else read below.
- Sign-up for SES
- Install Perl
- Install XML-LibXML via Perl Package Manager (instructions below)
- Download AWS SES scripts
- Setup "credentials" file (see below for details)
- Get verified: ses-verify-email-address.pl -k creds.txt -v test@powercram.com
- Send email: ses-send-email.pl -k creds.txt -s "Test One" -f test@powercram.com test@powercram.com
Sign-up for SES. If you already have an AWS account you're one step closer, if not you'll have to start there.
SES uses Perl scripts, therefore you must have Perl installed on your Windows machine. I installed ActivePerl Community Edition. Soon as that was done I ran the first SES script to get an email address verified but ran into my first problem - c:\perl\bin didn't get added to my path by the installation (for some reason it added c:\perl\site\bin) so I had to do that manually (if you don't know how to do this you probably shouldn't be here anyway. . . )
Amazon Simple Email Service Scripts
Download the SES scripts and save to a useful location - I used d:\aws\ses. This download includes the following SES scripts:
- ses-get-stats.pl - retrieves statistics about Amazon SES account usage
- ses-send-email.pl - send email using Amazon SES
- ses-verify-email-addresses.pl - verify email addresses to be used with Amazon SES
After tooling around the web for a few minutes I realized I needed to manually install XML-LibXML. This was easily done by opening the Perl Package Manager off the Start menu. In there:
- Click the "View All Packages" button or press Ctrl+1
- Type libxml in the search box
- Right-click on XML-LibXML and select Install . . .
- Click File, Run Marked Actions or press Ctrl+Enter
Credentials File for SES Commands
All of the SES scripts or commands require authentication to AWS, which makes sense. You can save your credentials (both AWSAccessKeyId and AWSSecretKey) to a file, creds.txt and pass that to each script with the -k <filename> command.
Example credentials file:
AWSAccessKeyId=022QF06E7MXBSH9DHM02
AWSSecretKey=kWcrlUX5JEDGM/LtmEENI/aVmYvHNif5zB+d9+ct
Verify Email Address for SES
In order to send any email you must add & verify at least one email address to which you have access. The verification is a two-step process. First run the command: ses-verify-email-address.pl -k creds.txt -v test@powercram.com. Amazon will send an email to that address with a link to click to finalize verification.
NOTE: Until you are granted production access to Amazon Simple Email Service you can only send to verified addresses. Click to Request for Production Access to Simple Email Service. They say it may take up to 24 hours, but my access request was granted in about 30 minutes - now I can send to any address!
View List of Verified SES Addresses
By running the command ses-verify-email-address.pl -k creds.txt -l you are supposed to be able to view a list of verified addresses, however when I run this nothing is returned. I did discover though that using the --verbose switch, ses-verify-email-address.pl -k creds.txt -l --verbose, I am able to view a list of verified addresses:
<listverifiedemailaddressesresponse xmlns="http://ses.amazonaws.com/doc/2010-12</p><p>01/">
</listverifiedemailaddressesresponse>
<listverifiedemailaddressesresult></listverifiedemailaddressesresult>
<verifiedemailaddresses></verifiedemailaddresses>
<member>test@powercram.com</member>
<responsemetadata></responsemetadata>
Send Email With SES
Finally we are ready to send email using the command ses-send-email.pl -k creds.txt -s "Test One" -f test@powercram.com test@powercram.com. Press Enter then you can type the body of your message. When that's done press CTRL+Z, then Enter. It will hesitate for a second or two while your credentials, etc. are verified and the message is queued. Finally, check your email.
Summary
Amazon Simple Email Service looks to be a very useful tool and is a great addition to Amazon Web Services. In just a few minutes you can be sending email through SES, and it can be adapted for myriad purposes. Get started today and start emailing (useful messages - NO SPAM or other crap!).
Additional Info
- SES Getting Started Guide
- Amazon Simple Email Service Developer Resources, which includes details about the service and info for each command.
See Also
Subscribe to:
Posts (Atom)