smsclictr.automation library
Assembly: smsclictr.automation(in smsclictr.automation.dll) Version: 1.1.3731.16627 (1.1.2.4)
ReRun a scheduled Advertisement
Namespace:
smsclictr.automation
Assembly: smsclictr.automation(in smsclictr.automation.dll) Version: 1.1.3731.16627 (1.1.2.4)
Syntax
Parameters
- ADV_AdvertisementID
- Type:
System
.
.
::
.
String
Advertisement ID
- PKG_PackageID
- Type:
System
.
.
::
.
String
Package ID
- PRG_ProgramID
- Type:
System
.
.
::
.
String
Program ID (Program Name)
Return Value
The restarted ScheduleID or NULL if the Advertisement does not have a valid ScheduleIDRemarks
Only scheduled Advertisements (DateTime/As soon as
possible/..) which are assigned to a Client can be restarted
Examples
C#:
PowerShell:
CopyC#
using System; using System.Collections.Generic; using System.Text; using smsclictr.automation; using System.Management; namespace ConsoleApplication1 { class Program { static void Main( string[] args) { SMSClient oClient = new SMSClient( "remotehost"); Console.WriteLine(oClient.SoftwareDistribution.RerunAdv( "LAB20000", "LAB00002", "CMD RUN")) } } }
(copy smsclictr.automation.dll to the %HOMEDRIVE%\%HOMEPATH% Folder of the current User)
CopyC#
[ void][System.Reflection.Assembly]::LoadFile( "$HOME\smsclictr.automation.dll") $SMSClient = New-Object -TypeName smsclictr.automation.SMSClient( "remotehost") $SMSClient.SoftwareDistribution.RerunAdv( "LAB20000", "LAB00002", "CMD RUN")