Return the Forecasted Scheduling in PowerShell

Follow


Users can access the JAMS PowerShell provider to return a forecasted schedule in PowerShell.

In version 5.x:

 

$_srvobj = [mvpsi.jams.server]::getserver( "localhost" ) 
$_jobs = [MVPSI.JAMS.Schedule]::find( "*" , "*" , $( get-date "08-07-2011" ) , $( get-date "08-08-2011" ) , "CURRENT" , $_srvobj )
 
foreach ( $_scheduleEntry in $_jobs ) 
{
   write-host ( $_scheduleEntry.EntryName + " " +$_scheduleEntry.HoldTime.ToString() )
 } 

  


In version 6.x :

 

$folder = "\Samples"
$_srvobj = [mvpsi.jams.server]::getserver( "localhost" )
$_jobs = [MVPSI.JAMS.Schedule]::find( "$folder" , "*" , $( get-date "08-07-2014" ) , $( get-date "08-08-2014" ) , "CURRENT" , $_srvobj )

foreach ( $_scheduleEntry in $_jobs )

{
write-host ( $_scheduleEntry.EntryName + " " +$_scheduleEntry.HoldTime.ToString() )
}


Have more questions? Submit a request

Comments