Give this a go...

code:
Break On

$sComputer = "remote_pc"

$lLogoff = 0
$lShutdown = 1
$lReboot = 2
$lForce = 4
$lPoweroff = 8

$colOperatingSystems = GetObject("winmgmts:{(Shutdown)}!\\" + $sComputer +
"\root\cimv2").ExecQuery("Select * from Win32_OperatingSystem")
@ERROR ?

For Each $objOperatingSystem in $colOperatingSystems
$nul=$objOperatingSystem.Win32Shutdown($lPoweroff)
@ERROR ?
Next



[ 01. July 2003, 15:42: Message edited by: Chris S. ]