How to create and add a logon/logoff script to populate last user into the computer field in AD

Hi All,
Bit stuck here,
Not sure what forum to put this is as it involves different subjects,
I work in a Server 2008 RT environment and have access to Active Directory etc.
I saw this a few weeks ago - http://ivan.dretvic.com/2012/10/automatically-generate-description-field-for-computers-in-active-directory/
Now, I'm not particularly sure what to do here, I don't know how to create a group policy etc. How to implement it in a test environment etc. Never done this before.
Can somebody give me a step by step guide on literally everything that would be involved in this?
Or any links that may be able to help?
I basically want the AD to show who was the last user that logged into a specific client when the client named is searched for in the Computers OU, and if possible being able to pull the make/model and serial number from the client aswell.
If possible there should be a way of including this with the existing login script that we already have, how can I do this?
I've tried a few so far and got stuck, I have domain admin priveledges also.
Thanks,
Regards, Max.

Hi Max,
Please refer to the following article to learn how to create a logon/logoff script via GPO:
Assign User Logon Scripts
Assign User Logoff Scripts
As for the issues about script, this is the forum to discuss questions about driectory service, better to post your question to the forum for Script:
http://social.msdn.microsoft.com/Forums/en-US/home?forum=scripting
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or
learn from your interaction with us.
Thank you for your understanding.
Regards,
Lany Zhang

Similar Messages

  • How to create and add table type to a DDIC Structure in sap 3.1H

    How to create and add table type to a DDIC Structure in sap 3.1H

    How to create and add table type to a DDIC Structure in sap 3.1H

  • Hello! I was on my Mac and then I clicked on iTunes. Then I clicked on iTunes, and accidentally removed my device from my Mac, how can I get it back? Also when I plug my iPod into the computer, it downloads everything, how can I stop this. please help!thx

    Hello! I was on my Mac and then I clicked on iTunes. Then I clicked on Account, and accidentally removed my device from my Mac, how can I get it back? Also when I plug my iPod into the computer, it downloads everything that is on my computer, how can I stop this. please help! please help!!!!!!thank you

    Is the iPod still singed into the account isn Settings>iTunes and App Stores and SettingsZ>iCloudl? If it is then I would not be concerned.
    Also see:
    iTunes Store: Associating a device or computer to your Apple ID
    since you may have started the 90 day window.
    For the other "problem", go to iTunes>Preferences>Devices and check the box that says Prevent iPod....automatically syncing.

  • My iPod won't turn on the battery is fully charged and iTunes doesn't recognize it when I hook it into the computer

    My iPod touch won't turn on it is fully charged and when I plug it into the computer iTunes doesn't recognize it how can I fix this?

    Seen this?
    How to reset iPod - Apple Support

  • How to create and add a custom control in VS2013 Community

    Hello everyone,
    Could you please help me to create a control in visual c++, and then add it in the toolbox of a windows form application?
    I tried to create the control in that way:
    Create a class library, then add to it a CLR user control, then compile e created my .dll.
    I created a new CLR Project, added a form and all the necessary to start it, compiled and started form without problem.
    Then I add the reference of my custom control .dll (right click, add reference...)
    At this point no way to put it in Toolbox, nor with "chose item", nor in any other way.
    Could you please help me?
    Thank you

    Is the class public (“public ref class MyUserControl”) and did you open the Form Designer before checking the toolbox? The user controls should appear automatically after rebuilding the solution.

  • How to create and add an XML node at run time ?

    Hello and thanks to All of You i've been learning a lot since i use this forum..
    I'm having another problem, !!! i would like that my executeShape function insert a new XMLChildnode called "adverts"  to my Pages:XML via the evenListener of the execute_bt. I tryed copying the nodes and it works but it copy a blank "adverts" node in betwen each node copied. so i tryed with appendChild, but it works only once, then it say error. so i tryed with inserChildafter or inserChildbefore but this one doesnt work at all because "advert" doesnt exist. I understand why all my suggestions does'nt work (copied or append or insertchild), but i dont figure out how to get what i want . i love AS but im no advance in enought..
    My XML structure that I want is quite simple : i just want that every time I press the execute_bt, a new "adverts" is added to the Pages XML
    <Pages>
      <page id="Page1">
        <adverts>
          <adfile>Null</adfile>
          <adwidth>1</adwidth>
          <adheight>50</adheight>
          <adposx>514</adposx>
          <adposy>200</adposy>
        </adverts>
       <adverts>
           <adfile>Null</adfile>
           <adwidth>1</adwidth>
           <adheight>50</adheight>
           <adposx>514</adposx>
           <adposy>200</adposy>
         </adverts>
      </page>
    </Pages>
    Here is the code of the clip:
    execute_bt.addEventListener(MouseEvent.MOUSE_UP,executeShape);
    var _adWidth:uint=uint(Adwidth.text);
    var _adHeight:Number=Number(Adheight.text);
    var _adFileName:String=String(adFileName.text);
    var _adpage:String=String(PageInstanceName.text);
    var _adPosx:Number;
    var _adPosy:Number;
    var _adArrayID:int;
    var currentColor:Number;
    var i:int=0;
    var element:int=0;
    var Pages:XML=<Pages />;
    Pages.page = <page />;
    Pages.page.@id=_adpage;
    var boldText:TextFormat = new TextFormat();
    with (boldText) {
        font="Verdana";
        size=10;
        color=0xFFFFFF;
        bold=false;
        multiline=true;
    function executeShape(evt:MouseEvent):void {
        _adArrayID=i;
        currentColor=Adcolor.selectedColor;
        var Container:MovieClip= new MovieClip();
        Container.name=adFileName.text;
        Container.id=_adArrayID;
        var gr:Graphics=Container.graphics;
        gr.lineStyle();
        gr.beginFill(Adcolor.selectedColor, 2);
        gr.drawRect(0,0,(uint(Adwidth.text)*70),Number(Adheight.text)*1.68);
        gr.endFill();
        var Lbl:TextField = new TextField();
        Lbl.x=Lbl.y=1;
        Lbl.autoSize=TextFieldAutoSize.LEFT;
        Lbl.multiline=Lbl.wordWrap=true;
        Lbl.width=(uint(Adwidth.text)*65);
        Lbl.text=String(adFileName.text);
        Lbl.setTextFormat(boldText);
        var btn:Sprite=new CreateRoundRectButton(20,20,5,0,0xFFFFFF,"X",0xFF0000);
        btn.name="delete";
        btn.x=9;
        btn.y=50;
        addChild(Container);
        Container.x=514;
        Container.y=200;
        Container.addChild(Lbl);
        Container.addChild(btn);
        index.text=String(Container.id);
        file.text=String(Container.name);
        widht.text=String(uint(Adwidth.text));
        heigth.text=String(Number(Adheight.text));
        posx.text=String(Container.x);
        posy.text=String(Container.y);   
        Pages.page.appendChild(<adverts />);
       Pages.page.adverts.appendChild(<adfile />);
        Pages.page.adverts.appendChild(<adwidth />);
        Pages.page.adverts.appendChild(<adheight />);
        Pages.page.adverts.appendChild(<adposx />);
        Pages.page.adverts.appendChild(<adposy />);
        Pages.page.adverts.adfile=String(Container.name);
        Pages.page.adverts.adwidth=String(uint(Adwidth.text));
        Pages.page.adverts.adheight=String(Number(Adheight.text));
        Pages.page.adverts.adposx= String(Container.x);
        Pages.page.adverts.adposy=String(Container.y);
       //var templist:XMLList= Pages.page.adverts.copy();
        //templist[0].adfile = String(Container.name);
        //templist[0].adwidth = String(uint(Adwidth.text));
        //templist[0].adheight = String(Number(Adheight.text));
        //templist[0].adposx = String(Container.x);
        //templist[0].adposy = String(Container.y);
        //Pages.page.appendChild(templist);
        //Pages.page.insertChildAfter(Pages.page.adverts[0], templist);
        trace(Pages);
        btn.addEventListener(MouseEvent.CLICK, deleteme, false, 0, true);
        Container.addEventListener(MouseEvent.MOUSE_DOWN,StartDrag);
        Container.addEventListener(MouseEvent.MOUSE_UP,StopDrag);
        i++;

    Sorry , i Found the solution......:
    var Pages:XML=<Pages />;
    Pages.page = <page />;
    Pages.page.@id=_adpage;
    var boldText:TextFormat = new TextFormat();
    with (boldText) {
        font="Verdana";
        size=10;
        color=0xFFFFFF;
        bold=false;
        multiline=true;
    function executeShape(evt:MouseEvent):void {
        _adArrayID=i;
        currentColor=Adcolor.selectedColor;
        var Container:MovieClip= new MovieClip();
        Container.name=adFileName.text;
        Container.id=_adArrayID;
        var gr:Graphics=Container.graphics;
        gr.lineStyle();
        gr.beginFill(Adcolor.selectedColor, 2);
        gr.drawRect(0,0,(uint(Adwidth.text)*70),Number(Adheight.text)*1.68);
        gr.endFill();
        var Lbl:TextField = new TextField();
        Lbl.x=Lbl.y=1;
        Lbl.autoSize=TextFieldAutoSize.LEFT;
        Lbl.multiline=Lbl.wordWrap=true;
        Lbl.width=(uint(Adwidth.text)*65);
        Lbl.text=String(adFileName.text);
        Lbl.setTextFormat(boldText);
        var btn:Sprite=new CreateRoundRectButton(20,20,5,0,0xFFFFFF,"X",0xFF0000);
        btn.name="delete";
        btn.x=9;
        btn.y=50;
        addChild(Container);
        Container.x=514;
        Container.y=200;
        Container.addChild(Lbl);
        Container.addChild(btn);
        index.text=String(Container.id);
        file.text=String(Container.name);
        widht.text=String(uint(Adwidth.text));
        heigth.text=String(Number(Adheight.text));
        posx.text=String(Container.x);
        posy.text=String(Container.y);   
        var adverts:XML= new XML;
        adverts=<adverts />;
        adverts.adfile=<adfile />;
        adverts.adwidth=<adwidth />;
        adverts.adheight=<adheight />;
        adverts.adposx=<adposx />;
        adverts.adposy=<adposy />;
        adverts.adfile=String(Container.name);
        adverts.adwidth=String(uint(Adwidth.text));
        adverts.adheight=String(Number(Adheight.text));
        adverts.adposx= String(Container.x);
        adverts.adposy=String(Container.y);
        Pages.page.appendChild(adverts);
        trace(adverts);
        btn.addEventListener(MouseEvent.CLICK, deleteme, false, 0, true);
        Container.addEventListener(MouseEvent.MOUSE_DOWN,StartDrag);
        Container.addEventListener(MouseEvent.MOUSE_UP,StopDrag);
        i++;

  • How to create and add a new panel(under commenting list)?

    Hi,
    I'm basically a vc++ developer and new to this acrobat X.
    My requirement is to add a new subpanel under the commenting list.(Toolpane(right hand side)-> comment->commentinglist))
    I'm unable to find the soultion.Please help me in this.
    regards
    lavanya

    Is the class public (“public ref class MyUserControl”) and did you open the Form Designer before checking the toolbox? The user controls should appear automatically after rebuilding the solution.

  • When we plug our ipods or ipad into the computer it dosent show up in itunes and wont sync, when we plug our ipods or ipad into the computer it dosent show up in itunes and wont sync

    our devices dont show up in itunes anymore,and the only thing it will do is import the pictures and videos since we updated  to the new itunes

    Update Server
    Try:
    - Powering off and then back on your router.
    - iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server
    - Change the DNS to either Google's or Open DNS servers
    Public DNS — Google Developers
    OpenDNS IP Addresses
    - Try on another computer/network
    - Wait if it is an Apple problem

  • How to copy songs that's already in the ipod into the computer hard disk?

    I had some "music" mp3 files, so I put them into my ipod by using iTune. I pick a mp3 file and I drop it into the "MUSIC" section under the "iPOD" section, in iTune. After this, I didn't make any backup, for exemple, place them into the iTUNE's "MUSIC LIBARY" or copy them, place them into a file and store them into the computer's hard disk, because I only had one computer and I don't want to make to much spaces into the computer's hard disk, because the computer's hard disk did not have alot of memories available to use, it's almost fully loaded. Then I discovered that "I could't copy the existence files from the iPod and put them into the computer's hard disk", and I found this is ridiculous. So... can someone please telle me "how to copy or take the mp3 files out from the iPod and place theme into the computer's hard disk?"

    So... can someone please telle me "how to copy or take the mp3 files out from the iPod and place theme into the computer's hard disk?"
    To prevent auto sync, connect the iPod whilst holding down the 'control+shift' keys and do not let them go until your iPod appears in iTunes.
    If you see a message that your iPod is associated with a different library and asks if you want to link to new one, make sure you press "Cancel".
    If you should click on "Erase and Sync" will erase all the content currently on your iPod and it will be replaced with the content of the iTunes library you just connected to.
    When you've pressed cancel your iPod should appear in the iTunes source list under "devices" and allow you to change the update setting to manage the iPod content manually, and that will let you use your iPod for the time being without the risk of accidentally erasing the contents.
    Then do any of the following to transfer your music from iPod back to the computer/iTunes.
    For iTunes version 7 or later, then you can transfer purchased iTunes store music from the iPod to an authorized computer by using the "file/transfer purchases from iPod" menu. Note that the maximum of 5 authorized computers applies here.
    Find out how to do that here.
    How to copy iTunes purchases from an iPod or iPhone to a computer.
    For all other non purchased content (your own CDs etc), check out the instructions/suggestions here.
    Music from iPod to computer (using option 2). This a manual method using "hidden folders" and although it works, it is a little more involved than other methods.
    Much easier ways are to use one of the many 3rd party programs that copy music from the iPod to the computer.
    One of the most recommended is Yamipod. This is a free program that transfers music from iPod back to the computer. However, it does not transfer playcounts/ratings etc.
    Other free programs are Pod Player, SharePod and Floola and iDump.
    If you want to recover just the structure of playlists from the iPod (and not the actual song files themselves), there's iRepo for Windows. which I understand has this feature along with all the standard features for these programs.
    iPodRip also has the feature enabling you to reconstruct playlists.
    There is also CopyTrans. This does preserve ratings/playcounts etc if those are important to you but this program is not free. It also supports video transfer.
    More information is contained here.
    Copying content from your iPod to your computer - The Definitive Guide.

  • Cannot create and add a new entry to LDAP

    Hi,
    I'm pretty new at LDAP and JNDI, i've been trying to create and add a new entry to the directory but somehow it's not working.
    here is my code and I would appreciate it if someone can help.
    import java.util.Hashtable;
    import javax.naming.ldap.*;
    import javax.naming.directory.*;
    import javax.naming.*;
    import javax.net.ssl.*;
    import java.io.*;
    public class Newuser
         public static void main (String[] args)
              //LDAPEntry myEntry = new LDAPEntry();
              Hashtable<String, String> env = new Hashtable<String, String>(11);
              String adminName = "CN=ldap_admin,o=JNDITutorial,dc=img,dc=org";
              String adminPassword = "secret";
              env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
              //set security credentials, note using simple cleartext authentication
              env.put(Context.SECURITY_AUTHENTICATION,"simple");
              env.put(Context.SECURITY_PRINCIPAL,adminName);
              env.put(Context.SECURITY_CREDENTIALS,adminPassword);
              //connect to my domain controller
              env.put(Context.PROVIDER_URL, "ldap://localhost:389/o=JNDITutorial,dc=img,dc=org");
                   // Create the initial directory context
                   //JNDILDAPConnectionManager jndiManager = new JNDILDAPConnectionManagerImpl();
                  try{
                       DirContext ctx = new InitialDirContext(env);
                        System.out.println("Connection to LDAP server done" );
                       final String groupDN ="ou=people,o=JNDITutorial,dc=img,dc=org";
                      //DirContext dirCtx = jndiManager.getLDAPDirContext();
                      People people = new People("Thiru","Thiru","Thiru Ganesh","Ramalingam","ou=people","[email protected]");
                      // The Common name must be equal in Attributes common Name
                      ctx.bind("cn=Thiru," + groupDN, people);
                      System.out.println("** Entry added **");
                      //jndiManager.disConnectLDAPConnection(ctx);
                  }catch(NamingException exception){
                      System.out.println("**** Error ****");
                      exception.printStackTrace();
                      System.exit(0);
    }here is the Object class People that i'm trying to instantiate
    public class People implements DirContext {
         public People(String uid,String cn,String givenname,String sn,String ou,String mail) {
        BasicAttributes myAttrs = new BasicAttributes(true);  //Basic Attributes
        Attribute objectClass = new BasicAttribute("objectclass"); //Adding Object Classes
        objectClass.add("inetOrgPerson");
        /*objectClass.add("organizationalPerson");
        objectClass.add("person");
        objectClass.add("top");*/
        Attribute ouSet = new BasicAttribute("ou");
        ouSet.add("people");
        ouSet.add(ou);
        myAttrs.put(objectClass);
        myAttrs.put(ouSet);
        myAttrs.put("cn",cn);
        myAttrs.put("sn",sn);
        myAttrs.put("mail",mail);
    ...the message i keep getting is:
    javax.naming.directory.SchemaViolationException: [LDAP: error code 65 - entry has no objectClass attribute]
    the thing is that I can create and add a new entry in openLDAP from the console and it works.
    and here is how I proceed
    I create a text file: new.txt
    dn:cn=Hamido Saddo,ou=People,o=JNDITutorial,dc=img,dc=org
    cn:Hamido Saddo
    mail:[email protected]
    telephonenumber:3838393038703
    sn:hamdio
    objectclass:top
    objectclass:person
    objectclass:organizationalPerson
    objectclass:inetOrgPersonand i use this command to add the entry:
    ldapadd -D "cn=ldap_admin,O=JNDITutorial,dc=img,dc=org" -W -f new.txtand everything works, i get no errors.
    does anyone has a clue maybe???

    You must have an IMAP email account in order to add additional folders on the iPad mail app.
    If you go to your email account in the Mail app and look at the window where your inbox, trash folder and sent folder are - if there is an Edit button at the top of the window - tap that and then tap Add Mailbox at the bottom.
    If the Edit button is not there - you cannot create folders on the iPad. Your email account is not IMAP. Only IMAP email accounts can create folders on the iPad. Any folders that you would already have in an IMAP account would sync to the device as well.

  • How to Create and Define New faults to be used inside our BPEL Process

    Hi All,
    I have created a new BPEL process but unable to add fault handling messages which I'm unable to do because I'm not having any
    experience in creating my own custom fault or runtime faults.
    Can anybody can share any URLS of how to create and where to define these things in BPEL Process.
    Expecting a reply from ASAP. very urgent for me.
    Regards,
    CH

    Hi Arik,
    I opening in JDeveloper 11.1.1.2 but it is asking for migrations but not all migrating and unable to see the project.
    By seeing at the logs it is saying that upgrade failed.
    Please can you share any other URL other than this.
    Regards,
    CH

  • How to create and manage the log file

    Hi,
    I want to trace and debug the program process.
    I write the code for creating log file and debugging the process.
    But i am not able get the result.
    please help me how to create and manage the log file.
    Here i post sample program
    package Src;
    import java.io.*;
    import org.apache.log4j.*;
    import java.util.logging.FileHandler;
    public class Mylog
         private static final Logger log = Logger.getLogger("Mylog.class");
         public static void main(String[] args) throws Exception {
         try {
           // Create an appending file handler
            boolean append = true;
            FileHandler handler = new FileHandler("debug.log", append);
            // Add to the desired logger
            Logger logger = Logger.getLogger("com.mycompany");
            System.out.println("after creating log file");     
              catch (IOException e)
                   System.out.println("Sys Err");
            }Please give the your valuable suggesstion... !
    Thanks
    MerlinRoshina

    Just i need to write a single line in log file.

  • How to create and drop partitions automatically?

    How to create and drop partitions automatically?
    The environment is Oracle 10g(10.2.0.3) on the RHEL4.0 system.
    I want to partition the MESSAGE table by date (NUMTODSINTERVAL(1,'DAY') ). One partition per day. Because the table is huge, only 2 partitions (today and yesterday's data) are necessary to be kept online. All the partitions that earlier than the previous day will be backed up and then dropped. I want to make the partition creating and dropping jobs run automatically. How to do it?
    Thank you

    junez wrote:
    How to create and drop partitions automatically?
    The environment is Oracle 10g(10.2.0.3) on the RHEL4.0 system.
    I want to partition the MESSAGE table by date (NUMTODSINTERVAL(1,'DAY') ). One partition per day. Because the table is huge, only 2 partitions (today and yesterday's data) are necessary to be kept online. All the partitions that earlier than the previous day will be backed up and then dropped. I want to make the partition creating and dropping jobs run automatically. How to do it?With 11g, new partitions can automatically be created.
    With 10g, you need to do that yourself. I prefer to create a "buffer" of future partitions - in case the job whose task it is to add new partitions gets held up or stuck. Or the job queue is full due to some problem and it does not get the chance to execute in time.
    I dislike your partitioning criteria. I prefer using the date directly and not mangling it to something else. If a specific day has a large volume of data, then another option is to use hourly date ranged partitions. With local partitioned indexes and the date time range used for querying, this can be quite effective performance wise.
    As for partitioning maintenance - I use a custom written partitionManager PL/SQL package that provides an interface for adding daily and hourly partitions to a table. Input parameters are for example name of the table, start date and the number of partitions to add. Similarly it provides interfaces for aging partitions - again by specifying a table and a date-time to use as the starting point, back into time, for removing old partitions.
    I typically call this code from the actual application code itself - so before a new partition will be used for example, the app code will first ensure that it has a partition to use. This is safer than a separate job as the dependency is resolved where and when it is needed - and not done as a separate task.
    For example - you should have a procedure/package that provides an app the means to log a message into your MESSAGE table. As part of an autonomous transaction, this procedure can check if the required partition exists, before attempting to insert a message into the table.
    Where this approach is not possible, a DBMS_JOB can be used to create future partitions - but as I mentioned, rather have it add a bunch of future (empty) partitions in case something goes pear shape with the job mechanism.

  • Hi everyone,,i bought a used iphone 5 with iOs 7.0.3. i want to delete the icloud account and add mine. I have sent an e-mail to the current account being used in my iphone. How can i get rid of this account plzzz help me out

    Hi everyone,,i bought a used iphone 5 with iOs 7.0.3. i want to delete the icloud account and add mine. I have sent an e-mail to the current account being used in my iphone. How can i get rid of this account plzzz help me ou

    no i called the store owner from whom i bought it. he was like i will check in records and if there is something i will let u know...he was like send an e-mail its better so if it was stolen so the shopkeeper wouldnt let me to e-mail to the owner

  • How to create and install a toolbar to a browser using java

    Hi all,
    Can any one guide me about how to create and install toolbar to a browser using java ??
    please any one help me about this,i am not getting any idea about this..
    Thanks and Regards
    Sandesh S

    I doubt you can. Those browser toolbars are done by implementing to an API provided by the browser. That API, I don't believe, is provided via Java. But of course, that would be entirely up to the browser, not Java.

Maybe you are looking for

  • My current version of Firefox (4.0.1) will not update. How can i fix it?

    Hi, My current version of firefox (4.0.1) won't update. When the update-window pops up i klick on "Update firefox" but it just keeps on loading with the blue and white stripes. This has happend before and what I have done then is I have just installe

  • Replace Text with Formatting

    I need to replace every instance of the word Forward! with Forward! in italics. I have not found a way to do that...Any Ideas? Thanks JackL Captivate 7 - Windows 7

  • Ni-daq

    Adquirimos un modulo scxi-1125 para reemplazarlo por el scxi-1120 en nuentro sistema de adquicision de selñales formado por una daq at-mio-16-de10, pero la versión del ni-daq (6.1) no soporta al modulo scxi-1125, debido a esto cambiamos de version de

  • Web Help - HTML Pages

    Dear All, I have created a web help project. The project is working fine. But I have been trying to do some R&D. In the project's WebHelp folder (with in SSL folder) we have all the HTML files. The main HTML page when opened from there opens up with

  • Problems loading all my music from Window's External HD

    Hi everyone: I've been beating my head into a wall over this... I burned all of my CD's onto an external HD a couple years ago on my PC. I recently got a MAC and love it! However, I can't get all of the music from that HD to copy into my iTunes libra