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.

Office Deployments

At first, I thought deploying Office 2019 the “new way” was daunting and it seemed like it was going to be a pain to deploy. It really isn’t. Even if you haven’t done it before. Here’s the basic process of it. There are tons of things you can do with it but this grazes the top to get you moving along with a quick deployment.

So the following will guide you through installing Office 365 for use on machines with Terminal Services deployed. You can of course remove the property to enable this if you wish.

Step 1 – Download the tool

Obtain the office deployment tool:


Of course you can Google Office Deployment Tool as well. Microsoft has a thing for moving stuff around more than I’d like them to.

Step 2 – Run and extract the goodies (for the lesser experienced, don’t stop now, the rest is easy!)

Run the tool, extract to a location of your choosing. Once complete, open Powershell and navigate to the folder. IE:

cd C:\Office2019

Step 3 – Configure the config XML file

You’ll notice they’ve included some pre-configured answer/ config files for us to use. Let’s open either the 64 or 32 bit version in a text editor like Notepad. Make sure to add the following “SharedComputerLicensing” property if you are using terminal services (Remote Desktop Deployments).

Be sure to modify things like the product id as needed. Here is a link with a list of IDs:


Here’s a list of IDs that could be used in case Microsoft moves their page….. (the first 3 are the Office 365 Editions):

  • O365ProPlusRetail
  • O365BusinessRetail
  • O365SmallBusPremRetail
  • Excel2019Volume
  • HomeBusinessRetail
  • HomeBusiness2019Retail
  • HomeStudentRetail
  • HomeStudent2019Retail
  • O365HomePremRetail
  • ProfessionalRetail
  • Professional2019Retail
  • ProjectPro2019Retail
  • ProjectPro2019Volume
  • ProjectStdXVolume
  • ProjectStd2019Retail
  • ProjectStd2019Volume
  • ProPlus2019Volume
  • Standard2019Volume
  • VisioPro2019Retail
  • VisioPro2019Volume
<Product ID="O365ProPlusRetail">
<Language ID="en-us" />
<Display Level="None" AcceptEULA="TRUE" />
<Property Name="SharedComputerLicensing" Value="1" />
 <Updates Enabled="TRUE" Channel="Monthly" />

Google is your friend when you don’t know one of these properties. 🙂

Step 4 – Run it!!

Run it, deploy it, download it, whatever you want! Both commands are shown below. Download is good for network deployment. Run is great for a local install.

.\setup.exe /configure configFileName.xml OR .\setup.exe /download configFileName.xml

Change all users to an alternate domain suffix

In Active Directory users and computers, right click Queries> New. Give it a name, click “define query”. Stay on the “Users” tab. Select “Is not” and type an invalid name like testtesttest. Click ok, ok. It should return a result with all users whose name is <<not>> testtesttest. Select all, right click> Properties. Go to Account tab> check “UPN Suffix” and change it to the appropriate suffix. That’s it! There are PowerShell methods to do this too but when handling hundreds of user accounts, you have to be absolutely careful in PowerShell. There are solutions online that work fine that I am not going to post here. This is purely for the GUI. Good luck!

Exchange and AD Powershell Useful Commands

I’ve had a few odd issues & tasks with Exchange 2010 and AD recently and wanted to take a moment to document them as well as the command used to resolve the issue:

The following command was useful to resolve an issue of multiple copies of the same shared mailbox showing where only one would allow access and the other copies would only fail to open.

Add-MailboxPermission -Identity <shared mailbox alias> -User <your mailbox alias> -AccessRights FullAccess -InheritanceType All -Automapping $false

The following will find all active user accounts whose Password Never Expires attribute is set to true formatted in a nice table of username and the value. Value is not really necessary because it should only return true, but everyone loves a sanity check right?

get-aduser -filter * -properties Name, PasswordNeverExpires | where { $_.passwordNeverExpires -eq "true" } | where {$_.enabled -eq "true"} | Format-Table -Property Name, PasswordNeverExpires -AutoSize

Delete Excess User Profiles

You Will Need:

Mix it all together:

What I like to do is copy delprof2.exe to the Windows folder. Then you can run it directly from command prompt. However, I like to create a scheduled task to run it if any user logs on. You want to set “When running the task, use the following user account:” to Administrators. Run with highest privileges and run with the switch /q which means it will silently delete all profiles according to the criteria you specified. This should actually help out with security because if another user logs into the computer, it will run this utility which will delete your profile when they login. On top of this, you have a scheduled task set to run each day with Ccleaner which wipes free space at the end of your shift. Double bonus if it goes undetected.


   /l   List only, do not delete (what-if mode)
   /u   Unattended (no confirmation)
   /q   Quiet (no output and no confirmation)
   /p   Prompt for confirmation before deleting each profile
   /r   Delete local caches of roaming profiles only, not local profiles
   /c   Delete on remote computer instead of local machine
   /d   Delete only profiles not used in x days
        When determining profile age for /d, use the file NTUSER.INI
        instead of NTUSER.DAT for age calculation
   /ed  Exclude profile directories whose name matches this pattern
        Wildcard characters * and ? can be used in the pattern
        May be used more than once and can be combined with /id
   /id  Include only profile directories whose name matches this pattern
        Wildcard characters * and ? can be used in the pattern
        May be used more than once and can be combined with /ed
   /i   Ignore errors, continue deleting
delprof2.exe -c: -p 

enter image description here

Source: http://superuser.com/questions/643417/delete-user-profile-from-command-line-windows-7

Router Giving IPv6 Addresses

I recently ran into an issue where my router was giving off the following IPv6 addressses (or so I thought). I ran an ipconfig /all in command prompt which shows all adapters and their configurations. The LAN port was showing both an IPv4 and IPv6 address. The IP address was and the IPv6 was an IPv6 address (being too lazy to type it out). Here is what the DNS configurations showed for that adapter:


It dawned on me at one point or another that is the address that is given when you are Sharing a Network Connection. I do this often because I have a wireless access point in one room and a (usually) offline network in another room. When I want to have internet connection on that network, I use my laptop to share the connection to my LAN port and therefore I have internet access. Because this was on, my computer was acting as a DHCP server and wasn’t allowing incoming connections. I shut that off and everything worked fine afterward.

Space Use Scanner (Free Utility)

Is your hard drive full and you have no idea why? I use this little utility called Space Use Scanner. You can download it here: www.steffengerlach.de. It shows you a graphical chart of your hard drive. You can actually click any portion of the graph to see more details about what in that folder is using so much space. [This actually points out hiberfil.sys (Hibernation file and system info) and pagefile.sys (virtual memory stored on hard disk) as taking up a lot of space most of the time.]


The screenshot is from: http://www.steffengerlach.de/. I did not make the screenshot above. Please visit the site to download the freeware.

Task Scheduler Error: Specified Account Does Not Exist

A message similar to the one above showed up one day when I was editing a scheduled task. I did a quick Google which did not help out very much, and ended up learning on my own that the task was set to be run by the following user: MyComputer1\user. Since then, I changed the name of my computer to: MyComputer2\user. So to fix it, I just opened up the scheduled task and changed the user it should be run by to the same user and it automatically updated the computer name as it needed to.