<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Using PowerShell through SSH</title>
	<atom:link href="http://hivearchive.com/2006/07/03/using-powershell-through-ssh/feed/" rel="self" type="application/rss+xml" />
	<link>http://hivearchive.com/2006/07/03/using-powershell-through-ssh/</link>
	<description>Matt Michie&#039;s rants, raves, and thoughts</description>
	<lastBuildDate>Thu, 11 Feb 2010 00:36:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: natslovR</title>
		<link>http://hivearchive.com/2006/07/03/using-powershell-through-ssh/comment-page-1/#comment-44809</link>
		<dc:creator>natslovR</dc:creator>
		<pubDate>Thu, 07 Jan 2010 00:18:09 +0000</pubDate>
		<guid isPermaLink="false">http://hivearchive.com/2006/07/03/using-powershell-through-ssh/#comment-44809</guid>
		<description>&gt;or without interactive mode :
&gt;&gt; ssh -f administrator@my.server.com “powershell mycommand.exe”
&gt;Hope it will help some of you !!

QuikJensen, thanks, it helped a lot.</description>
		<content:encoded><![CDATA[<p>&gt;or without interactive mode :<br />
&gt;&gt; ssh -f <a href="mailto:administrator@my.server.com">administrator@my.server.com</a> “powershell mycommand.exe”<br />
&gt;Hope it will help some of you !!</p>
<p>QuikJensen, thanks, it helped a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samuel</title>
		<link>http://hivearchive.com/2006/07/03/using-powershell-through-ssh/comment-page-1/#comment-43714</link>
		<dc:creator>Samuel</dc:creator>
		<pubDate>Sun, 13 Dec 2009 21:06:24 +0000</pubDate>
		<guid isPermaLink="false">http://hivearchive.com/2006/07/03/using-powershell-through-ssh/#comment-43714</guid>
		<description>I need some help,

I have setup my ssh-to-powershell environment on Windows, with my powershell .profile and registered my snapins.

I want to run PowerShell scripts from an SSH / PLINK remote session against a Windows Server hosting the SSH Server.

I have setup the following variable in my Powershell profile; eg. $domain = [ADSI] &quot;LDAP://domain_name:389/dc=local,dc=com&quot;
 

When I run this command on a SSH remote session; $domain.psbase.Get_children()
This is the result...

The following exception was thrown when trying to enumerate the collection: &quot;An
 operations error occurred.&quot;.
At C:\posh\getADRC.ps1:7 char:28
+ $domain.psbase.Get_children &lt;&lt;&lt;&lt; ()
    + CategoryInfo          : NotSpecified: (:) [], ExtendedTypeSystemException
    + FullyQualifiedErrorId : ExceptionInGetEnumerator





I have also placed the two commands in a .PS1 file and executed it via PLINK; eg. PLINK.EXE my_session_name C:\Scripts\getADRC.PS1
This is the result...

The following exception was thrown when trying to enumerate the collection: &quot;An
 operations error occurred.&quot;.
At C:\Scripts\getADRC.PS1:7 char:28
+ $domain.psbase.Get_children &lt;&lt;&lt;&lt; ()
    + CategoryInfo          : NotSpecified: (:) [], ExtendedTypeSystemException
    + FullyQualifiedErrorId : ExceptionInGetEnumerator



I would appreciate any help that I can get.


Also would appreciate it - if you could share any example scripts that you have written to run from a unix SSH session on to a Windows POSH session.


Thanks.</description>
		<content:encoded><![CDATA[<p>I need some help,</p>
<p>I have setup my ssh-to-powershell environment on Windows, with my powershell .profile and registered my snapins.</p>
<p>I want to run PowerShell scripts from an SSH / PLINK remote session against a Windows Server hosting the SSH Server.</p>
<p>I have setup the following variable in my Powershell profile; eg. $domain = [ADSI] &#8220;LDAP://domain_name:389/dc=local,dc=com&#8221;</p>
<p>When I run this command on a SSH remote session; $domain.psbase.Get_children()<br />
This is the result&#8230;</p>
<p>The following exception was thrown when trying to enumerate the collection: &#8220;An<br />
 operations error occurred.&#8221;.<br />
At C:\posh\getADRC.ps1:7 char:28<br />
+ $domain.psbase.Get_children &lt;&lt;&lt;&lt; ()<br />
    + CategoryInfo          : NotSpecified: (:) [], ExtendedTypeSystemException<br />
    + FullyQualifiedErrorId : ExceptionInGetEnumerator</p>
<p>I have also placed the two commands in a .PS1 file and executed it via PLINK; eg. PLINK.EXE my_session_name C:\Scripts\getADRC.PS1<br />
This is the result&#8230;</p>
<p>The following exception was thrown when trying to enumerate the collection: &quot;An<br />
 operations error occurred.&quot;.<br />
At C:\Scripts\getADRC.PS1:7 char:28<br />
+ $domain.psbase.Get_children &lt;&lt;&lt;&lt; ()<br />
    + CategoryInfo          : NotSpecified: (:) [], ExtendedTypeSystemException<br />
    + FullyQualifiedErrorId : ExceptionInGetEnumerator</p>
<p>I would appreciate any help that I can get.</p>
<p>Also would appreciate it &#8211; if you could share any example scripts that you have written to run from a unix SSH session on to a Windows POSH session.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: QuikJean</title>
		<link>http://hivearchive.com/2006/07/03/using-powershell-through-ssh/comment-page-1/#comment-39259</link>
		<dc:creator>QuikJean</dc:creator>
		<pubDate>Mon, 24 Aug 2009 14:18:49 +0000</pubDate>
		<guid isPermaLink="false">http://hivearchive.com/2006/07/03/using-powershell-through-ssh/#comment-39259</guid>
		<description>Hi all !!
I did it !

If you try to run powershell scripts in cygwin command line you may expect a black screen if you have the following configuration :
 - open the file c:\cygwin\cygwin.bat
 - remove the &quot;tty&quot; from the line set &quot;CYGWIN=binmode ntsec&quot;
Then you should be able to execute powershell script in the local system but not yet with ssh.

Then to run Powershell scripts through SSH you have to open the ssh connection with the option &quot;-f&quot; :
&gt; ssh -f my.server.com

or without interactive mode : 
&gt; ssh -f administrator@my.server.com &quot;powershell mycommand.exe&quot;

Hope it will help some of you !! 

(I don&#039;t know how to pass the option -f to putty, so it doesn&#039;t work with putty)</description>
		<content:encoded><![CDATA[<p>Hi all !!<br />
I did it !</p>
<p>If you try to run powershell scripts in cygwin command line you may expect a black screen if you have the following configuration :<br />
 &#8211; open the file c:\cygwin\cygwin.bat<br />
 &#8211; remove the &#8220;tty&#8221; from the line set &#8220;CYGWIN=binmode ntsec&#8221;<br />
Then you should be able to execute powershell script in the local system but not yet with ssh.</p>
<p>Then to run Powershell scripts through SSH you have to open the ssh connection with the option &#8220;-f&#8221; :<br />
&gt; ssh -f my.server.com</p>
<p>or without interactive mode :<br />
&gt; ssh -f <a href="mailto:administrator@my.server.com">administrator@my.server.com</a> &#8220;powershell mycommand.exe&#8221;</p>
<p>Hope it will help some of you !! </p>
<p>(I don&#8217;t know how to pass the option -f to putty, so it doesn&#8217;t work with putty)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trevor</title>
		<link>http://hivearchive.com/2006/07/03/using-powershell-through-ssh/comment-page-1/#comment-32148</link>
		<dc:creator>Trevor</dc:creator>
		<pubDate>Wed, 10 Dec 2008 18:15:08 +0000</pubDate>
		<guid isPermaLink="false">http://hivearchive.com/2006/07/03/using-powershell-through-ssh/#comment-32148</guid>
		<description>Hi Jeff

I have the exact same problem, I&#039;ve tried with linux SSH and Tectia for windows if I ssh interactively I can run powershell scripts fine. If I try and run them from command line it just waits, until I hit CTR+C then it runs the script.

Have you had any luck?

Thanks</description>
		<content:encoded><![CDATA[<p>Hi Jeff</p>
<p>I have the exact same problem, I&#8217;ve tried with linux SSH and Tectia for windows if I ssh interactively I can run powershell scripts fine. If I try and run them from command line it just waits, until I hit CTR+C then it runs the script.</p>
<p>Have you had any luck?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://hivearchive.com/2006/07/03/using-powershell-through-ssh/comment-page-1/#comment-29747</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Thu, 23 Oct 2008 04:47:09 +0000</pubDate>
		<guid isPermaLink="false">http://hivearchive.com/2006/07/03/using-powershell-through-ssh/#comment-29747</guid>
		<description>I haven&#039;t had much success with this yet.  I can execute commands like &#039;dir&#039; but not any of the powershell &#039;get-*&#039; commands.  The latter give the message &quot;access is denied&quot;. I can run powershell just fine interactively in either a cmd.exe or cygwin shell.  Passwordless ssh also works fine otherwise.  I&#039;m using a Linux client, would that make a difference?  I also tried:

powershell -command &quot;&quot;

This works in cmd.exe but not in cygwin.  Any ideas what could be wrong?

What would be really useful is to put the above in a ssh  command:

ssh administrator@win_server powershell -command &quot;&quot;

With passwordless login, this command could be part of a script that could, e.g., perform the same command on a large number of windows servers almost simultaneously. (Such things are routinely done for Linux servers.) Has anybody tried this?</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t had much success with this yet.  I can execute commands like &#8216;dir&#8217; but not any of the powershell &#8216;get-*&#8217; commands.  The latter give the message &#8220;access is denied&#8221;. I can run powershell just fine interactively in either a cmd.exe or cygwin shell.  Passwordless ssh also works fine otherwise.  I&#8217;m using a Linux client, would that make a difference?  I also tried:</p>
<p>powershell -command &#8220;&#8221;</p>
<p>This works in cmd.exe but not in cygwin.  Any ideas what could be wrong?</p>
<p>What would be really useful is to put the above in a ssh  command:</p>
<p>ssh administrator@win_server powershell -command &#8220;&#8221;</p>
<p>With passwordless login, this command could be part of a script that could, e.g., perform the same command on a large number of windows servers almost simultaneously. (Such things are routinely done for Linux servers.) Has anybody tried this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lo0m</title>
		<link>http://hivearchive.com/2006/07/03/using-powershell-through-ssh/comment-page-1/#comment-24608</link>
		<dc:creator>Lo0m</dc:creator>
		<pubDate>Fri, 27 Jun 2008 11:03:06 +0000</pubDate>
		<guid isPermaLink="false">http://hivearchive.com/2006/07/03/using-powershell-through-ssh/#comment-24608</guid>
		<description>another way how to combine SSH and Powershell (without need to use Cygwin) is here: http://lo0m.blogspot.com/2008/04/powershell-over-ssh.html</description>
		<content:encoded><![CDATA[<p>another way how to combine SSH and Powershell (without need to use Cygwin) is here: <a href="http://lo0m.blogspot.com/2008/04/powershell-over-ssh.html" rel="nofollow">http://lo0m.blogspot.com/2008/04/powershell-over-ssh.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mario</title>
		<link>http://hivearchive.com/2006/07/03/using-powershell-through-ssh/comment-page-1/#comment-24416</link>
		<dc:creator>mario</dc:creator>
		<pubDate>Mon, 23 Jun 2008 06:18:56 +0000</pubDate>
		<guid isPermaLink="false">http://hivearchive.com/2006/07/03/using-powershell-through-ssh/#comment-24416</guid>
		<description>here&#039;s a working link, http://www.gotmvc.net/2008/06/powershell-remoting/</description>
		<content:encoded><![CDATA[<p>here&#8217;s a working link, <a href="http://www.gotmvc.net/2008/06/powershell-remoting/" rel="nofollow">http://www.gotmvc.net/2008/06/powershell-remoting/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mario</title>
		<link>http://hivearchive.com/2006/07/03/using-powershell-through-ssh/comment-page-1/#comment-24367</link>
		<dc:creator>mario</dc:creator>
		<pubDate>Sun, 22 Jun 2008 02:04:37 +0000</pubDate>
		<guid isPermaLink="false">http://hivearchive.com/2006/07/03/using-powershell-through-ssh/#comment-24367</guid>
		<description>this doesn&#039;t seem to work that well. i tried running a script remotely and nothing. this configuration seems to work better:

http://gotmvc.net/?p=3</description>
		<content:encoded><![CDATA[<p>this doesn&#8217;t seem to work that well. i tried running a script remotely and nothing. this configuration seems to work better:</p>
<p><a href="http://gotmvc.net/?p=3" rel="nofollow">http://gotmvc.net/?p=3</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Hive Archive &#187; Blog Archive &#187; A real solution to PowerShell SSH Remoting</title>
		<link>http://hivearchive.com/2006/07/03/using-powershell-through-ssh/comment-page-1/#comment-21036</link>
		<dc:creator>The Hive Archive &#187; Blog Archive &#187; A real solution to PowerShell SSH Remoting</dc:creator>
		<pubDate>Mon, 31 Mar 2008 05:06:16 +0000</pubDate>
		<guid isPermaLink="false">http://hivearchive.com/2006/07/03/using-powershell-through-ssh/#comment-21036</guid>
		<description>[...] blog post from 2006 is currently the #1 Google Result for PowerShell SSH, but finally there is a good [...]</description>
		<content:encoded><![CDATA[<p>[...] blog post from 2006 is currently the #1 Google Result for PowerShell SSH, but finally there is a good [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chris</title>
		<link>http://hivearchive.com/2006/07/03/using-powershell-through-ssh/comment-page-1/#comment-18339</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Thu, 03 Jan 2008 06:46:15 +0000</pubDate>
		<guid isPermaLink="false">http://hivearchive.com/2006/07/03/using-powershell-through-ssh/#comment-18339</guid>
		<description>How about the reverse?  execute a ssh command from powershell and handle the output?  Otherwise as and ESX server admin I am stuck writing on two plats</description>
		<content:encoded><![CDATA[<p>How about the reverse?  execute a ssh command from powershell and handle the output?  Otherwise as and ESX server admin I am stuck writing on two plats</p>
]]></content:encoded>
	</item>
</channel>
</rss>
