Jump to content

tguy

Member
  • Posts

    698
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Posts posted by tguy

  1. I am looking for help writing a vbScript or batch file that will use something like ADO, ADSystemInfo or dsquery and dsget to bind to my domain and enumerate a list of all groups in the domain with two or less members in the group. Once the list of groups is obtained I would like to write the results to a text file showing:

    1) Group Name and FQDN

    2) Group Members

    3) Date Created

    We are in the process of cleaning up our Active Directory with old, unused or obsolete objects and this is part of that effort.

    Thanks in advance for your help.

  2. I would assume you are running a version of Windows server for your software registration process so if that's the case, depending on the version of Windows Server you are running; I would look into using the following:

    net time /setsntp:pool.ntp.org

    or W32TM as was mentioned in an earlier thread here. Either will work just make sure your firewall is set to allow UDP traffic port 123.

    Good luck.

  3. I like the idea of creating and hiding a partition to copy the recovery image to and then using something like WinPE to do the recovery however a couple of things come to mind:

    1) Not everyone has access to WinPE

    2) Using a F(x) hotkey is something that is programmed into the BIOS of a computer chip so unless the functionality is already included this scenario needs to be modified a little bit to include the use of a boot partition manager to access the recovery partition.

  4. Hi,

    The first question that comes to mind is how often you will need to copy the files from one server to another. I am making a few assumptions here so bear with me. If I re-state things you already know please do not take offense as I am just trying to spell out my logic in how I would decide to administer this situation.

    If you are doing frequent file copies I would suggest using a shell script that kicks off scp and copies the files for you. You can use the crontab functionality to execute the shell script. Conversely if you only need to copy the files a few times then WinSCP may be a better choice as it allows you to see the source and destination directories and to select multiple files at once to be copied even with different file extensions.

    Secondly, if you are going to scp the files directly from the source server to the destination server you would want to do the following:

    scp -v file.txt username@domain.com:/remote/directory >> var/log/scp.log

    If you are copying the files from Croatia to Germany from your computer you would want to use Putty's pscp.exe to do the following:

    scp -v username@domain.com:/remote/directory1/file.txt \ username@domain.com:/remote/directory2/ >> var/log/scp.log

    Both these commands will execute the copies you need and will log the results to the file and directory listed above.

    Hope this helps.

  5. I would consider implementing a script that checks the server's security log for logon events, find the most recent, parse for the user and time and then write that information to the server's registry section for computer description.

    Do you mind if I ask why you are doing this? It would seem easier to query the event logs on multiple servers and dump the results to a single text file on the network or something where you view all the results at once.

  6. If you want to see if the machine is live on the network you could do as IceManND suggests and query a DHCP server or ping the list of servers in your batch file until you find the one(s) that do not respond.

    This may not necessarily be accurate if the machine is powered off and/or has been powered off long enough for its DHCP lease to expire.

    You could also do a Netbios query, or query a WINS server to see if there are any responses for the computers in your list.

    If you are running Active Directory or have an NT domain you could use ADSI queries or NT resource kit utilities to see if a computer account already exists.

    Hope this helps as well.

  7. How about calling sleep.exe or wait.exe and set to 10 minutes or 600 seconds?

    eg: call sleep.exe 600

    Then use an error return code to check to see if ftp was successful or not and if not use kill.exe or pskill.exe to terminate the ftp process.

    eg: Errorreturn

    Just some thoughts.

    You could also use vbScript to do everything you need plus the steps I mentioned above without having to call separate executables.

  8. Hi all. I am wondering if anyone has any code snippets or can point me to same for creating an application stoplight type of dashboard that will check processes/applications running on a Windows server and generate the dashboard in a color coded stoplight format?

    EG: Application/Process 1 running - Green light

    Application/Process 2 not responding - Yellow light

    Application/Process 3 stopped/not running - Red light

    Your assistance is greatly appreciated.

    Please send me a PM with the snippets if you have them.

    Thank-you.

  9. You should use the OEM version that the customer will buy unless they have a volume license agreement with Microsoft already.

    To install the updates:

    1) Copy the WinXP SP2 OEM cd contents to a local drive.

    2) Then download all the updates you want to install as well. Windows Update Download http://wud.jcarle.com may help to identify all the downloads.

    3) Slipstream all the updates into your XP SP2 source filess using the /integrate command then recompile the cd contents into an .ISO file.

    Build your 'Gold' image onto the hardware you intend to image and sysprep. Once the OS is loaded install SYSPREP and reseal the image. You don't have to activate. Re-image the updated computer then the next time you deploy you will have the updated image ready to go.

    When you need to update with further patches, lay the image down on the hardware again, apply the updates, install sysprep again and reseal. If you include the XP source files in your image integrate the new patches into those source files to. Take new image of hardware and just repeat steps as necessary.

    That should do it.

  10. Are these computers part of an Active Directory domain or a Workgroup? It may be difficult to delegate permissions the way you wish to without the computers being part of AD. Each computer in a Workgroup has its own local SAM database. You can't effectively add members from one computers SAM database to the other computers SAM database without AD.

×
×
  • Create New...