<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7102233641596873910</id><updated>2011-11-27T20:09:54.368-05:00</updated><category term='maintenance'/><category term='remote desktop'/><category term='vbscript'/><category term='wmi'/><category term='servers'/><category term='logfiles'/><category term='utilities'/><title type='text'>Effective I.T. Management Through Scripting</title><subtitle type='html'>Stay Seated!  
How to effectively manage I.T. for the Enterprise through scripting.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://effectiveit.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7102233641596873910/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://effectiveit.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Todd A. Scalzott</name><uri>http://www.blogger.com/profile/02778190081573506117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://3.bp.blogspot.com/-PrL6rI5Naeo/Tlixwmku8XI/AAAAAAAABOY/plBio49iPRQ/s220/IMG_0701-cropped.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7102233641596873910.post-5318985763952832558</id><published>2009-02-07T17:37:00.004-05:00</published><updated>2009-02-07T17:52:30.943-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='remote desktop'/><category scheme='http://www.blogger.com/atom/ns#' term='vbscript'/><category scheme='http://www.blogger.com/atom/ns#' term='wmi'/><category scheme='http://www.blogger.com/atom/ns#' term='servers'/><title type='text'>Enable Remote Desktop Access</title><content type='html'>A newly provisioned Windows server or desktop may not have had Remote Desktop enabled.  That can certainly make it more difficult to stay in your seat.&lt;br /&gt;&lt;br /&gt;The simple script below will enable Remote Desktop using WMI.  It takes effect in a few seconds.&lt;br /&gt;&lt;br /&gt;Supply a username and password if you don't have administrative rights natively.  Yes, this exposes the password.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;strComputer = "."&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;strUsername = ""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;strPassword = ""&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;If WScript.Arguments.Count &gt; 0 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   strComputer = WScript.Arguments(0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   If Left(strComputer, 2) = "\\" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      strComputer = Mid(strComputer, 3)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   WScript.Echo "Querying \\" &amp;amp; strComputer &amp;amp; "..." &amp;amp; vbCrLf&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;If WScript.Arguments.Count &gt; 1 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   strUserName = WScript.Arguments(1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;If WScript.Arguments.Count &gt; 2 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   strPassword = WScript.Arguments(2)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Set objLocator = CreateObject("WBEMScripting.SWBEMLocator")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Set objWMIService = objLocator.ConnectServer(strComputer, "root/cimv2", _&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                                             strUsername, strPassword)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Set colItems = objWMIService.ExecQuery("Select * from Win32_TerminalServiceSetting") &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;For Each objItem In colItems&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   WScript.Echo "AllowTSConnections: " &amp;amp; objItem.AllowTSConnections&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   If objItem.AllowTSConnections = 0 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      WScript.Echo "Enabling Terminal Services connections..."&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      objItem.SetAllowTSConnections(1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      WScript.Echo "Already enabled."&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   End If &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Next &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7102233641596873910-5318985763952832558?l=effectiveit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://effectiveit.blogspot.com/feeds/5318985763952832558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://effectiveit.blogspot.com/2009/02/enable-remote-desktop-access.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7102233641596873910/posts/default/5318985763952832558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7102233641596873910/posts/default/5318985763952832558'/><link rel='alternate' type='text/html' href='http://effectiveit.blogspot.com/2009/02/enable-remote-desktop-access.html' title='Enable Remote Desktop Access'/><author><name>Todd A. Scalzott</name><uri>http://www.blogger.com/profile/02778190081573506117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://3.bp.blogspot.com/-PrL6rI5Naeo/Tlixwmku8XI/AAAAAAAABOY/plBio49iPRQ/s220/IMG_0701-cropped.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7102233641596873910.post-8047939473078666052</id><published>2009-01-24T19:24:00.002-05:00</published><updated>2009-01-24T20:12:04.471-05:00</updated><title type='text'>Up or Down?</title><content type='html'>&lt;span style="font-family:verdana;"&gt;Here is a simple way to see if a computer is alive and well from a CMD script:&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="font-family: courier new;"&gt;SETLOCAL ENABLEEXTENSIONS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;FOR /F "skip=1 tokens=6" %%t IN ('ping -n 2 %1 ^|find /i "TTL"') DO SET targetstatus=%%t&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;IF "%targetstatus%"=="" GOTO down&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;REM Do Stuff and finish&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;GOTO :EOF&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;:down&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;REM Complain or do other stuff and finish&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;GOTO :EOF&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7102233641596873910-8047939473078666052?l=effectiveit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://effectiveit.blogspot.com/feeds/8047939473078666052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://effectiveit.blogspot.com/2009/01/up-or-down.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7102233641596873910/posts/default/8047939473078666052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7102233641596873910/posts/default/8047939473078666052'/><link rel='alternate' type='text/html' href='http://effectiveit.blogspot.com/2009/01/up-or-down.html' title='Up or Down?'/><author><name>Todd A. Scalzott</name><uri>http://www.blogger.com/profile/02778190081573506117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://3.bp.blogspot.com/-PrL6rI5Naeo/Tlixwmku8XI/AAAAAAAABOY/plBio49iPRQ/s220/IMG_0701-cropped.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7102233641596873910.post-245064861943718073</id><published>2009-01-18T12:46:00.003-05:00</published><updated>2009-01-18T13:12:27.986-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='maintenance'/><category scheme='http://www.blogger.com/atom/ns#' term='vbscript'/><category scheme='http://www.blogger.com/atom/ns#' term='logfiles'/><category scheme='http://www.blogger.com/atom/ns#' term='servers'/><title type='text'>Logfile Maintenance</title><content type='html'>&lt;span style="font-family: verdana;"&gt;Keep logfile sprawl on your servers in check with the below script.  A bit of a hack; it could likely use some cleanup.    Customize the aFolders array for a list of directories to recurse.  Customize sFilePattern as a regular expression to match the logfiles you see on your servers.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;The script accepts an argument for the number of days.  Any matching files that are older than this number of days are targets for deletion.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;As with all file deletion scripts, the potential for danger is high.   Use the 2nd argument of TEST to be sure of the intended results.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;I install the script as a scheduled task on our servers, wrapped in a CMD file.  It even updates itself at each run from Amazon AWS.   More on that later.&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;a href="http://docs.google.com/Doc?id=dfzpwj6_1gwkjm4zz"&gt;PurgeLogs.vbs.txt&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7102233641596873910-245064861943718073?l=effectiveit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://effectiveit.blogspot.com/feeds/245064861943718073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://effectiveit.blogspot.com/2009/01/logfile-maintenance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7102233641596873910/posts/default/245064861943718073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7102233641596873910/posts/default/245064861943718073'/><link rel='alternate' type='text/html' href='http://effectiveit.blogspot.com/2009/01/logfile-maintenance.html' title='Logfile Maintenance'/><author><name>Todd A. Scalzott</name><uri>http://www.blogger.com/profile/02778190081573506117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://3.bp.blogspot.com/-PrL6rI5Naeo/Tlixwmku8XI/AAAAAAAABOY/plBio49iPRQ/s220/IMG_0701-cropped.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7102233641596873910.post-1944395496553387860</id><published>2009-01-17T21:23:00.003-05:00</published><updated>2009-01-18T13:13:00.902-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='utilities'/><title type='text'>Utilities Worth Distributing</title><content type='html'>The smaller the footprint across all desktops, the better.   Every administrator has a toolbox that is reached into often.  Like most, I've grabbed many from Sysinternals, with psexec being toward the top of the list.&lt;br /&gt;&lt;br /&gt;But what bare essentials are worth distributing on all desktops?   For me, it's a short list:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.nirsoft.net/utils/nircmd.html"&gt;NirCmd&lt;/a&gt;, from the excellent Nir Sofer.  You can't lose with any of the free utilities on his &lt;a href="http://www.nirsoft.net/"&gt;site&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx"&gt;BgInfo&lt;/a&gt;, from &lt;a href="http://technet.microsoft.com/en-us/sysinternals/default.aspx"&gt;Sysinternals&lt;/a&gt;/Microsoft.  Display the right information on their desktop and your users can help you help them.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.netal.com/ssr.htm"&gt;System Scripting Runtime&lt;/a&gt; from Franz Krainer.  This long-time favorite ActiveX provides great utility to your logon scripts.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7102233641596873910-1944395496553387860?l=effectiveit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://effectiveit.blogspot.com/feeds/1944395496553387860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://effectiveit.blogspot.com/2009/01/utilities-worth-distributing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7102233641596873910/posts/default/1944395496553387860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7102233641596873910/posts/default/1944395496553387860'/><link rel='alternate' type='text/html' href='http://effectiveit.blogspot.com/2009/01/utilities-worth-distributing.html' title='Utilities Worth Distributing'/><author><name>Todd A. Scalzott</name><uri>http://www.blogger.com/profile/02778190081573506117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://3.bp.blogspot.com/-PrL6rI5Naeo/Tlixwmku8XI/AAAAAAAABOY/plBio49iPRQ/s220/IMG_0701-cropped.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7102233641596873910.post-1280145886111051604</id><published>2009-01-17T11:27:00.003-05:00</published><updated>2009-01-17T11:40:06.795-05:00</updated><title type='text'>Welcome!</title><content type='html'>Do you remember DOS and simple batch files?   If you are like me, you enjoyed the challenge of finding new ways to get the most out of those commands with a minimal footprint.   The key was to rely on as few external programs as possible; using what was sure to be already on the target PC.&lt;br /&gt;&lt;br /&gt;Windows CMD files came along and some of us salivated.  Command Extensions put it over the top, allowing one to hone their craft.&lt;br /&gt;&lt;br /&gt;Then VBScript.  Yes, I know.  Far more extensible; more powerful.  And I have not even touched PowerShell yet!&lt;br /&gt;&lt;br /&gt;Login scripts, CMD files, VBScript utilities.  Harnessing Active Directory, LDAP, and more.  Using utilities that are practical to install and depend on across the enterprise.&lt;br /&gt;&lt;br /&gt;Here I hope to share with you scripts from simple timesavers to essentials for I.T. support.  Stay in your seat!  You can effectively manage the enterprise desktops from the comfort of your chair.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7102233641596873910-1280145886111051604?l=effectiveit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://effectiveit.blogspot.com/feeds/1280145886111051604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://effectiveit.blogspot.com/2009/01/welcome.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7102233641596873910/posts/default/1280145886111051604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7102233641596873910/posts/default/1280145886111051604'/><link rel='alternate' type='text/html' href='http://effectiveit.blogspot.com/2009/01/welcome.html' title='Welcome!'/><author><name>Todd A. Scalzott</name><uri>http://www.blogger.com/profile/02778190081573506117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://3.bp.blogspot.com/-PrL6rI5Naeo/Tlixwmku8XI/AAAAAAAABOY/plBio49iPRQ/s220/IMG_0701-cropped.jpg'/></author><thr:total>0</thr:total></entry></feed>
