<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; PS:Start-Process]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=14696&amp;type=atom" />
	<updated>2019-04-07T06:58:25Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=14696</id>
		<entry>
			<title type="html"><![CDATA[PS:Start-Process]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=133381#p133381" />
			<content type="html"><![CDATA[<p>Добрый день!! Shell имеет вид&nbsp; - &quot;C:\Program Files (x86)\Google\Chrome\Application\chrome.exe&quot; --kiosk --incognito --disable-restore-session-state --kiosk printing https://yandex.ru <br />На удалённых ПК сайты разные, возможно ли запустить на удалённой машине параметр shell? Заранее спасибо!</p><div class="codebox"><pre><code>
$computername = &#039;namecomp1&#039; , &#039;namecomp2&#039; 
foreach ($computer in $computername)
{
    $result = Invoke-Command -ComputerName $computer  { (Get-ItemProperty -Path &#039;HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon&#039;-Name Shell).Shell  } 
   $result = ([regex]&#039;(--kiosk.+)&#039;).Replace($result,&#039; &quot;$1&quot;&#039;)   
    Invoke-Command -ComputerName $computer {Start-Process $result}
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[inseption86]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38818</uri>
			</author>
			<updated>2019-04-07T06:58:25Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=133381#p133381</id>
		</entry>
</feed>
