Blog


Get Patch and Service Pack Information via PowerShell

Posted by on 7:59 am in Technology | 0 comments

Both examples below assume you have a text file with a list of your hostnames to query against:   Get Service Pack Info: $c= get-content “C:servers.txt” foreach ($i in $c) { get-wmiobject win32_operatingsystem -computer $i | select ` csname,caption,servicepackmajorversion }   Get Patch Info: $c= get-content “C:servers.txt” foreach ($i in $c) { Get-WmiObject -Computer $i -Class Win32_QuickFixEngineering -filter “HotFixID=’KB2742599′”...

read more

Microsoft SCOM (System Center Operations Manager) 2012

Posted by on 12:27 pm in SysAdmin, Technology, Windows | 0 comments

Have you tried viewing “Show Connected Alerts” within Microsoft Scom Operations Manager 2012 yet no alerts show? Perhaps older alerts persist? Have no fear I may have an answer for you!  Clear your cache 🙂 1. Close System Center Operations Manager 2. Run the following command from an elevated administrator command prompt: “C:Program FilesSystem Center 2012Operations ManagerConsoleMicrosoft.EnterpriseManagement.Monitoring.Console.exe” /clearcache 3. The command above will automatically open System Center Operations Manager.  It could take a few moments depending on your computers speed. I hope this helps!...

read more

MSSQL I/O TroubleShooting

Posted by on 10:36 am in MSSQL, SysAdmin, Technology, Windows | 0 comments

Troubleshooting SQL I/O   Quick Checks:   Check disk fragmentation defrag x: -a -v Check perfmon counters typeperf “PhysicalDisk(*)Avg. Disk Queue Length” -sc 10 Values should be close to 0 High values reflect high I/O demand or poor disk performance typeperf “SQLServer:buffer ManagerPage life expectancy” -sc 10 Values should be high, and getting progressively higher. Low values reflect memory shortages Check disk block size fsutil fsinfo ntfsinfo x: Bytes per cluster should be 65536 Check for running SQL / Managed Backup jobs Concurrent jobs could cause high I/O Check file locations Ensure Data, Logs, and TempDB are on different physical disks Check tempdb configuration Are there an appropriate amount of tempdb data files   Disk Issues   Check for errors with SAN using Power Path Check the file system chkdsk x: Check RAID level (5/10)   SQL Checks   Run the query “sp_who2” and look for processes with high IO values Run the Performance – Top Queries by Average / Total IO reports in SQL Management Studio Check SQL fragmentation (this may increase I/O and put some stress on the server) using the following query: If you have full administrative rights run the following T-SQL: DECLARE @db_id INT; DECLARE @object_id INT; SET @db_id = db_id(N’Database_Name’); SET @object_id = OBJECT_ID(N’Table_Name’); BEGIN SELECT * FROM sys.dm_db_index_physical_stats(@db_Id,@object_ID, NULL, NULL , ‘DETAILED’) AS IPS; END GO If you are in a shared environment run the following T-SQL: SELECT i.name,avg_fragmentation_in_percent FROM sys.dm_db_index_physical_stats(db_id(),null,null,null,null) S inner join sys.indexes I ON s.object_id=I.object_id and s.index_id=i.index_id WHERE s.object_id=object_id(N’YourTableName’) –Remove this if you want to see info for all tables If you need more details you’ll have to query against sys.dm_db_index_physical_stats like the query in step 4 does.  You will need full administrative access...

read more

Change your Windows Host File

Posted by on 7:35 pm in SysAdmin, Technology, Windows | 0 comments

1. Navigate to: C:WindowsSystem32Driversetc 2. Right click hosts file and click edit to modify with notepad 3. Add your entry.   Example of what to add: 127.0.0.1       www.domain.com   This means any request for www.domain.com on the box whose host entry you modified would be direct to the localloop back IP instead of the actual IP DNS lists.

read more

Common SysAdmin Tasks

Posted by on 10:26 am in SysAdmin, Technology, Windows | 0 comments

Quickly search event logs using powershell: get-eventlog application -newest 10 -message “*www.testsite.org*” | format-list * or get-eventlog system -newest 10 -message “*www.testsite.org*” | format-list *   MSSQL: Set Single User – alter database dbName set single_user with rollback immediate Set Multi User – alter database dbName set multi_user with rollback immediate Free system cache – DBCC FREESYSTEMCACHE (‘ALL’)   Application Pools 1. Recycle all application pools (replace recycle with start/stop to start/stop all apppools) appcmd list apppool /xml | appcmd recycle apppool /in 2. Stop application pools with word “cheap” in it appcmd list apppool /name:”$=*cheap*” /xml | appcmd stop apppool /in 3. Set property enable32BitAppOnWin64 to true for all apppools (Filter apppools as in 2 if needed) appcmd list apppool /xml | appcmd set apppool /in /enable32BitAppOnWin64:true 4. Start apppools which are stopped appcmd list apppool /state:Stopped /xml | appcmd start apppool /in 5. Recycle application pools which are used in some applications appcmd list app /xml | appcmd list apppool /in /xml | appcmd recycle apppool /in appcmd list app /xml | appcmd recycle apppool /in (This might recycle one apppool multiple times) 6. Recycle apppools serving website “Default Web Site” appcmd list site “Default Web Site” /xml | appcmd list app /in /xml | appcmd list apppool /in /xml | appcmd recycle apppool /in appcmd list app /site.name:”Default Web Site” /xml | appcmd list apppool /in /xml | appcmd recycle apppool /in   Sites 7. Start all the sites (Replace start with stop to stop all sites) appcmd list site /xml | appcmd start site /in 8. Start the sites which are stopped appcmd list site /state:stopped /xml | appcmd start site /in 9. Set serverAutoStart to false for all sites appcmd list site /xml | appcmd set site /serverAutoStart:false /in 10. Keep sites config data and restore later appcmd list site /config /xml > sites.xml appcmd add sites /in < sites.xml   Applications and Vdirs 11. Delete all apps which are using a particular apppool appcmd list apppool DefaultAppPool /xml | appcmd list app /in /xml | appcmd delete app /in 12. Move all applications in a site to NewAppPool apppool appcmd list app /site.name:”Default Web Site” /xml | appcmd set app /in /applicationPool:NewAppPool 13. List all sites with “/test” app appcmd list app /path:”/test” /xml | appcmd list site /in 14. List apps created by user10 (assuming all his apps under a folder whose name contains user10) appcmd list vdir /physicalPath:”$=*user10*” /xml | appcmd list app /in 15. List sites which read from C:inetputwwwroot appcmd list vdir /physicalPath:C:inetputwwwroot /xml | appcmd list app /xml /in | appcmd list site /in 16. List the vdirs of sites which are stopped appcmd list site /state:stopped /xml | appcmd list app /xml /in | appcmd list vdir /in   Worker processes and Requests 17. Stop apppools of requests running for more than 60 seconds appcmd list request /xml /time:”$>60000″ | appcmd list apppool /in /xml | appcmd stop apppool /in 18. List apps served by wp 3600 appcmd list wp 3600 /xml | appcmd list apppool /xml /in | appcmd list app /in   Modules 19. Disable all managed modules appcmd list module /preCondition:managedHandler /xml | appcmd delete module /in 20. Uninstall all native modules appcmd list module /type:”” /xml | appcmd uninstall module /in 21. Unlock all module entries under system.webServer/modules (won’t work on vista) appcmd list module /xml | appcmd...

read more

Migrate Rackspace CloudServer In-Place Upgrade – Windows 2008 R2 to Windows Server 2012

Posted by on 4:51 pm in Rackspace, SysAdmin, Technology, Windows | 0 comments

So I recently upgraded my Rackspace CloudServers infrastructure from Windows 2008 R2 to Windows Server 2012. It was fun and I thought I’d share my experiences to help you should you choose to do an in-place upgrade. Rackspace does not offer an in-place upgrade option. Because of this you have essentially one choice to manually do an in-place upgrade. Which is downloading the Windows Server 2012 ISO from Microsoft and mounting or extracting that ISO in order to start the upgrade process. Before doing this though you will need to make sure you download both the Rackspace Agent software as well as the Citrix Windows 8 Drivers. Check out the following steps: 1. Before upgrading you should backup your CloudServer data. In addition to this it would be wise to write down your network config and routes along with the mac addresses to ensure you put the right config on the right adapter once upgraded to Windows Server 2012. This is always best practice. 2. Download Windows Server 2012 ISO from Microsoft. 3. Download the Rackspace Agent – Download from here 4. Download the Citrix Agent/Networking driver  – Download from here 5. Download DotNet 4.0 Full Setup – Download from here 6. Download installagentservice.bat – Download File Here – Source Code Here 7. Download installupdateservice.bat – Download File Here – Source Code Here The files you downloaded during steps 2-5 should be sitting on your 2008 R2 CloudServer. 8. Mount or extract your Windows Server 2012 ISO. 9. Run through the upgrade process. 10. Once upgrade is complete you will need to console into your server from the Rackspace CloudServer control panel. 11. Run the installation of DotNet 4.0 Full Setup. 12. Run the Citrix Agent/Networking driver software. 13. Expand Rackspace agent “rackspace_agent.zip” at the following location: C:program files 14. Place the installagentservice.bat file at the following location: C:Program FilesRackspaceCloud ServersAgent 15. Place the installupdateservice.bat file at the following location: C:Program FilesRackspaceCloud ServersAgentUpdater 16. Go to Networking and Sharing Center and be sure to add back the appropriate network configuration on your network adapters along with the mac addresses. That’s it. If you made it this far you’ve upgraded successfully to Windows Server 2012. Should you have any questions or suggestions feel free to comment this blog or tweet me....

read more

iPhone iOS 6 Update – My Two Cents – Maps too

Posted by on 1:23 pm in Cell Phones, Technology | 0 comments

At approximately 12:05PM CST I began downloading the iOS6 update. The update took 20 mins to download and another 20 to prepare and close to 25 mins to install. I will update this post with my thoughts on this update momentarily. 🙂 So the update took a little over an hour which I think is a little extreme for a smart phone OS update. I came from an HTC Evo 3D and have familiar with the Andriod update process which does not take nearly as long. Needless to say the update was fairly painless just taking a fort knights journey!! [nggallery id=14] As you can see from the image gallery not a whole lot has changed from a UI perspective. Maps have changed quite a bit. It still has a Google Maps feel to you it although a little bit more polished from a UI standpoint. I have yet to test out the GPS and Turn by Turn direction functionality although if CNN’s review is any indication this may not be a good upgrade. So far all of my apps have successfully ported over and I have yet to experience any sort of weird quirks. I will update this article with any issues I may have with app...

read more

Common Connection Strings

Posted by on 10:10 am in Development | 1 comment

The following list contains connection strings for many popular program databases. If your program is not listed, contact the program’s manufacturer. NOTE:You will have to obtain these files referenced below by FTPing into your hosting account and into the application’s directories. For more information on this, see your application’s manufacturer’s Web site. WordPress Edit the wp-config.php file. You will need to update the following line with the name of the new database server. define(‘DB_HOST’, ‘youroldhostname’); Joomla Edit the configuration.php file. You will need to update the following line with the name of the new database server. var $host = ‘youroldhostname’; Simple Machine Forum Edit the Settings.php file. You will need to update the following line with the name of the new database server. $db_server = ‘youroldhostname’; DotNetNuke Edit the web.config file. You will need to update the following line with the name of the new database server. connectionString=”Server=youroldhostname;Database=DBName;uid=DBUser;pwd=DBPass;” Drupal Edit the sites/default/settings.php file. You will need to update the following line with the name of the new database server. $db_url = ‘mysqli://DBUser:DBPassword@youroldhostname/DBName’; Zen Cart Edit the includes/configure.php and admin/includes/configure.php files. You will need to update the following line with the name of the new database server. define(‘DB_SERVER’, ‘youroldhostname’); Gallery Edit the config.php file. You will need to update the following line with the name of the new database server. $storeConfig[‘hostname’] = ‘youroldhostname’; Coppermine Edit the include/config.inc.php file. You will need to update the following line with the name of the new database server. $CONFIG[‘dbserver’] = ‘youroldhostname’; OSCommerce Edit the includes/configure.php and admin/includes/configure.php files. You will need to update the following line with the name of the new database server. define(‘DB_SERVER’, ‘youroldhostname’); PhpBB Edit the config.php file. You will need to update the following line with the name of the new database server. $dbhost = ‘youroldhostname’; Vanilla Forum Edit the conf/database.php file. You will need to update the following line with the name of the new database server. $Configuration[‘DATABASE_HOST’] = ‘youroldhostname’; paFileDB Edit the includes/config.php file. You will need to update the following line with the name of the new database server. $dbServer = “youroldhostname”; Noah’s Classifieds Edit the app/config.php file. You will need to update the following line with the name of the new database server. $hostName=”youroldhostname”; OpenX Edit the var/yoursitename.com.conf.php file. You will need to update the following line with the name of the new database server. host=”youroldhostname” BlogEngine.NET Edit the web.config file. You will need to update the following line with the name of the new database server. <add name=”BlogEngine” connectionString=”Data Source=youroldhostname;User ID=DBUser;Password=DBPassword;persist security info=False;initial catalog=DBName;” providerName=”System.Data.SqlClient”/> Geeklog Edit the db-config.php file. You will need to update the following line with the name of the new database server. $_DB_host = ‘youroldhostname’; Lifetype Edit the config/config.properties.php file. You will need to update the following line with the name of the new database server. $config[‘db_host’] = ‘youroldhostname’; reBlog Edit the config.php file. You will need to update the following line with the name of the new database server. define(‘REF_DB_HOST’, “youroldhostname”); Serendipity Edit the serendipity_config_local.inc.php file. You will need to update the following line with the name of the new database server. $serendipity[‘dbHost’] = ‘youroldhostname’; Mantis Edit the config_inc.php file. You will need to update the following line with the name of the new database server. $g_hostname = “youroldhostname”; MediaWiki Edit the LocalSettings.php and config/LocalSettings.php files. You will need to...

read more

Rackspace CloudSites ASPXZipIt Utility

Posted by on 3:24 pm in Development, Rackspace, Windows Web Development | 0 comments

It’s my pleasure to announce the general availability of ASPXZipIt utility. This utility was specifically designed to assist Rackspace CloudSites customers with an easy backup solution for their IIS/MSSQL based web sites. However this will work in any medium trust and above environment assuming your file permissions are set correctly. Starting August 31st, 2012 all IIS sites will no longer have the ability to run PHP so the ZipIt utility provided through the Rackspace Cloud Knowledge Center will no longer work when IIS is the primary technology. This is where my utility comes into play! Requirements: Rackspace CloudSites Account with IIS enabled – (This will work in any medium trust and higher environment) Rackspace CloudFiles Account – Username, Api Access Key, and two containers named: “zipit-backups-files”, and “zipit-backups-databases” To download compiled version and install: Click Here To view the source please visit my github account: Click Here Currently there are some known issues which can be tracked via the issues section on GitHub. Feel free to watch my repo and contribute if you feel so inclined! The more the...

read more

Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list

Posted by on 11:10 am in SysAdmin, Technology, Windows | 0 comments

To fix this error simply run the following if using 64 bit: %windir%Microsoft.NETFramework64v4.0.30319aspnet_regiis.exe -i If using 32 bit run the following: %windir%Microsoft.NETFrameworkv4.0.21006aspnet_regiis.exe -i

read more