RE: Perform an Offline Files Sync from command line?
How about one of these? http://www.hypernews.org/HyperNews/get/computers/languages/60/1.html http://blogs.technet.com/filecab/archive/2007/05/01/synchronizing-offline-files-from-the-command-line.aspx BTW, if you can, please post what you come up with. We are doing some fixes on laptops with offline cache issues right now and this looks handy! -Bonnie From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2008 8:28 AM To: NT System Admin Issues Subject: Perform an Offline Files Sync from command line? Anybody know how to do an Offline Files Cache Synchronization from a command line? Or - via a program? What I want to do: Run a script to remotely sync a user. Remotely add reg key to delete Offline Folders cache: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\NetCache] FormatDatabase=dword:0001 -- Change GPO to change location of Offline Files. Refresh GPO settings (GPUPDATE /FORCE) Remotely reboot. I know I can add the key remote using reg add \\workstation\key, and force the GPO update, and the reboot. But how do I have the script do a sync first? Thanks BTW ... ideally, this would be in a CMD script, but I can execute that part by calling a VBS script, if need be. -- Michael Leone Network Administrator, ISM Philadelphia Housing Authority 2500 Jackson St Philadelphia, PA 19145 Tel: 215-684-4180 Cell: 215-252-0143 mailto:[EMAIL PROTECTED] ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~
RE: Perform an Offline Files Sync from command line?
Miller Bonnie L. [EMAIL PROTECTED] wrote on 10/06/2008 10:42:42 AM: How about one of these? http://www.hypernews.org/HyperNews/get/computers/languages/60/1.html http://blogs.technet.com/filecab/archive/2007/05/01/synchronizing- offline-files-from-the-command-line.aspx AH! Thanks! BTW, if you can, please post what you come up with. We are doing some fixes on laptops with offline cache issues right now and this looks handy! Well, disregarding all the interactive prompting: First I'd probably remotely execute %SYSTEMROOT%\SYSTEM32\MOBSYNC /LOGOFF, using something like PSEXEC from SysInternals, probably (doesn't appear that you can MOBSYNC a remote PC). Then: reg add \\%host%\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\NetCache /v FormatDatabase /t REG_DWORD /d 1 reg query \\%host%\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\NetCache /s (%host% being the IP address or hostname of the system to affect) Next, refresh the GPO with either a remote execution of GPUPDATE /FORCE or SECEDIT /REFRESHPOLICY USER_POLICY /ENFORCE (we still have a lot of Windows 2000 machines, so we'd have to check the OS by looking at .. something I haven't figured out yet :-)) Last, I'd remotely reboot, again using PSSHUTDOWN. Haven't had time to fully flesh this out, but my co-worker has the scripted parts of adding the reg keys working ... Thanks, and HTH ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~
RE: Perform an Offline Files Sync from command line?
[EMAIL PROTECTED] wrote on 10/06/2008 11:22:10 AM: Miller Bonnie L. [EMAIL PROTECTED] wrote on 10/06/2008 10:42:42 AM: How about one of these? http://www.hypernews.org/HyperNews/get/computers/languages/60/1.html http://blogs.technet.com/filecab/archive/2007/05/01/synchronizing- offline-files-from-the-command-line.aspx AH! Thanks! BTW, if you can, please post what you come up with. We are doing some fixes on laptops with offline cache issues right now and this looks handy! Well, disregarding all the interactive prompting: First I'd probably remotely execute %SYSTEMROOT%\SYSTEM32\MOBSYNC /LOGOFF, using something like PSEXEC from SysInternals, probably (doesn't appear that you can MOBSYNC a remote PC). Which doesn't seem to work ... at least, not from executing it via PSEXEC ... I run it; and it just comes back to a comand line. No dialog on the target machine, etc. SIGH A good idea, while it lasted ... perhaps callign it via the VB method would work ... When I have enough time, I will try that ... ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~
RE: Perform an Offline Files Sync from command line? - VBS scripting Q
Miller Bonnie L. [EMAIL PROTECTED] wrote on 10/06/2008 10:42:42 AM: How about one of these? http://www.hypernews.org/HyperNews/get/computers/languages/60/1.html http://blogs.technet.com/filecab/archive/2007/05/01/synchronizing- offline-files-from-the-command-line.aspx I tried the above VBS scripts from the technet link, and got: X:\PHA Scriptscscript CscSyncAll.VBS Microsoft (R) Windows Script Host Version 5.7 Copyright (C) Microsoft Corporation. All rights reserved. X:\PHA Scripts\CscSyncAll.VBS(100, 1) SWbemServicesEx: Invalid class So I am unclear as to why it doesn't work. Oh, I can figure out that I need some routines loaded, or need to bind to some API that it's not binding to, or whatever the VBS terminology is, but my searching is failing to find a quick fix ... Last line is what's causing the error ... Set objWMILocator = WScript.CreateObject(WbemScripting.SWbemLocator) Set objWMIServices = objWMILocator.ConnectServer(strComputerName, cWMINameSpace, strUserID, strPassword) Set objCache = objWMIServices.Get(Win32_OfflineFilesCache=@) ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~
RE: Perform an Offline Files Sync from command line?
Cscmd doesn't do exactly what you want, but maybe it helps. http://support.microsoft.com/kb/884739 Hth René From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2008 5:28 PM To: NT System Admin Issues Subject: Perform an Offline Files Sync from command line? Anybody know how to do an Offline Files Cache Synchronization from a command line? Or - via a program? What I want to do: Run a script to remotely sync a user. Remotely add reg key to delete Offline Folders cache: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\NetCache] FormatDatabase=dword:0001 -- Change GPO to change location of Offline Files. Refresh GPO settings (GPUPDATE /FORCE) Remotely reboot. I know I can add the key remote using reg add \\workstation\key, and force the GPO update, and the reboot. But how do I have the script do a sync first? Thanks BTW ... ideally, this would be in a CMD script, but I can execute that part by calling a VBS script, if need be. -- Michael Leone Network Administrator, ISM Philadelphia Housing Authority 2500 Jackson St Philadelphia, PA 19145 Tel: 215-684-4180 Cell: 215-252-0143 mailto:[EMAIL PROTECTED] *** The information in this e-mail is confidential and intended solely for the individual or entity to whom it is addressed. If you have received this e-mail in error please notify the sender by return e-mail delete this e-mail and refrain from any disclosure or action based on the information. *** ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~
RE: Perform an Offline Files Sync from command line?
René de Haas [EMAIL PROTECTED] wrote on 10/03/2008 11:33:42 AM: Cscmd doesn?t do exactly what you want, but maybe it helps. http://support.microsoft.com/kb/884739 Yeah, I saw that (after posting here). However, I still have v1 of this tool, which only has limited options. I'm looking at the moment for v1.1, which has a dozen or more options, from what I've seen. ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~
RE: Perform an Offline Files Sync from command line?
[EMAIL PROTECTED] wrote on 10/03/2008 11:46:42 AM: René de Haas [EMAIL PROTECTED] wrote on 10/03/2008 11:33:42 AM: Cscmd doesn?t do exactly what you want, but maybe it helps. http://support.microsoft.com/kb/884739 Yeah, I saw that (after posting here). However, I still have v1 of this tool, which only has limited options. I'm looking at the moment for v1.1, which has a dozen or more options, from what I've seen. I see that CSCCMD has a MOVESHARE option, which should move the cache to a new location. In our case, we set that location via Administrative Template in a GPO. So - ideally - I'd like the GPO to control all this. What I'm looking to do is force a sync, then delete the cache (so it doesn't point back to the old server location). From that point forward, I'd like for it all to happen normallu via GPO, as it should - i.e., use logs in; gets new location from GPO when logging in; folders are then synced at logoff to new location by GPO(that is our setting in the GPO - files sync at logoff). So I don't really need a MOVESHARE, for my purposes here; I need a SYNC NOW option. :-) ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~