View Single Post
  #2  
Old 01-05-2006, 07:29 AM
Bill Stewart
 
Posts: n/a
Default Re: force logoff of xp hosts before backup job occurs

Joe wrote:

> I have Veritas Backup Software scheduled to initiate the backup job at
> 2:00am.on a Windows 2000 Server.All other hosts are XP professional.
> Unfortunately I have end users who fail to log off the server before backup
> jobs occur. The backup jobs continously skipp specific files that are
> accessed and locked, while the hosts are still logged into the domain. There
> are no backup agents applicable to unlock and backup these specific files.
> Is there a script I can use to implement on the hosts at a scheduled time to
> force logging off of all xp pro hosts before backup jobs occur? TIA.


I would instruct users that backups are not occurring, and that the
backups are for their benefit.

Next, let them know that you're going to log them off so that backups
can complete.

Prior to your backup, use a script on the server that will log off the
console user on the computer(s) in question. You can use the
Win32Shutdown() method of the Win32_OperatingSystem class to do this;
for example (JScript):

computer = "foo";
wmi = GetObject("winmgmts:{impersonationlevel=impersonat e" +
",(shutdown)}!//" + computer + "/root/cimv2");
oscoll = new Enumerator(wmi.InstancesOf("Win32_OperatingSystem" ));
oscoll.item().Win32Shutdown(4);

--
Bill Stewart
Reply With Quote