Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - nngoe

Pages: [1]
1
General / Starting client from PowerShell
« on: July 07, 2017, 09:23:46 PM »
Hi everyone,
we have a small cluster consisting of 10 nodes. For the moment I start each client using the remote desktop which is very time-consuming. My idea was to have a PowerShell script who can do this task. I started playing around but it is still not working as I expected. Maybe it has to do with Start-Process option which behaves differently than starting the client using the cmd.
Here is my current script, would be great if someone has more experience and can help me:

#Start photoscan in server mode
########################################
Start-Process -FilePath "C:/Program Files/Agisoft/PhotoScan Pro/photoscan.exe" -ArgumentList "--server --control 192.168.0.1 --dispatch 192.168.0.1"

# List with all computernames
$computers = Get-Content -Path C:\...\computerliste.txt


#Run Photoscan on remote computers
########################################
$s = New-PSSession -ComputerName $computers -Credential Admin

Invoke-Command -Session $s -ScriptBlock {
Start-Process -FilePath "C:/Program Files/Agisoft/PhotoScan Pro/photoscan.exe" -ArgumentList "--node --dispatch 192.168.0.1 --root Z:/test"
}

Pages: [1]