Solved

Writing Scripts Client computers

Hello everyone,
I'm fresh out of college, thankfully I was able to land a job in the IT world. And I went computer networking. For the life of me I can't remember how to do a script. We just installed a windows 2012 server. And I'm wanting to write a script for the users. I want to do a drive where all there files go to. Including my documents, and favorites. Are the two things that get saved to the server.

Then I created a shared folder that has all the company files in it. HR type of stuff. Which i want that drive separate from there personal stuff. So one drive for personal files that they can only see. And one drive everyone can see. Could anyone help me out here? Please. I'll be very great full. I them to be able to sign into any computer and have them able to see and view there files like they usually do without any problems.
10 answers Last reply Best Answer
More about writing scripts client computers
  1. Do you have a domain? You can easily do this with group policy on a domain.

    Anyway if you create a script, then you could use the "net use" command to map the drives.

    http://technet.microsoft.com/en-us/library/bb490717.aspx
  2. ss202sl said:
    Do you have a domain? You can easily do this with group policy on a domain.

    Anyway if you create a script, then you could use the "net use" command to map the drives.

    http://technet.microsoft.com/en-us/library/bb490717.aspx


    Thank you for the replay. I do have a domain controller. Right now underneath the user account, if you go to profile, then underneath home folder, i select connect, assign H as the driver and i select the user folder to save the files in. But when I go to the client computer. I have to physically move the documents folder to the H drive. I can't add the location to the documents area because it says H isn't index right. I just wanted to run a Login Script for all the users. So that if the computer crashes on them. They can sign into another computer and still save their documents same way no matter computer they are now. And not have to go to the H and save their documents.

    And how would I do this in group policy? My school didn't go over that very well.
  3. To answer your question about the script. I would set a log-off script that would synchronize the documents folder to the H drive. Look up robocopy (you'd have to put it on every computer in the system32 dir) it's part of the 2003 admin tools pack. Robocopy will synchronize 2 folders. You could create a script to robocoy the documents folder to H:\documents. I think something this would work:

    Robocopy "%userprofile%\Documents" h:\documents


    Test this out to make sure it works.
    Here's an article for a GUI interface for robocopy - I use this

    http://technet.microsoft.com/en-us/magazine/2006.11.utilityspotlight.aspx
  4. ss20sl
    That would be to much of pain for me. My company has 80 computers.
  5. The script would be pushed out in group policy by the domain controller. You can script it to copy the robocopy.exe from the server to the local system 32 directory(this could be in a computer startup script that you only have running for a week or so to get it on all computers).

    Once that is done, you could set up the logon(or logoff) script to run everytime someone logs on that will copy their profile documents from that computer to the network.

    You shouldn't have to manually touch every computer to get this done.
  6. While you could write a script to perform RoboCopy as suggested by ss202sl simply by entering that command in Notepad and saving the file as a .bat, a much better solution would be to use the existing Folder Redirection technology through Group Policy. The settings available in Folder Redirection are provided here on TechNet. To move the data to the new location, ensure the setting to move the contents to the new location is set.

    As a new sysadmin, keep in mind the Springboard Series on TechNet. There you will find walkthroughs, tools, videos and resources for IT professionals that address the tasks and situations that are encountered as an IT pro working with the Windows Client.
  7. If you have a somewhat recent version of WMI on all your machines, I'd recommend using PowerShell scripts for logon/logoff or startup/shutdown scripts. PowerShell is really well thought-out, and highly functional.
  8. zarberg said:
    If you have a somewhat recent version of WMI on all your machines, I'd recommend using PowerShell scripts for logon/logoff or startup/shutdown scripts. PowerShell is really well thought-out, and highly functional.


    I would use Powershell. But I never learned Powershell, I will learn it when i further my education.
  9. Best answer
    CisloIT said:

    I would use Powershell. But I never learned Powershell, I will learn it when i further my education.

    With the information you provided, we are limited in understanding your needs. That said, I saw nothing in your original post or follow-up posts that requires any scripting in a Windows 2012 domain environment. On your file server, create a folder for users' "personal" or home drives (e.g. D:\Home). Share this folder and give the group Everyone Full Control share permissions. I recommend setting the folder's NTFS permissions as follows:

    Domain Admins (this folder, subfolders and files): Full Control
    Domain Users (this folder only): Traverse folder / execute file, List folder / read data

    On the domain controller or a domain-joined workstation with RSAT (remote server administration tools):
  10. @MotleyCrew Thank you. That will be very helpful.
Ask a new question

Read More

Computers College Business Computing