Loading...

Use BGInfo to identify details about a machine you are on

This is an awesome feature to identify which computer you are using quickly on the desktop. It’s great to deploy as an IT admin because it doesn’t interfere with the user’s wallpaper.

  1. Create a folder on a shared network drive that you will be pulling the script, config, and bginfo files from.
  2. Download and extract the bginfo files. https://docs.microsoft.com/en-us/sysinternals/downloads/bginfo
  3. Create a custom bginfo config that suits your environments needs by opening bginfo64.exe, make the changes you prefer and click File>save as. The file extension should be .bgi.
  4. Create a script file in the same shared network path you created with bginfo.exe in it. (bginfo.bat is a great name for it).

  5. Include the following in the script file (modify file names and paths as needed below):
    reg add HKU\.DEFAULT\Software\Sysinternals\BGInfo /v EulaAccepted /t REG_DWORD /d 1 /f

    \\servername.domain.com\Scripts\Bginfo64.exe \\servername.domain.com\Scripts\mycustomconfig-bg.bgi /TIMER:00 /nolicprompt
  6. Create or select the GPO that is applied to the machines/ users you wish to apply this feature to.
  7. Navigate to User Configuration> Policies> Windows Settings> Scripts> Logon
    1. Put in the location of the script. IE: \\servername.domain.com\Scripts\bginfo.bat
  8. Now when you log in to a User account that has this policy applied, the desktop background should be updated assuming you have selected that option when you set up the configuration.
  9. Use gpupdate /force if it doesn’t apply the first time. Remember, this is NOT dynamic. If you opt to have it show disk space on logon, it won’t be regularly updated until the account is signed off and back on.
  10. You may want to tweak some of these settings a bit. There are some potential side effects when doing it as shown here, but where we use this primarily for our techs and not so much our end users, there hasn’t been a need for it to be customized. An example is listed below which I believe is caused due to me switching screen sizes constantly when accessing this server.

Set time on a VMWare hosted domain controller

When you set up a domain controller in VMWare and join machines to it, you will typically need to set an external NTP server for it to communicate with as it will, over time become 1,2,3,4,5 minutes off. I’ve seen this numerous times. There are a few other methods to resolve this, but this is my preferred. (The immediate install won’t have this problem, it will probably crop up about 5 months down the line).

  1. Make sure you are setting this on the domain controller with the FSMO roles.
    netdom /query fsmo
  2. Stop the time service (you will usually get the best results this way)
    net stop w32time
  3. Set the time sources you will use. This site has an excellent list. https://tf.nist.gov/tf-cgi/servers.cgi
    w32tm /config /syncfromflags:manual /manualpeerlist:time.nist.gov
  4. Set your domain controller as a reliable time source for clients connecting.
    w32tm /config /reliable:yes
  5. Start the time service back up
    net start w32time
  6. Force a time update
    w32tm /query /configuration
  7. Verify your work
    w32tm /query /status

This was used on Windows Server 2019 and should work on 2016 as well. Older versions I haven’t used this exact process on.

Installing VMWare PowerCLI – A life changer

If you don’t already work every day in command line in the Information Technology world, I’d recommend you start…. if only to use this tool. This tool removes some of the time consuming clicks required in the GUI — not to say it is at all hard in the GUI, but when you are dealing with hundreds of machines at a given time, you will learn more about what I mean over time.

Installation

Run the following:

Install-Module -Name vmware.powercli -Scope AllUsers

You may also use CurrentUser for the scope if you’d prefer.

And then of course to use it:

Import-Module vmware.powercli

Research

Now get comfy and start researching. The capabilities with existing knowledge of Powershell scripting…. possibilities are endless.

https://code.vmware.com/docs/5060/cmdlet-reference/doc/Start-VM.html

error: