<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Techibee.com &#187; Know your Shell</title>
	<atom:link href="http://techibee.com/category/know-your-shell/feed" rel="self" type="application/rss+xml" />
	<link>http://techibee.com</link>
	<description>A System Administrator&#039;s Blog</description>
	<lastBuildDate>Mon, 06 Feb 2012 09:40:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Check and terminate process on remote machine using wmi</title>
		<link>http://techibee.com/know-your-shell/check-and-terminate-process-on-remote-machine-using-wmi/66</link>
		<comments>http://techibee.com/know-your-shell/check-and-terminate-process-on-remote-machine-using-wmi/66#comments</comments>
		<pubDate>Thu, 24 Sep 2009 17:33:00 +0000</pubDate>
		<dc:creator>Sitaram Pamarthi</dc:creator>
				<category><![CDATA[Know your Shell]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://techibee.com/~sysadmins/check-and-terminate-process-on-remote-machine-using-wmi</guid>
		<description><![CDATA[WMI is a wonderful tool for remote administration!!! Today in this post, I will demonstrate on how to query and terminate processes in remote machine using wmi command line utility (wmic). Ofcourse, you need have administrator rights on remote machine to run these command(may be a domain admin account is a right choice here). In [...]]]></description>
			<content:encoded><![CDATA[<div class="rw-right"><div class="rw-ui-container rw-class-blog-post rw-urid-670"></div></div><p><strong>WMI</strong> is a wonderful tool for remote administration!!!</p>
<p>Today in this post, I will demonstrate on how to query and terminate processes in remote machine using wmi command line utility (wmic). Ofcourse, you need have administrator rights on remote machine to run these command(may be a domain admin account is a right choice here).</p>
<p>In all these below examples, &#8220;myremote&#8221; is my remote machine name against which I am performing these operations.</p>
<p><strong>To query all processes in remote machine use below command..</strong></p>
<div dir="ltr" style="background-color: #003366;">
<pre background-color:="" class="libCScode" id="ctl00_MTContentSelector1_mainContentContainer_ctl34_ctl00_ctl29_ctl00_ctl00" space="preserve" style="color: white; word-break: break-all; word-wrap: break-word;" yellow="">wmic /node:myremote process</pre>
</div>
<p><strong>To query a specific process(outlook.exe) in remote machine&#8230;</strong></p>
<div dir="ltr" style="background-color: #003366;">
<pre background-color:="" class="libCScode" id="ctl00_MTContentSelector1_mainContentContainer_ctl34_ctl00_ctl29_ctl00_ctl00" space="preserve" style="color: white; word-break: break-all; word-wrap: break-word;" yellow="">wmic /node:myremote process where name="outlook.exe"</pre>
</div>
<p><strong>If you are not sure of exact process name but know only few letters of it, then use this&#8230;</strong></p>
<div dir="ltr" style="background-color: #003366;">
<pre background-color:="" class="libCScode" id="ctl00_MTContentSelector1_mainContentContainer_ctl34_ctl00_ctl29_ctl00_ctl00" space="preserve" style="color: white; word-break: break-all; word-wrap: break-word;" yellow="">wmic /node:myremote process where "name like '%outlo%'" get name</pre>
</div>
<p><strong>To terminate(kill) a process&#8230;</strong></p>
<div dir="ltr" style="background-color: #003366;">
<pre background-color:="" class="libCScode" id="ctl00_MTContentSelector1_mainContentContainer_ctl34_ctl00_ctl29_ctl00_ctl00" space="preserve" style="color: white; word-break: break-all; word-wrap: break-word;" yellow="">wmic /node:myremote process where name="outlook.exe"  call terminate</pre>
</div>
<p><strong>To query the owner of a process&#8230;</strong></p>
<div dir="ltr" style="background-color: #003366;">
<pre background-color:="" class="libCScode" id="ctl00_MTContentSelector1_mainContentContainer_ctl34_ctl00_ctl29_ctl00_ctl00" space="preserve" style="color: white; word-break: break-all; word-wrap: break-word;" yellow="">wmic /node:myremote process where name="outlook.exe"  call getowner</pre>
</div>
<p>Enough for today.. <img src='http://techibee.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  I will post more command lines when I get some time&#8230;</p>
<p>If you want a command for any specific requirement, please leave a&nbsp;note below in comments section. I will get back to you ASAP.</p>
<p>Happy Learning..,<br />Sitaram Pamarthi</p>
]]></content:encoded>
			<wfw:commentRss>http://techibee.com/know-your-shell/check-and-terminate-process-on-remote-machine-using-wmi/66/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find disk space of remote machine with powershell script</title>
		<link>http://techibee.com/know-your-shell/find-disk-space-of-remote-machine-with-powershell-script/56</link>
		<comments>http://techibee.com/know-your-shell/find-disk-space-of-remote-machine-with-powershell-script/56#comments</comments>
		<pubDate>Tue, 04 Aug 2009 09:30:00 +0000</pubDate>
		<dc:creator>Sitaram Pamarthi</dc:creator>
				<category><![CDATA[Know your Shell]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://techibee.com/~sysadmins/find-disk-space-of-remote-machine-with-powershell-script</guid>
		<description><![CDATA[I  wrote a enhanced function to get the disk space. You can find it at http://techibee.com/powershell/check-disk-space-of-remote-machine-using-powershell/430 Subject says it all. This code helps you to findout the disk space of remote machine. Code(save it into a file with ps1 extension): $hostname=Read-host "Enter the computer name" get-wmiobject -computer $hostname win32_logicaldisk -filter "drivetype=3" &#124; ForEach-Object { Write-Host [...]]]></description>
			<content:encoded><![CDATA[<div class="rw-right"><div class="rw-ui-container rw-class-blog-post rw-urid-570"></div></div><p><span style="color: #0000ff;">I  wrote a enhanced function to get the disk space. You can find it at </span><a href="http://techibee.com/powershell/check-disk-space-of-remote-machine-using-powershell/430"><span style="color: #0000ff;">http://techibee.com/powershell/check-disk-space-of-remote-machine-using-powershell/430</span></a></p>
<p>Subject says it all. This code helps you to findout the disk space of remote machine.</p>
<p><span style="text-decoration: underline;"><strong>Code</strong></span>(save it into a file with ps1 extension):</p>
<div style="background-color: #003366;" dir="ltr">
<pre id="ctl00_MTContentSelector1_mainContentContainer_ctl34_ctl00_ctl29_ctl00_ctl00" class="libCScode" style="word-wrap: break-word; word-break: break-all;"><span style="color: #000000;">$hostname=Read-host "Enter the computer name"</span></pre>
<pre id="ctl00_MTContentSelector1_mainContentContainer_ctl34_ctl00_ctl29_ctl00_ctl00" class="libCScode" style="word-wrap: break-word; word-break: break-all;"><span style="color: #000000;">get-wmiobject -computer $hostname win32_logicaldisk -filter "drivetype=3" | ForEach-Object { Write-Host  Device name : $_.deviceid; write-host Total space : ($_.size/1GB).tostring("0.00")GB; write-host Free Spce : ($_.freespace/1GB).tostring("0.00")GB }</span></pre>
</div>
<p><strong><span style="text-decoration: underline;">Output</span></strong></p>
<div style="background-color: #003366;" dir="ltr">
<pre id="ctl00_MTContentSelector1_mainContentContainer_ctl34_ctl00_ctl29_ctl00_ctl00" class="libCScode" style="color: white; word-break: break-all; word-wrap: break-word;">PS C:temp&gt; .CheckSpace.ps1</pre>
<pre id="ctl00_MTContentSelector1_mainContentContainer_ctl34_ctl00_ctl29_ctl00_ctl00" class="libCScode" style="color: white; word-break: break-all; word-wrap: break-word;">Enter the computer name: MyRemotePCDevice name : C: Total space : 232.75 GBFree Spce : 130.51 GBPS C:temp&gt;</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://techibee.com/know-your-shell/find-disk-space-of-remote-machine-with-powershell-script/56/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quick way to find hotfix installation status</title>
		<link>http://techibee.com/know-your-shell/quick-way-to-find-hotfix-installation-status/36</link>
		<comments>http://techibee.com/know-your-shell/quick-way-to-find-hotfix-installation-status/36#comments</comments>
		<pubDate>Mon, 06 Apr 2009 17:44:00 +0000</pubDate>
		<dc:creator>Sitaram Pamarthi</dc:creator>
				<category><![CDATA[Know your Shell]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://techibee.com/~sysadmins/quick-way-to-find-hotfix-installation-status</guid>
		<description><![CDATA[I know there are varioud menthods for finding the hotfix installation status, but I felt this as very easy one. To find the hotfix installation status on local machine: wmic qfe where hotfixid=&#8221;KB958644&#8243; list full To find on a remote machine: wmic /node: qfe where hotfixid=&#8221;KB958644&#8243; list full To find on list of machines: o [...]]]></description>
			<content:encoded><![CDATA[<div class="rw-right"><div class="rw-ui-container rw-class-blog-post rw-urid-370"></div></div><p>I know there are varioud menthods for finding the hotfix installation status, but I felt this as very easy one.</p>
<p><strong>To find the hotfix installation status on local machine:</strong></p>
<p>wmic qfe where hotfixid=&#8221;KB958644&#8243; list full</p>
<p><strong>To find on a remote machine:</strong></p>
<p>wmic /node:<remotemachine> qfe where hotfixid=&#8221;KB958644&#8243; list full</p>
<p><strong>To find on list of machines:</strong></p>
<p> o Place all machines into a text file(machine.txt)<br /> o Run the below batch file</p>
<p>=== File name: get-hotfix-status.bat ===</p>
<p>echo off<br />for /f &#8220;tokens=* delims= &#8221; %a in (test.txt) do wmic/Node:%a qfe where hotfixid=&#8221;KB958644&#8243; list full</p>
<p>=== End of file ===</p>
<p>Please comment if you know any better way.</p>
<p>Happy Learning,<br />Sitaram Pamarthi,</p>
]]></content:encoded>
			<wfw:commentRss>http://techibee.com/know-your-shell/quick-way-to-find-hotfix-installation-status/36/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

