Question : PowerShell and PSEXEC Problem

When I executed the following PowerShell Script, i got the error :

=========
PsExec v1.80 - Execute processes remotely

Copyright (C) 2001-2007 Mark Russinovich

Sysinternals - www.sysinternals.com

 

Couldn't access :

The filename, directory name, or volume label syntax is incorrect.

Couldn't access :

The filename, directory name, or volume label syntax is incorrect.

========================

What could have gone wrong out of this simple script? Please advise me ASAP, Dear Experts.

Thanks and regards,
William
1:
2:
3:
4:
5:
6:
gc machines.txt
foreach ( $machine in $machines )
	{
		$scriptname = "AB-" + $machine + ".BAT"
		psexec \\$machine C:\temp\$scriptname	
	}

Answer : PowerShell and PSEXEC Problem

ok, I got it working

SELECT
<output name="year" replace="(YEAR(t.time))" />AS year,
<output name="month" replace="(MONTHNAME(t.time))" chart="k" />AS month,
<output name="invoice" replace="(SUM(t.invoice))" chart="l" data="float" />AS invoice,
<output name="payments" replace="(SUM(t.payment))" chart="l" data="float" />AS payments,
<output name="lights" replace="CAST((SUM(service)) AS Decimal(8,2))" chart="d" data="float" />AS lights,
<output name="lights2" replace="CAST((SUM(service2)) AS Decimal(8,2))" chart="d" data="float" />AS lights2,
<output name="hose" replace="CAST((SUM(hose)) AS Decimal(8,2))" chart="d" data="float" />AS hose
FROM transac t
LEFT JOIN (SELECT v.datetime AS datetime, (v.quantity * s.charges) AS service FROM invitem v LEFT JOIN service s ON s.idservice = v.idservice WHERE s.idservice = 'PARTS-LIGHTS-VBFG-2' GROUP BY v.datetime) z ON z.datetime = t.time
LEFT JOIN (SELECT v.datetime AS datetime, (v.quantity * s.charges) AS service2 FROM invitem v LEFT JOIN service s ON s.idservice = v.idservice WHERE s.idservice = 'PARTS-LIGHT-FGRT-1' GROUP BY v.datetime) y ON y.datetime = t.time
LEFT JOIN (SELECT v.datetime AS datetime, (v.quantity * s.charges) AS hose FROM invitem v LEFT JOIN service s ON s.idservice = v.idservice WHERE s.idservice = 'UTILSRUBBERHOSE657' GROUP BY v.datetime) w ON w.datetime = t.time
WHERE DATE(time) between 'a year ago' AND DATE(NOW())
GROUP BY MONTHNAME(t.time)
Random Solutions  
 
programming4us programming4us