| Home | Register | Members | Search | Windows Vista Tips | File Database | Links |
![]() |
| Thread Tools | Display Modes |
|
|
|
| |
|
Pegasus \(MVP\)
Guest
Posts: n/a
|
"Jmnts" <> wrote in message news:F0FA7F70-7CC0-4CB6-A243-... > Hi everyone, > I have 2 questions I hope that script experts could help me. > > 1- > I've a huge task to complete. > > It's my job to get a list among dozens of servers (2000 and 2003) a list > of > the users that logged on those servers (the servers have local and domain > users) and related properties especially: > > -User Name > -Description > -Last time that the user logged on that server (this is very important, > and > remember that I've local users and domain users that logs on the servers, > I > only need to know the last time that they logged on that particular > server). > -State (enabled or disabled) > > - I don't have much experience with scripting but I can't find nothing > that > has this particular needs. > > 2- > I use a batch file with xcopy that copies files and folders between > computers/servers, however when copying "for example" a directory, with > always ask me for destination F=File or D=Directory, is there any way to > provide the answer automatically > > Xcopy \\computer\share\Directory1 \\Computer\share\ (this is a directory) > /S > > Thank you all for the help that you can provide. > 1. There is a lot of relevant stuff on Richard Mueller's site: http://www.rlmueller.net/products.htm http://www.rlmueller.net/freecode2.htm http://www.rlmueller.net 2. You have a couple of options: a) Add a trailing backslash: xcopy /s "Source Folder" "Destination Folder\" b) Pipe a "D" into the command: echo D|xcopy /s "Source Folder" "Destination Folder" Note that xcopy.exe is now deprecated. If fails occasionally on large jobs. Use robocopy instead. |
|
|
|
|
|||
|
|||
|
Jmnts
Guest
Posts: n/a
|
Hi Pegasus you're very helpfull.
Although the rlmueller is an excellent site with lots of script solutions, I cannot find anything to my particular scenario!!! I need to run the script against the servers and take all users info that logged on that server, last time they logged, description, if is a local user or domain user!!! Do you think that is possible with script? I already found some samples (WMI) I downloaded the WMI code creator and scriptomatic and I used the Win32_UserAccount, but this doesn't give me the last time that they logged on? I'm starting going crazy with this... ![]() For example I also nee to get software installed on those servers, again I used scriptomatic to create a script with Win32_Product, guess what?? Not all installed software is returned?? Why? I did a test on a server with SQL installed and the SQL wasn't listed?? Perhaps I'm using the wrong classes I don't know... All I know is that I need the list for all these tasks and I have nothing so far... Thank you for your time. "Pegasus (MVP)" wrote: > > "Jmnts" <> wrote in message > news:F0FA7F70-7CC0-4CB6-A243-... > > Hi everyone, > > I have 2 questions I hope that script experts could help me. > > > > 1- > > I've a huge task to complete. > > > > It's my job to get a list among dozens of servers (2000 and 2003) a list > > of > > the users that logged on those servers (the servers have local and domain > > users) and related properties especially: > > > > -User Name > > -Description > > -Last time that the user logged on that server (this is very important, > > and > > remember that I've local users and domain users that logs on the servers, > > I > > only need to know the last time that they logged on that particular > > server). > > -State (enabled or disabled) > > > > - I don't have much experience with scripting but I can't find nothing > > that > > has this particular needs. > > > > 2- > > I use a batch file with xcopy that copies files and folders between > > computers/servers, however when copying "for example" a directory, with > > always ask me for destination F=File or D=Directory, is there any way to > > provide the answer automatically > > > > Xcopy \\computer\share\Directory1 \\Computer\share\ (this is a directory) > > /S > > > > Thank you all for the help that you can provide. > > > > 1. There is a lot of relevant stuff on Richard Mueller's site: > http://www.rlmueller.net/products.htm > http://www.rlmueller.net/freecode2.htm > http://www.rlmueller.net > > 2. You have a couple of options: > a) Add a trailing backslash: > xcopy /s "Source Folder" "Destination Folder\" > b) Pipe a "D" into the command: > echo D|xcopy /s "Source Folder" "Destination Folder" > Note that xcopy.exe is now deprecated. If fails occasionally on large jobs. > Use robocopy instead. > > > |
|
|
|
|
|||
|
|||
|
Al Dunbar
Guest
Posts: n/a
|
"Pegasus (MVP)" <> wrote in message news:... > > "Jmnts" <> wrote in message > news:F0FA7F70-7CC0-4CB6-A243-... >> Hi everyone, >> I have 2 questions I hope that script experts could help me. >> >> 1- >> I've a huge task to complete. >> >> It's my job to get a list among dozens of servers (2000 and 2003) a list >> of >> the users that logged on those servers (the servers have local and domain >> users) and related properties especially: >> >> -User Name >> -Description >> -Last time that the user logged on that server (this is very important, >> and >> remember that I've local users and domain users that logs on the servers, >> I >> only need to know the last time that they logged on that particular >> server). >> -State (enabled or disabled) >> >> - I don't have much experience with scripting but I can't find nothing >> that >> has this particular needs. >> >> 2- >> I use a batch file with xcopy that copies files and folders between >> computers/servers, however when copying "for example" a directory, with >> always ask me for destination F=File or D=Directory, is there any way to >> provide the answer automatically >> >> Xcopy \\computer\share\Directory1 \\Computer\share\ (this is a >> directory) >> /S >> >> Thank you all for the help that you can provide. >> > > 1. There is a lot of relevant stuff on Richard Mueller's site: > http://www.rlmueller.net/products.htm > http://www.rlmueller.net/freecode2.htm > http://www.rlmueller.net > > 2. You have a couple of options: > a) Add a trailing backslash: > xcopy /s "Source Folder" "Destination Folder\" > b) Pipe a "D" into the command: > echo D|xcopy /s "Source Folder" "Destination Folder" c) the /I switch tells xcopy do assume that a non-existent destination is a folder. > Note that xcopy.exe is now deprecated. If fails occasionally on large > jobs. Use robocopy instead. I heartily agree. /Al |
|
|
|
|
|||
|
|||
|
Al Dunbar
Guest
Posts: n/a
|
"Jmnts" <> wrote in message news:942C7AE6-29F6-4AF5-8FD7-... > Hi Pegasus you're very helpfull. > > Although the rlmueller is an excellent site with lots of script solutions, > I > cannot find anything to my particular scenario!!! Very often you will never find the exact solution to a problem - unless someone else has had the exact problem before. Rather, you need to understand information such as found on Richard's site, and figure out how to adapt it to your situation. > I need to run the script > against the servers and take all users info that logged on that server, > last > time they logged, description, if is a local user or domain user!!! Whether or not this can be done may depend on whether or not the information has been logged in the past. You may need to enable some sort of auditing to be able to do this in the future. Alternately, you could look at the date of the NTUSER.DAT file in each profile. I find that in our environment this is not always accurate. > Do you think that is possible with script? Yes - but only if the information is there somewhere. > I already found some samples > (WMI) I downloaded the WMI code creator and scriptomatic and I used the > Win32_UserAccount, but this doesn't give me the last time that they logged > on? > > I'm starting going crazy with this... ![]() > > For example I also nee to get software installed on those servers, again I > used scriptomatic to create a script with Win32_Product, guess what?? Not > all > installed software is returned?? Why? I did a test on a server with SQL > installed and the SQL wasn't listed?? I would suggest you start a different discussion thread on this other unrelated issue, as combining the two issues in one thread is likely to prove counterproductive. /Al > Perhaps I'm using the wrong classes I don't know... All I know is that I > need the list for all these tasks and I have nothing so far... > > Thank you for your time. > > "Pegasus (MVP)" wrote: > >> >> "Jmnts" <> wrote in message >> news:F0FA7F70-7CC0-4CB6-A243-... >> > Hi everyone, >> > I have 2 questions I hope that script experts could help me. >> > >> > 1- >> > I've a huge task to complete. >> > >> > It's my job to get a list among dozens of servers (2000 and 2003) a >> > list >> > of >> > the users that logged on those servers (the servers have local and >> > domain >> > users) and related properties especially: >> > >> > -User Name >> > -Description >> > -Last time that the user logged on that server (this is very important, >> > and >> > remember that I've local users and domain users that logs on the >> > servers, >> > I >> > only need to know the last time that they logged on that particular >> > server). >> > -State (enabled or disabled) >> > >> > - I don't have much experience with scripting but I can't find nothing >> > that >> > has this particular needs. >> > >> > 2- >> > I use a batch file with xcopy that copies files and folders between >> > computers/servers, however when copying "for example" a directory, with >> > always ask me for destination F=File or D=Directory, is there any way >> > to >> > provide the answer automatically >> > >> > Xcopy \\computer\share\Directory1 \\Computer\share\ (this is a >> > directory) >> > /S >> > >> > Thank you all for the help that you can provide. >> > >> >> 1. There is a lot of relevant stuff on Richard Mueller's site: >> http://www.rlmueller.net/products.htm >> http://www.rlmueller.net/freecode2.htm >> http://www.rlmueller.net >> >> 2. You have a couple of options: >> a) Add a trailing backslash: >> xcopy /s "Source Folder" "Destination Folder\" >> b) Pipe a "D" into the command: >> echo D|xcopy /s "Source Folder" "Destination Folder" >> Note that xcopy.exe is now deprecated. If fails occasionally on large >> jobs. >> Use robocopy instead. >> >> >> |
|
|
|
|
|||
|
|||
|
Jmnts
Guest
Posts: n/a
|
Ok thank you for your response.
Let me refrase, to you know any script to run on a given server that get a list of domain users that logged on that server? And from that list get the last logon that they did? "Al Dunbar" wrote: > > "Jmnts" <> wrote in message > news:942C7AE6-29F6-4AF5-8FD7-... > > Hi Pegasus you're very helpfull. > > > > Although the rlmueller is an excellent site with lots of script solutions, > > I > > cannot find anything to my particular scenario!!! > > Very often you will never find the exact solution to a problem - unless > someone else has had the exact problem before. Rather, you need to > understand information such as found on Richard's site, and figure out how > to adapt it to your situation. > > > I need to run the script > > against the servers and take all users info that logged on that server, > > last > > time they logged, description, if is a local user or domain user!!! > > Whether or not this can be done may depend on whether or not the information > has been logged in the past. You may need to enable some sort of auditing to > be able to do this in the future. > > Alternately, you could look at the date of the NTUSER.DAT file in each > profile. I find that in our environment this is not always accurate. > > > Do you think that is possible with script? > > Yes - but only if the information is there somewhere. > > > I already found some samples > > (WMI) I downloaded the WMI code creator and scriptomatic and I used the > > Win32_UserAccount, but this doesn't give me the last time that they logged > > on? > > > > I'm starting going crazy with this... ![]() > > > > For example I also nee to get software installed on those servers, again I > > used scriptomatic to create a script with Win32_Product, guess what?? Not > > all > > installed software is returned?? Why? I did a test on a server with SQL > > installed and the SQL wasn't listed?? > > I would suggest you start a different discussion thread on this other > unrelated issue, as combining the two issues in one thread is likely to > prove counterproductive. > > /Al > > > > Perhaps I'm using the wrong classes I don't know... All I know is that I > > need the list for all these tasks and I have nothing so far... > > > > Thank you for your time. > > > > "Pegasus (MVP)" wrote: > > > >> > >> "Jmnts" <> wrote in message > >> news:F0FA7F70-7CC0-4CB6-A243-... > >> > Hi everyone, > >> > I have 2 questions I hope that script experts could help me. > >> > > >> > 1- > >> > I've a huge task to complete. > >> > > >> > It's my job to get a list among dozens of servers (2000 and 2003) a > >> > list > >> > of > >> > the users that logged on those servers (the servers have local and > >> > domain > >> > users) and related properties especially: > >> > > >> > -User Name > >> > -Description > >> > -Last time that the user logged on that server (this is very important, > >> > and > >> > remember that I've local users and domain users that logs on the > >> > servers, > >> > I > >> > only need to know the last time that they logged on that particular > >> > server). > >> > -State (enabled or disabled) > >> > > >> > - I don't have much experience with scripting but I can't find nothing > >> > that > >> > has this particular needs. > >> > > >> > 2- > >> > I use a batch file with xcopy that copies files and folders between > >> > computers/servers, however when copying "for example" a directory, with > >> > always ask me for destination F=File or D=Directory, is there any way > >> > to > >> > provide the answer automatically > >> > > >> > Xcopy \\computer\share\Directory1 \\Computer\share\ (this is a > >> > directory) > >> > /S > >> > > >> > Thank you all for the help that you can provide. > >> > > >> > >> 1. There is a lot of relevant stuff on Richard Mueller's site: > >> http://www.rlmueller.net/products.htm > >> http://www.rlmueller.net/freecode2.htm > >> http://www.rlmueller.net > >> > >> 2. You have a couple of options: > >> a) Add a trailing backslash: > >> xcopy /s "Source Folder" "Destination Folder\" > >> b) Pipe a "D" into the command: > >> echo D|xcopy /s "Source Folder" "Destination Folder" > >> Note that xcopy.exe is now deprecated. If fails occasionally on large > >> jobs. > >> Use robocopy instead. > >> > >> > >> > > > |
|
|
|
|
|||
|
|||
|
Al Dunbar
Guest
Posts: n/a
|
"Jmnts" <> wrote in message news:CF9127BE-235C-4E8B-8237-... > Ok thank you for your response. > > Let me refrase, to you know any script to run on a given server that get a > list of domain users that logged on that server? I believe there to be such scripts. I tend to use one of the pstools utilities which is designed to do that very thing: http://technet.microsoft.com/en-us/s.../bb897545.aspx > And from that list get the > last logon that they did? As I recall, psloggedon does that as well. /Al > > > "Al Dunbar" wrote: > >> >> "Jmnts" <> wrote in message >> news:942C7AE6-29F6-4AF5-8FD7-... >> > Hi Pegasus you're very helpfull. >> > >> > Although the rlmueller is an excellent site with lots of script >> > solutions, >> > I >> > cannot find anything to my particular scenario!!! >> >> Very often you will never find the exact solution to a problem - unless >> someone else has had the exact problem before. Rather, you need to >> understand information such as found on Richard's site, and figure out >> how >> to adapt it to your situation. >> >> > I need to run the script >> > against the servers and take all users info that logged on that server, >> > last >> > time they logged, description, if is a local user or domain user!!! >> >> Whether or not this can be done may depend on whether or not the >> information >> has been logged in the past. You may need to enable some sort of auditing >> to >> be able to do this in the future. >> >> Alternately, you could look at the date of the NTUSER.DAT file in each >> profile. I find that in our environment this is not always accurate. >> >> > Do you think that is possible with script? >> >> Yes - but only if the information is there somewhere. >> >> > I already found some samples >> > (WMI) I downloaded the WMI code creator and scriptomatic and I used the >> > Win32_UserAccount, but this doesn't give me the last time that they >> > logged >> > on? >> > >> > I'm starting going crazy with this... ![]() >> > >> > For example I also nee to get software installed on those servers, >> > again I >> > used scriptomatic to create a script with Win32_Product, guess what?? >> > Not >> > all >> > installed software is returned?? Why? I did a test on a server with SQL >> > installed and the SQL wasn't listed?? >> >> I would suggest you start a different discussion thread on this other >> unrelated issue, as combining the two issues in one thread is likely to >> prove counterproductive. >> >> /Al >> >> >> > Perhaps I'm using the wrong classes I don't know... All I know is that >> > I >> > need the list for all these tasks and I have nothing so far... >> > >> > Thank you for your time. >> > >> > "Pegasus (MVP)" wrote: >> > >> >> >> >> "Jmnts" <> wrote in message >> >> news:F0FA7F70-7CC0-4CB6-A243-... >> >> > Hi everyone, >> >> > I have 2 questions I hope that script experts could help me. >> >> > >> >> > 1- >> >> > I've a huge task to complete. >> >> > >> >> > It's my job to get a list among dozens of servers (2000 and 2003) a >> >> > list >> >> > of >> >> > the users that logged on those servers (the servers have local and >> >> > domain >> >> > users) and related properties especially: >> >> > >> >> > -User Name >> >> > -Description >> >> > -Last time that the user logged on that server (this is very >> >> > important, >> >> > and >> >> > remember that I've local users and domain users that logs on the >> >> > servers, >> >> > I >> >> > only need to know the last time that they logged on that particular >> >> > server). >> >> > -State (enabled or disabled) >> >> > >> >> > - I don't have much experience with scripting but I can't find >> >> > nothing >> >> > that >> >> > has this particular needs. >> >> > >> >> > 2- >> >> > I use a batch file with xcopy that copies files and folders between >> >> > computers/servers, however when copying "for example" a directory, >> >> > with >> >> > always ask me for destination F=File or D=Directory, is there any >> >> > way >> >> > to >> >> > provide the answer automatically >> >> > >> >> > Xcopy \\computer\share\Directory1 \\Computer\share\ (this is a >> >> > directory) >> >> > /S >> >> > >> >> > Thank you all for the help that you can provide. >> >> > >> >> >> >> 1. There is a lot of relevant stuff on Richard Mueller's site: >> >> http://www.rlmueller.net/products.htm >> >> http://www.rlmueller.net/freecode2.htm >> >> http://www.rlmueller.net >> >> >> >> 2. You have a couple of options: >> >> a) Add a trailing backslash: >> >> xcopy /s "Source Folder" "Destination Folder\" >> >> b) Pipe a "D" into the command: >> >> echo D|xcopy /s "Source Folder" "Destination Folder" >> >> Note that xcopy.exe is now deprecated. If fails occasionally on large >> >> jobs. >> >> Use robocopy instead. >> >> >> >> >> >> >> >> >> |
|
|
|
|
|||
|
|||
|
Jmnts
Guest
Posts: n/a
|
Thanks for your time in this issue, unfortunately psloggedon doesn't do that,
it only shows logged users at the time of the query. I'm searching and searching this... I can't believe that no one has a script that queries users that logged on the server. Thank you. "Al Dunbar" wrote: > > "Jmnts" <> wrote in message > news:CF9127BE-235C-4E8B-8237-... > > Ok thank you for your response. > > > > Let me refrase, to you know any script to run on a given server that get a > > list of domain users that logged on that server? > > I believe there to be such scripts. I tend to use one of the pstools > utilities which is designed to do that very thing: > > http://technet.microsoft.com/en-us/s.../bb897545.aspx > > > And from that list get the > > last logon that they did? > > As I recall, psloggedon does that as well. > > /Al > > > > > > > "Al Dunbar" wrote: > > > >> > >> "Jmnts" <> wrote in message > >> news:942C7AE6-29F6-4AF5-8FD7-... > >> > Hi Pegasus you're very helpfull. > >> > > >> > Although the rlmueller is an excellent site with lots of script > >> > solutions, > >> > I > >> > cannot find anything to my particular scenario!!! > >> > >> Very often you will never find the exact solution to a problem - unless > >> someone else has had the exact problem before. Rather, you need to > >> understand information such as found on Richard's site, and figure out > >> how > >> to adapt it to your situation. > >> > >> > I need to run the script > >> > against the servers and take all users info that logged on that server, > >> > last > >> > time they logged, description, if is a local user or domain user!!! > >> > >> Whether or not this can be done may depend on whether or not the > >> information > >> has been logged in the past. You may need to enable some sort of auditing > >> to > >> be able to do this in the future. > >> > >> Alternately, you could look at the date of the NTUSER.DAT file in each > >> profile. I find that in our environment this is not always accurate. > >> > >> > Do you think that is possible with script? > >> > >> Yes - but only if the information is there somewhere. > >> > >> > I already found some samples > >> > (WMI) I downloaded the WMI code creator and scriptomatic and I used the > >> > Win32_UserAccount, but this doesn't give me the last time that they > >> > logged > >> > on? > >> > > >> > I'm starting going crazy with this... ![]() > >> > > >> > For example I also nee to get software installed on those servers, > >> > again I > >> > used scriptomatic to create a script with Win32_Product, guess what?? > >> > Not > >> > all > >> > installed software is returned?? Why? I did a test on a server with SQL > >> > installed and the SQL wasn't listed?? > >> > >> I would suggest you start a different discussion thread on this other > >> unrelated issue, as combining the two issues in one thread is likely to > >> prove counterproductive. > >> > >> /Al > >> > >> > >> > Perhaps I'm using the wrong classes I don't know... All I know is that > >> > I > >> > need the list for all these tasks and I have nothing so far... > >> > > >> > Thank you for your time. > >> > > >> > "Pegasus (MVP)" wrote: > >> > > >> >> > >> >> "Jmnts" <> wrote in message > >> >> news:F0FA7F70-7CC0-4CB6-A243-... > >> >> > Hi everyone, > >> >> > I have 2 questions I hope that script experts could help me. > >> >> > > >> >> > 1- > >> >> > I've a huge task to complete. > >> >> > > >> >> > It's my job to get a list among dozens of servers (2000 and 2003) a > >> >> > list > >> >> > of > >> >> > the users that logged on those servers (the servers have local and > >> >> > domain > >> >> > users) and related properties especially: > >> >> > > >> >> > -User Name > >> >> > -Description > >> >> > -Last time that the user logged on that server (this is very > >> >> > important, > >> >> > and > >> >> > remember that I've local users and domain users that logs on the > >> >> > servers, > >> >> > I > >> >> > only need to know the last time that they logged on that particular > >> >> > server). > >> >> > -State (enabled or disabled) > >> >> > > >> >> > - I don't have much experience with scripting but I can't find > >> >> > nothing > >> >> > that > >> >> > has this particular needs. > >> >> > > >> >> > 2- > >> >> > I use a batch file with xcopy that copies files and folders between > >> >> > computers/servers, however when copying "for example" a directory, > >> >> > with > >> >> > always ask me for destination F=File or D=Directory, is there any > >> >> > way > >> >> > to > >> >> > provide the answer automatically > >> >> > > >> >> > Xcopy \\computer\share\Directory1 \\Computer\share\ (this is a > >> >> > directory) > >> >> > /S > >> >> > > >> >> > Thank you all for the help that you can provide. > >> >> > > >> >> > >> >> 1. There is a lot of relevant stuff on Richard Mueller's site: > >> >> http://www.rlmueller.net/products.htm > >> >> http://www.rlmueller.net/freecode2.htm > >> >> http://www.rlmueller.net > >> >> > >> >> 2. You have a couple of options: > >> >> a) Add a trailing backslash: > >> >> xcopy /s "Source Folder" "Destination Folder\" > >> >> b) Pipe a "D" into the command: > >> >> echo D|xcopy /s "Source Folder" "Destination Folder" > >> >> Note that xcopy.exe is now deprecated. If fails occasionally on large > >> >> jobs. > >> >> Use robocopy instead. > >> >> > >> >> > >> >> > >> > >> > >> > > > |
|
|
|
|
|||
|
|||
|
Al Dunbar
Guest
Posts: n/a
|
"Jmnts" <> wrote in message news:13C03B0D-619B-4298-85DA-... > Thanks for your time in this issue, unfortunately psloggedon doesn't do > that, > it only shows logged users at the time of the query. My bad, sorry, I thought it provided the last logon time as well. > I'm searching and searching this... I can't believe that no one has a > script > that queries users that logged on the server. Well, if there were a script that could do such a query, where do you suppose it would find that information? I don't know where it can be found. I suspect that if this were possible, it might require that some specific auditing be turned on for the purpose. I mentioned this in an earlier reply, but you have apparently not looked into that. I have a script that shows who logged on when and on what workstation, and I am sure that many others do as well. The script will not work for you, however, as it relies on information collected for it by our logon script. It is not foolproof, however, it serves my purposes. Pegasus gave you three links into Richard Meuller's site that you did not seem to find useful. Here is one that gives an example of a logon script that collects logon information: http://www.rlmueller.net/Logon5.htm Given the solution many of us have come up with, perhaps it is just true that the information is simply not available from anywhere in the typical configuration. I am quite sure that, if it were, someone would have published a script that does precisely what you want. You may eventually have to: "believe that no one has a script that queries users that logged on the server". I know I am not lying when I tell you I know of no such script. /Al > Thank you. > > > "Al Dunbar" wrote: > >> >> "Jmnts" <> wrote in message >> news:CF9127BE-235C-4E8B-8237-... >> > Ok thank you for your response. >> > >> > Let me refrase, to you know any script to run on a given server that >> > get a >> > list of domain users that logged on that server? >> >> I believe there to be such scripts. I tend to use one of the pstools >> utilities which is designed to do that very thing: >> >> http://technet.microsoft.com/en-us/s.../bb897545.aspx >> >> > And from that list get the >> > last logon that they did? >> >> As I recall, psloggedon does that as well. >> >> /Al >> >> > >> > >> > "Al Dunbar" wrote: >> > >> >> >> >> "Jmnts" <> wrote in message >> >> news:942C7AE6-29F6-4AF5-8FD7-... >> >> > Hi Pegasus you're very helpfull. >> >> > >> >> > Although the rlmueller is an excellent site with lots of script >> >> > solutions, >> >> > I >> >> > cannot find anything to my particular scenario!!! >> >> >> >> Very often you will never find the exact solution to a problem - >> >> unless >> >> someone else has had the exact problem before. Rather, you need to >> >> understand information such as found on Richard's site, and figure out >> >> how >> >> to adapt it to your situation. >> >> >> >> > I need to run the script >> >> > against the servers and take all users info that logged on that >> >> > server, >> >> > last >> >> > time they logged, description, if is a local user or domain user!!! >> >> >> >> Whether or not this can be done may depend on whether or not the >> >> information >> >> has been logged in the past. You may need to enable some sort of >> >> auditing >> >> to >> >> be able to do this in the future. >> >> >> >> Alternately, you could look at the date of the NTUSER.DAT file in each >> >> profile. I find that in our environment this is not always accurate. >> >> >> >> > Do you think that is possible with script? >> >> >> >> Yes - but only if the information is there somewhere. >> >> >> >> > I already found some samples >> >> > (WMI) I downloaded the WMI code creator and scriptomatic and I used >> >> > the >> >> > Win32_UserAccount, but this doesn't give me the last time that they >> >> > logged >> >> > on? >> >> > >> >> > I'm starting going crazy with this... ![]() >> >> > >> >> > For example I also nee to get software installed on those servers, >> >> > again I >> >> > used scriptomatic to create a script with Win32_Product, guess >> >> > what?? >> >> > Not >> >> > all >> >> > installed software is returned?? Why? I did a test on a server with >> >> > SQL >> >> > installed and the SQL wasn't listed?? >> >> >> >> I would suggest you start a different discussion thread on this other >> >> unrelated issue, as combining the two issues in one thread is likely >> >> to >> >> prove counterproductive. >> >> >> >> /Al >> >> >> >> >> >> > Perhaps I'm using the wrong classes I don't know... All I know is >> >> > that >> >> > I >> >> > need the list for all these tasks and I have nothing so far... >> >> > >> >> > Thank you for your time. >> >> > >> >> > "Pegasus (MVP)" wrote: >> >> > >> >> >> >> >> >> "Jmnts" <> wrote in message >> >> >> news:F0FA7F70-7CC0-4CB6-A243-... >> >> >> > Hi everyone, >> >> >> > I have 2 questions I hope that script experts could help me. >> >> >> > >> >> >> > 1- >> >> >> > I've a huge task to complete. >> >> >> > >> >> >> > It's my job to get a list among dozens of servers (2000 and 2003) >> >> >> > a >> >> >> > list >> >> >> > of >> >> >> > the users that logged on those servers (the servers have local >> >> >> > and >> >> >> > domain >> >> >> > users) and related properties especially: >> >> >> > >> >> >> > -User Name >> >> >> > -Description >> >> >> > -Last time that the user logged on that server (this is very >> >> >> > important, >> >> >> > and >> >> >> > remember that I've local users and domain users that logs on the >> >> >> > servers, >> >> >> > I >> >> >> > only need to know the last time that they logged on that >> >> >> > particular >> >> >> > server). >> >> >> > -State (enabled or disabled) >> >> >> > >> >> >> > - I don't have much experience with scripting but I can't find >> >> >> > nothing >> >> >> > that >> >> >> > has this particular needs. >> >> >> > >> >> >> > 2- >> >> >> > I use a batch file with xcopy that copies files and folders >> >> >> > between >> >> >> > computers/servers, however when copying "for example" a >> >> >> > directory, >> >> >> > with >> >> >> > always ask me for destination F=File or D=Directory, is there any >> >> >> > way >> >> >> > to >> >> >> > provide the answer automatically >> >> >> > >> >> >> > Xcopy \\computer\share\Directory1 \\Computer\share\ (this is a >> >> >> > directory) >> >> >> > /S >> >> >> > >> >> >> > Thank you all for the help that you can provide. >> >> >> > >> >> >> >> >> >> 1. There is a lot of relevant stuff on Richard Mueller's site: >> >> >> http://www.rlmueller.net/products.htm >> >> >> http://www.rlmueller.net/freecode2.htm >> >> >> http://www.rlmueller.net >> >> >> >> >> >> 2. You have a couple of options: >> >> >> a) Add a trailing backslash: >> >> >> xcopy /s "Source Folder" "Destination Folder\" >> >> >> b) Pipe a "D" into the command: >> >> >> echo D|xcopy /s "Source Folder" "Destination Folder" >> >> >> Note that xcopy.exe is now deprecated. If fails occasionally on >> >> >> large >> >> >> jobs. >> >> >> Use robocopy instead. >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> |
|
|
|
|
|||
|
|||
|
Al Dunbar
Guest
Posts: n/a
|
"Al Dunbar" <> wrote in message news:... > > "Jmnts" <> wrote in message > news:13C03B0D-619B-4298-85DA-... >> Thanks for your time in this issue, unfortunately psloggedon doesn't do >> that, >> it only shows logged users at the time of the query. > > My bad, sorry, I thought it provided the last logon time as well. > >> I'm searching and searching this... I can't believe that no one has a >> script >> that queries users that logged on the server. > > Well, if there were a script that could do such a query, where do you > suppose it would find that information? I don't know where it can be > found. I suspect that if this were possible, it might require that some > specific auditing be turned on for the purpose. I mentioned this in an > earlier reply, but you have apparently not looked into that. > > I have a script that shows who logged on when and on what workstation, and > I am sure that many others do as well. The script will not work for you, > however, as it relies on information collected for it by our logon script. > It is not foolproof, however, it serves my purposes. > > Pegasus gave you three links into Richard Meuller's site that you did not > seem to find useful. Here is one that gives an example of a logon script > that collects logon information: > > http://www.rlmueller.net/Logon5.htm > > Given the solution many of us have come up with, perhaps it is just true > that the information is simply not available from anywhere in the typical > configuration. I am quite sure that, if it were, someone would have > published a script that does precisely what you want. > > You may eventually have to: "believe that no one has a script that queries > users that logged on the server". I know I am not lying when I tell you I > know of no such script. > > > /Al <snip> As an aside, I just ran across a reference to a tool called LockoutStatus.exe: http://technet.microsoft.com/en-us/l.../cc738772.aspx It's purpose is to display as much information as possible about a locked out account. You can see the list of items it displays in the above link. Missing (of course) is any mention of the source of the last logon attempt, failed or otherwise. I would suggest to you that, if that information actually *were* available from somewhere, then this tool would display it - as would some of the scripts that have been mentioned in this thread. Whether or not it is possible to enable auditing of this information, by default, AD does not log the name of the workstations we log in from. What would be the point? That information is not required by AD or the servers in order to service subsequent requests from the client. I suspect further, that this information cannot be audited. If it could be, then I think someone might have already explained how, whether in this thread or the many others asking the same question. I sense your frustration with this. You probably subscribe to the philosophy that espouses the theory that, if a thing can be imagined, then it must be possible. I do to; unfortunately, the thing I imagine is that it might be possible that we are wrong to assume that "if a thing can be imagined, then it is possible". If the thing I imagine is true, then the theory is disproved. But if the thing I imagine is false, the theory is also disproved. /Al |
|
|
|
|
|||
|
|||
|
|
|
| |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| VBS Script error in Logon Script with AD change | Webspeedway | Active Directory | 1 | 11-07-2006 01:55 AM |
| Script from Script repository gives 0x80041021 error | Jayant Sane | Scripting | 0 | 04-11-2006 09:54 PM |
| [MSH] - Is it possible to combine functions into a script/library file that can later be included into another script? | Rahul Agarwal | Scripting | 1 | 12-05-2005 11:30 PM |
| Re: How to I Kill - Reset Idle Terminal / Remote Session thru VB Script or Batch Script on Windows 2000/2003 | Chris King | Scripting | 0 | 07-07-2004 03:35 PM |
| Script Help Needed! Installing via Script when user does not have Admin Rights!!! | Greg H | Scripting | 0 | 08-14-2003 01:41 PM |
Forum Software Powered by vBulletin, Copyright Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc. |



Linear Mode

