Uno snippet per i print job in corso.
Dim path As New System.Management.ManagementPath("root\cimv2")Dim options As New System.Management.ConnectionOptions
'Local Hostpath.Server = "."
'Remote Host'path.Server = "ServerName"'options.Username = "DomainName\UserName"'options.Password = "UserPassword"
Dim scope As New System.Management.ManagementScope(path, options)Dim query As New System.Management.ObjectQuery( _ "SELECT Name, Document, JobStatus, Owner, TotalPages, Size, TimeSubmitted FROM Win32_PrintJob")Dim search As New System.Management.ManagementObjectSearcher(scope, query)Dim objectCollection As System.Management.ManagementObjectCollection
objectCollection = search.Get()
Dim printerName, document, owner As StringDim pages, size As System.UInt32Dim timeSubmitted As DateTimeFor Each prntJob As System.Management.ManagementObject In objectCollection printerName = prntJob("Name").ToString().Split(","c)(0) document = prntJob("Document").ToString() owner = prntJob("Owner").ToString() pages = System.Convert.ToUInt32(prntJob("TotalPages")) size = System.Convert.ToUInt32(prntJob("Size")) timeSubmitted = System.Management.ManagementDateTimeConverter.ToDateTime( _ prntJob("TimeSubmitted").ToString())
Console.WriteLine("Printer: " & printerName) Console.WriteLine("Document: " & document) Console.WriteLine("Owner: " & owner) Console.WriteLine("Pages: " &...
How to use a VBScript to write proxy addresses to an Ldifde.exe-compatible import file in Exchange Server 2003 http://support.microsoft.com/kb/922258
Loading Web Parts into a catalog at run time http://support.microsoft.com/kb/910446
Dietro suggerimento ho modificato lo Script per inviare mail tramite CDOSYS per supportare anche i parametri -Cc e -Bcc.