1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Roaming profile + scripting

Discussion in 'Scripting & Programming' started by MAZDAN, Jun 1, 2004.

  1. MAZDAN

    MAZDAN Bit Poster

    11
    0
    9
    I have 1500 user accounts within an 4 different OU's. I am going to convert these accounts to Roaming profiles utilising folder redirection to share the load. The problem I have is I am going to have to go through each user account and set the profile path. Does anyone happen to have a script that would save me approx 1.5 days and a cramped hand.

    I am going to learn scripting, Honest It is a must.

    The task:-

    go through OU name 'intake year xxx' - go through each user and set the profile path to \\server\intake xxx\%Username%

    Any help will be really appreciated :wink:

    MAZDAN


    SEN MOD EDIT: Moved post to more appropriate Forum.
     
  2. Phoenix
    Honorary Member

    Phoenix 53656e696f7220 4d6f64

    5,726
    175
    221
    i could cook something up if its not that urgent
    i dont have anything to hand that does that specifically, and im moving tomorrow, so if its urgent you might want to hope someone else can help as i wont be back to any form of normality for a few days atleast!

    let me know if its not perticularly urgent

    should be doable with four simple WMI/ADSI script that read four text files containing the new paths
    the ADSI could read the contents of the OU, concanate them and parse the new value to them, its a bit more complex than that but thats the general idea, im not a scripting guru either and it could be done with one script by an expert :)
     
    Certifications: MCSE, MCITP, VCP
    WIP: > 0
  3. MAZDAN

    MAZDAN Bit Poster

    11
    0
    9
    Thanks for the offer Phoenix, nothing more stressful than moving mate :)
    I am going to need something as soon as I have 3 days to implement the new profiles. I am also going around 1500 computers configuring a standardised start menu within the all users profile + a few other maintenance tasks. I was thinking a script of some sort would save by backside as I am going to be pushed for time on this one. I work within a school environment and we will have 3000 children back in after Friday lol.

    I still think your move is more stressful though :)

    MAZDAN
     
  4. MAZDAN

    MAZDAN Bit Poster

    11
    0
    9
    Just a thought! As I only have 4 – 5 different OU’s containing users I could easily manually set the path within the script apposed to coding the script to read in files. I am sure this would be easier?

    Tell you what I have to learn this stuff. I know it will save me hours. If only you could do it in SQL LOL

    Any help would be most appreciated

    MAZDAN
     
  5. Phil
    Honorary Member

    Phil Gigabyte Poster

    1,680
    7
    87
    Hi MAZDAN

    I posted a script for something similar a while ago here. Only that one removed the profile. I don't have time right now but I'll take a look later and modify it for you.
     
    Certifications: MCSE:M & S MCSA:M CCNA CNA
    WIP: 2003 Upgrade, CCNA Upgrade
  6. MAZDAN

    MAZDAN Bit Poster

    11
    0
    9
    Phil, you are a star mate. I owe you one 'big time'

    Thanks a million

    MAZDAN
     
  7. MAZDAN

    MAZDAN Bit Poster

    11
    0
    9
    When you post it I take it I just need to set the OU name i.e. '1997 intake' and the profile path i.e. '\\server\share\1997 intake\%username%'

    Just confirm the script will understand what to do with %username%

    Thanks again

    MAZDAN
     
  8. AJ

    AJ Administrator Administrator

    6,771
    102
    221
    Try this Link.

    What I was trying to achieve was to change the roaming profile path in block of all users in an OU, seems you want to do the same thing. Again it was Phil who's the man and came up with the good. I have tried this in my test lab and it worked. I would test it out yourself first before you o ahead LIVE.
     
    Certifications: MCSE, MCSA (messaging), ITIL Foundation v3
    WIP: Looking at doing ..................
  9. MAZDAN

    MAZDAN Bit Poster

    11
    0
    9
    Fantastic thanks :) :) .

    Just gave it a try on my test server and got an error object not found. I take it this is because I have a sub OU's i.e.

    OU = Useraccounts
    - SubOU = Pupils
    - SubSubOu = intake 2000
    - SubSubOu = intake 1999
    - SubSubOu = intake 1998
    - SubOU = Staff
    - SubSubOU = Admin
    - SubSubOU = Curriculum

    I am sure it is a little tweek to the following line. Any ideas?

    'This line attaches to the OU
    Set colAccounts = GetObject("LDAP://ou=intake 2000,dc=weasrv01,dc=school,dc=wirral,dc=sch,dc=uk")

    Thanks again

    MAZDAN
     
  10. Phil
    Honorary Member

    Phil Gigabyte Poster

    1,680
    7
    87
    Based on the OU config you've given I would have thought the line should be

    Set colAccounts = GetObject("LDAP://ou=intake 2000,ou=pupils,ou=useraccounts,dc=weasrv01,dc=school,dc=wirral,dc=sch,dc=uk")

    HTH
     
    Certifications: MCSE:M & S MCSA:M CCNA CNA
    WIP: 2003 Upgrade, CCNA Upgrade
  11. MAZDAN

    MAZDAN Bit Poster

    11
    0
    9
    Yes that is the kitten, works a dream :D .......

    Thank you all sooooo much. you have really took the preasure off me.


    MAZDAN
    :lol: :lol: :lol:
     
  12. AJ

    AJ Administrator Administrator

    6,771
    102
    221
    No Charge MAZDAN :D
     
    Certifications: MCSE, MCSA (messaging), ITIL Foundation v3
    WIP: Looking at doing ..................

Share This Page

Loading...