Related to your search المتصله بحثك

VBS Script for System Administrators - How to backup Outlook email automatically in a login or logoff script Vbs النصي لمديري النظام - كيفية الاحتياطيه التوقعات البريد الالكتروني تلقائيا في تسجيل الدخول او الانقطاع النصي

Posted on March 13, 2007 at 8:11 am نشرت فى 13 مارس 2007 في الساعة 8:11

Welcome to Online Tech Tips , a great resource for computer tutorials, technology news, software reviews, and personal computing tips. أهلا بك الى شبكة الانترنت النصائح التقنيه ، عظيم الموارد للبحوث الحاسوب ، أخبار التكنولوجيا ، والبرمجيات الاستعراضات ، ونصائح الحوسبه الشخصيه. If you're new here and you like the content, you can subscribe to my اذا كنت جديدا هنا واردت محتوى ، يمكنك الاشتراك في بلادي RSS feed ار اس اس إطعام to get daily tips. للحصول على نصائح يومية. Thanks for visiting! شكرا للزيارة!

If you are a Systems Administrator for your company and everyone is using Outlook or some other desktop email program, you’ve probably run into the situation where someone has lost all of their emails due to the fact that it’s saved locally on the user’s computer and not on the main servers. اذا انت مدير نظم لشركتك والجميع باستخدام بعض التوقعات او غيرها من سطح المكتب برنامج البريد الإلكتروني ، انك ربما البعيد الى الحاله التي يكون فيها احدهم قد فقد كل من رسائل البريد الالكتروني يرجع الى انها انقذت محليا على المستخدم 'S الحاسوب وليس على خدمة الشبكه الرئيسية. So if you’re a small shop and can’t afford to get Exchange server, then here’s a simply way to automate the backup of user’s Outlook PST files onto your server in a login or logoff script. حتى اذا كنت صغيرة دكان ولا يستطيعون الحصول على تبادل الخادم ، ثم اليك أ ببساطة طريقة لمكننه الاحتياطيه للمستخدم نظرة توقيت المحيط الهادي الملفات على السيرفر الخاص بك في تسجيل الدخول او الانقطاع النصي.

First here’s the code and then I’ll explain it: أول مدونة إليك وأنا سوف اشرح ذلك الحين وهي :

Set shell= WScript.CreateObject(”WScript.Shell”) مجموعة شل = wscript.createobject ( "wscript.shell")
strUserName = shell.ExpandEnvironmentStrings(”%USERNAME%”) Strusername shell.expandenvironmentstrings = ( "اسم المستخدم ٪ ٪")

Dim fso قاتمه الطلق
set fso = CreateObject(”Scripting.FileSystemObject”) مجموعة الطلق = createobject ( "scripting.filesystemobject")

lnDayOfWeek = weekday(now()) Lndayofweek = أيام الاسبوع (الآن)))

if lnDayOfWeek = 5 then اذا lndayofweek = 5 ثم

     If fso.DriveExists(”G:”) Then اذا fso.driveexists ( "ز :") ثم

          Dim lcDrive قاتمه lcdrive
          Set lcDrive = fso.GetDrive(”G:”) مجموعة lcdrive = fso.getdrive ( "ز :")

          If lcDrive.IsReady Then ثم اذا lcdrive.isready

               newfolderpath = “\\servername\users\” & strUserName & “\EmailBackup” Newfolderpath = "\ \ servername \ المستخدمين \" strusername & & "\ emailbackup"

               If Not fso.FolderExists(newfolderpath) Then اذا لم fso.folderexists (newfolderpath) ثم
                    Set newfolder = fso.CreateFolder(newfolderpath) مجموعة newfolder = fso.createfolder (newfolderpath)
               End If نهاية إذا

                Dim file الملف قاتمه
               file = “C:\Documents and Settings\” & strUserName & “\Local Settings\Application Data\Microsoft\Outlook\Outlook.pst” الملف = "c : \ المستندات والاعدادات \" strusername & & "\ الاعدادات المحلية \ بيانات التطبيق \ مايكروسوفت \ آفاق \ outlook.pst"

               If fso.FileExists(file) Then اذا fso.fileexists (ملف) ثم
                    fso.CopyFile “C:\Documents and Settings\” & strUserName & “\Local Settings\Application Data\Microsoft\Outlook\Outlook.pst”, “\\servername\users\” & strUserName & “\EmailBackup\Outlook.pst” Fso.copyfile "c : \ المستندات والاعدادات \" strusername & & "\ الاعدادات المحلية \ بيانات التطبيق \ مايكروسوفت \ آفاق \ outlook.pst" ، "\ \ servername \ المستخدمين \" strusername & & "\ emailbackup \ outlook.pst "

                    set fso = nothing مجموعة الطلق = شيء
                    wscript.echo “Your email has been backed up!” Wscript.echo "بريدك الالكتروني وقد تدعمه!"
               end if نهاية إذا
          end if نهاية إذا
     end If نهاية إذا
end if نهاية إذا

Unforunately, the code is not indented very well here, so you’ll have to copy it and fix it so that you can read it correctly. Unforunately ، المدونه ليست مطعوج جيد جدا هنا ، بحيث سيكون لديك لأنسخها وتصحيحها بحيث يمكنك ان تقرأ بشكل صحيح. Basically, it starts off creating a FileSystem object that will take care of copying the file to the server. اساسا ، وهو ينطلق من ايجاد نظام ملفات الجسم التي سوف تتخذ الرعايه من نسخ الملف الى الخادم. Then I do a check to see which day of the week it is and I use 5 (Friday), so that the script only runs once a week. ثم افعل شيك لمعرفة اي منها ايام الاسبوع ومن وأنا أستعمل 5 (الجمعة) ، حتى ان يدير النصي فقط مرة واحدة في الاسبوع. I also do a check to make sure the G drive is available (the network drive I’m going to be copying the data to) before I get to the copying. وأود أيضا ان تفعل شيك للتأكد من حملة متاح ز (الشبكه حملة I'm الذهاب الى نسخ البيانات الى) قبل ان احصل على النسخ.

Then I check to see if the folder exists that I want to copy to and if not, I go ahead and create that folder in the user’s folder on the server. ثم اعطي الشيك لرؤية ما اذا كان وجود مجلد أن اريد نسخة الى واذا لم يحدث ذلك ، فاني اذهب الى الامام وخلق هذا المجلد في مجلد المستخدم على الخادم. I also check to make sure the file exists and if so, I then copy it to the user’s folder on the network. انا ايضا التحقق منه للتأكد من وجود الملف واذا كان الامر كذلك ، فاننى ثم أنسخها الى مجلد المستخدم على الشبكه. I use the shell.ExpandEnvironmentStrings(”%USERNAME%”) method to get the current user’s username. استعمل shell.expandenvironmentstrings ( "اسم المستخدم ٪ ٪") طريقة للحصول على اسم المستخدم الحالي للمستخدم.

You can then apply this as either a logon or logoff script using Group Policy! يمكنك عندئذ ان تطبق هذا النحو أما تسجيله او الانقطاع النصي باستخدام سياسة المجموعة!

Related Posts: الوظائف ذات الصلة :

More VBS Scripts for System Administrators اكثر vbs مخطوطات لمديري النظام

Office Ergonomics - Risks of working at a desktop workstation and how to avoid them مكتب الهندسه البشريه - مخاطر العمل في محطات عمل المكتب وكيفية تفاديها

Gliffy - Online tool to create and share diagrams for free Gliffy - الانترنت اداة لخلق والرسوم البيانيه لحصة حرة

Great tool for Help Desk/System Admintrator Professionals - Change Analysis Diagnostic tool أداة عظيمة لمساعدة مكتب / نظام admintrator المهنيين - تحليل تغير اداة تشخيص

If you enjoyed this post, make sure you اذا كنت تتمتع هذه الوظيفة ، تأكد انك subscribe to my RSS feed ار اس اس للاكتتاب بلدي الغذاء ! !

» Filed Under »المقدمة تحت IT Job Stuff انه عمل stuff

Related Posts الوظائف ذات الصلة

One Response to “VBS Script for System Administrators - How to backup Outlook email automatically in a login or logoff script” رد واحد على "vbs النصي لمديري النظام - كيفية الاحتياطيه التوقعات البريد الالكتروني تلقائيا في تسجيل الدخول او الانقطاع النصي"

  1. Jemas said on : Jemas قال علي :

    Like your script, for home user how can I modify it to do a backup to external hard drive on a daily basis. مثل النصي الخاص بك ، من اجل الوطن المستخدم كيف يمكنني تعديل على ان يفعل احتياطية على القرص الثابت الخارجية على اساس يومى. Thanks شكرا


    Please post your comments/suggestions! الرجاء تعليقاتكم وظيفة / اقتراحات!