Blog

  • How to remove hidden network adapters

    Windows automatically hides devices that are not presently connected to the system, but they still exist in Windows’ configuration. This is especially problematic when changing virtual network adapters and not being able to remove IP configurations from old adapters. To resolve:

    1. Click Start, click Run, type cmd.exe, and then press ENTER.
    2. Type “set devmgr_show_nonpresent_devices=1“, and then press ENTER.
    3. Type Start DEVMGMT.MSC, and then press ENTER.
    4. Click View, and then click Show Hidden Devices.
    5. Expand the Network Adapters tree.
    6. Right-click the dimmed network adapter, and then click Uninstall.
  • Quick and Simple Way to Export DHCP Scope Settings From One Server to Another

    Applies to:

    Windows Server 2008 R2, Windows Server 2012R2, Windows Server 2016

    From the command prompt on the source DHCP server run the following command:

    netsh dhcp server export c:\dhcp.dat all
    

    2.  Copy the “dhcp.dat” file to the new, or destination, DHCP server and run the following command:

    netsh dhcp server import c:\dhcp.dat all

    While running the export command, the DHCP service will be temporarily stopped and won’t respond to DHCP requests.  Also, the import will fail if there are any existing DHCP scopes that overlap with the original DHCP servers configuration.

  • “Host SMBus controller not enabled!”

    CentOS guest instances in VMware sometimes come up with the boot error message:

    piix4_smbus 0000:00:007.3: Host SMBus controller not enabled!

    This error is being caused because VMware doesn’t actually provide that level interface for CPU access, but Ubuntu try to load the kernel module anyway.

    How to fix it:

    sudo nano /etc/modprobe.d/blacklist.conf

    add the line:

    blacklist i2c-piix4

    Reboot.

    NOTE: for older versions use blacklist i2c_piix4 instead.
    NOTE: it works both in VMWare Fusion 5 and 6, and Ubuntu LTS 12.04 and 14.04

  • Find out mapped network drive logins

    If you have shared drives in a multi-domain environment and need to know what each drive was logged on as, this is the command to find out:

    WMIC NETUSE GET Name,UserName

    or

    WMIC NETUSE LIST /FORMAT:LIST

    or

    Another way to see this is to look on the machine that is hosting the shares.
    Look in Computer Management -> Shared Files -> Open Files.

    This will list the user account that is being used.

  • Remove group membership of disabled accounts

    Majority of the system administrators I’ve met forget this very important rule. When an account is not needed remove its membership from the security/ distribution groups, otherwise you get disabled account showing up in groups, and that looks ugly.

    You will need Quest ActiveRoles for Powershell installed to get this working.

    Depending on the size of your organization you may need to increase the limit of results to 3000 or more. Default is 1000

    Set-QADPSSnapinSettings -DefaultSizeLimit 3000

    Next, create a list of accounts that you will be modifying so we know what we will be removing.

    Get-QADUser -disabled | Out-File C:\_Scripts\disabled_user_stripped_groups.txt

    Once you have the list saved. Execute the following:

    $dUsers = Get-QADUser -disabled;
    foreach ($user in $dUsers )
    {
    foreach( $grp in (Get-QADMemberOf $user ))
    {
    Remove-QADGroupMember $grp $user;
    }
    }

    Membership is stripped from groups, where the user account is disabled.

  • ManageEngine ADSelfService Plus – How to apply a wildcard cert ?

    ADSelfService Plus by ManageEngine is a great tool. The instructions provided to configure SSL did not work for me, but I was able to figure it out doing the following:

    You need a PFX File: Wild Card Cert for *.yourdomain.com (Yourdomain-WildCard.pfx) – This can be generated/ exported by IIS if you have a wildcard cert.

    STEPS to apply and use Wildcard cert:

    1. Enable SSL in ADSelfService Plus.
    • Click “Admin” tab –> Product Settings –> Connection.
    • Enable “Enable SSL Port [https]” check-box -> click “Save” button.
    1. Stop ADSelfService Plus. (Start –> All Programs –> ADSelfService Plus –> Stop ADSelfService Plus) .
    2. Save the “.pfx” file under “C:\ManageEngine\ADSelfService Plus\conf”, take a backup copy of server.xml file and then edit the “server.xml” file.
    3. Go to the bottom of server.xml file and edit connector tag and add the keystoreFile, keystorePass, keystoreType  and save the file.
    <Connector SSLEnabled="true" acceptCount="100" clientAuth="false" connectionTimeout="20000" debug="0" disableUploadTimeout="true" enableLookups="false" 
    keystoreFile="./conf/YourDomain-WildCard.pfx" keystorePass="Private Key Password" keystoreType="PKCS12" maxSpareThreads="75" maxThreads="150" 
    minSpareThreads="25" name="SSL" port="443" scheme="https" secure="true" sslProtocol="TLS"/>
    1. Start ADSelfService Plus or restart the server.

    Hope this helps!

  • Deleting Thumbs.db & Desktop.ini files and How to prevent them

    Removing thumbs.db file from explorer might take time. So you may also try the command interface.

    • Press Windows Key + R for Run window, type cmd for opening command prompt
    • del /s /ah thumbs.db

    This command will quickly remove thumbs.db files from your computer.

    How to prevent thumbs.db file from getting recreated?

    The above method only can help you in removing the created thumbs.db file, but it can’t prevent creation of newer thumbs.db files. If you have plenty of photos in your PC, these files will get regenerated easily and start consuming hard disk space.

    To prevent this file from getting generated, try this tweak.

    • Press Windows key + R for opening Run window. Type gpedit.msc and hit Enter
      Note: Group Policy Editor is a feature included with premium versions of Windows mainly the professional and enterprise edition. So if you don’t get any window opened after typing gpedit.msc, the version of windows in your PC may not support that feature.
    • On the left side of Group Policy Editor window, open User Configuration -> Administrative Templates -> Windows Components -> File Explorer (Windows Explorer in 7, File explorer in Windows 8). On the right side double click on “Turn off the caching of thumbnails in hidden thumbs.db files”. Click Enabled. Click OK

    thumb.db-gpedit-1

    thumb.db-gpedit-2

    Once the step is done, no more thumbs.db files will be generated in your computer.

  • How to Start and Enable Firewalld on CentOS 7

    It is highly recommended that you have a firewall protecting your server.

    Pre-Flight Check

    • These instructions are intended specifically for enabling and starting firewalld CentOS 7.
    • I’ll be working from a Liquid Web Self Managed CentOS 7 server, and I’ll be logged in as root.

    Check the Status of Firewalld

    To check the status of firewalld, run the following command as root:

    systemctl status firewalld

    Enable Firewalld

    To enable firewalld, run the following command as root:

    systemctl enable firewalld

    Start Firewalld

    To start firewalld, run the following command as root:

    systemctl start firewalld

  • How to check status, stop, and disable firewall on CentOS 7

    Firewalld is a complete firewall solution that has been made available by default on all CentOS 7 servers, including Liquid Web Core Managed CentOS 7, and Liquid Web Self Managed CentOS 7. On occasion, perhaps for testing, disabling or stopping firewalld may be necessary. Follow the instructions below to disable firewalld and stop firewalld.

    It is highly recommended that you have another firewall protecting your network or server before, or immediately after, disabling firewalld.

    Pre-Flight Check

    • These instructions are intended specifically for stopping and disabling firewalld CentOS 7.
    • I’ll be working from a Liquid Web Self Managed CentOS 7 server, and I’ll be logged in as root.

    Check the Status of Firewalld

    And finally, to check the status of firewalld, run the following command as root:

    systemctl status firewalld

    Stop Firewalld

    To stop firewalld, run the following command as root:

    systemctl stop firewalld

    Disable Firewalld

    To disable firewalld, run the following command as root:

    systemctl disable firewalld
  • Find files hiding in a lot of sub directories

    So I was moving a lot of my music to Amazon Cloud Drive, and ended with a lot of files still showing under a lot of sub directories. Problem was – how do I know which files are in what sub directory with out going into each of them.

    Here is the answer:

    K:\Music\dir /b /s /A-D /o:gn>list.txt

    This captured all the files in the sub directories and saved them to list.txt

    Hope this helps.