mo wasay

Disable IPv6 on Windows Core Server 2008 R2 – 2012 R2

GUI Version:

2016-08-09_17-13-27

  1. Open Control Panel > Network & Internet > Network & Sharing Center > Change Adapter Settings > Choose the Adapter
  2. Right Click – Select Properties
  3. Networking Tab
  4. DeSelect IPv6
  5. Close

No GUI… No problem (Core):

After doing the above procedure you might have to use the registry editor aswell to completely disable the ipv6 tunnel

Here’s what to do to disable IPv6 on Core Windows Server

First check the interface that you want to disable.

2016-08-09_17-01-41

To completely disable IPv6 on a Windows Server 2008/2012-based computer yourself, follow these steps:

    1. Open Registry Editor.
    2. Locate the following registry subkey:
    3. In the details pane, click New, and then click DWORD (32-bit) Value.
    4. Type DisabledComponents, and then press ENTER.
    5. Double-click DisabledComponents, and then type 0xffffffff in Hexadecimal or 4294967295 in Decimal.Note The 0xffffffff value or the 4294967295 value disables all IPv6 components except for the IPv6 loopback interface.
      http://support.microsoft.com/kb/929852

      Also we can try this command to Disable IPv6 in Windows

    6. Reboot
    7. Re-run the above command to see if the interface shows IPv6 addresses

Change the password age in bulk for Active Directory accounts

Ran into an interesting situation where pretty much all domain accounts did not follow the default password policy and had the option of ‘password never expires’ checked. I needed to fix this immediately without impacting the users and expiring any accounts that may affect the business.

I needed to adjust the password age for all domain accounts so that they follow the password aging policy. Typically a password age policy is upto 90 days. Powershell to the rescue:

So now that all the accounts have a password age of 1 day. Time to uncheck that ‘password never expires’ box. Now for some service and system accounts I wanted them to have password never expires. So now I needed to work with a filtered set.

I grabbed the accounts I wanted and was able to save them in a .CSV file.

change.csv contents:

Now to perform the task on each account:

Hope this helps if you run into a similar situation.

Disable Office group creation

Every Exchange user has an OWA mailbox policy that governs what they can and can’t do with their mailbox. Updating this mailbox policy removes the ability for users to create Groups. Because OWA policies are per user, you can limit the ability to create Groups for some users and not others. At this time, the only way to update the mailbox policy is through Windows PowerShell.

These commands disable group creation for OWA and Outlook only. If you want to disable the group creation in your organization, use Azure Active directory settings. Check out Windows PowerShell for more details.

To disable Group creation for all users

  1. Start Windows PowerShell.
  2. At the prompt, type:

To disable a policy for a subset of users

  1. Start Windows PowerShell.
  2. Create a new mailbox policy by typing this command, replacing <policy name> with your policy. (If you already have an OWA mailbox policy, skip to the next step.)

    New-OwaMailboxPolicy –Name “<policy name>”

  3. set the GroupCreationEnabled value to false, replacing <policy name> with the name of your policy.

    Set-OwaMailboxPolicy –Identity “<policy name>” –GroupCreationEnabled $false

  4. Set the policy on the mailboxes of the user who isn’t allowed to create Groups. Replace <user> with the name of the user.

    Set-CASMailbox –Identity <user> -OWAMailboxPolicy “<policy name>”

Saving emails in the ‘Sent Folder’ of shared mailboxes

When composing a message from a shared mailbox, by default when the message is ‘sent’, it is copied to the Sent Items for the user composing the message and not the Sent Items folder on the shared mailbox. Well, conveniently there is a way to enable this option in Exchange 2016 and Office365.

I don’t understand why this option is not turned on by default because it accounts for a message sent from a shared mailbox yet there is no historical record of the message being sent from the mailbox. Apart from journaling if it is enabled or a third party software/ service.

ESXi 6.0 not detecting BROCADE HBA adapter

Steps:

  1. Make sure HBA is connected on the PCI slot and visible under esx hardware list:
  2. Check if VMKernel can detect any storage via Fibre Channel
    (output will be blank line if HBA driver is missing but HBA appears to be in PCI card determined from step 1)
  3. Search and download the relevant ESXi drivers for HBAthe recommended driver (bfa) version for 82B in ESXi 5.1 is 3.0.0.0
    You can download it from the following URL.
    https://my.vmware.com/web/vmware/details?downloadGroup=DT-ESXi50-BROCADE-bfa-3000&productId=229
  4. Download the driver and install it using following instructions:

New Installation

For new installs, you should perform the following steps:

  1. Copy the VIB to the ESX server.  Technically, you can place the file anywhere that is accessible to the ESX console shell, but for these instructions, we’ll assume the location is in ‘/tmp’. Here’s an example of using the Linux ‘scp’ utility to copy the file from a local system to an ESX server located at 10.10.10.10:
  2. Issue the following command (full path to the VIB must be specified):

In the example above, this would be:

Note: Depending on the certificate used to sign the VIB, you may need to change the host acceptance level.  To do this, use the following command:

Also, depending on the type of VIB being installed, you may have to put ESX into maintenance mode.  This can be done through the VI Client, or by adding the ‘–maintenance-mode’ option to the above esxcli command.

Upgrade Installation

The upgrade process is similar to a new install, except the command that should be issued is the following:

Reboot host.

Now you should have the HBA should the datastores.

Remove licensing from ESXi host

WARNING: This is for education/informational testing/development purposes only, and should not be used on a production server.

WARNING: This trick will only work with an ESX(i) stand alone server.  It will not work if the ESX(i) server is connected to a vCenter Server, as the vCenter Server knows better than to let you do this.  (you can always remove and readd the ESX(i) server to vCenter.)

To reset your ESX 4.x, ESXi 4.x and ESXi 5.x 60 day evaluation license:

  1. Login to the TSM through SSH or Shell
  2. Remove the following two files:
  3. Reboot server

If your ESX server is connected to a vCenter server, please remove the ESX server first.  Once the steps above are completed, you can add it back to the vCenter server.

Command to remove the license and reboot the ESX host:

After reboot, logging on the ESXi server, you should be greeted with this message.

60-day-evaluation

For ESXi 5.1 and ESXi 5.5, you may need to continually remove the license files as the server reboots for this to work.  The following should do this quite nicely:

An alternative would be restarting the services, it should work just as well as rebooting the server:

For vCenter
1) Create a DSN to your local SQL Express instance that holds your vCenter DB.
2) Uninstall virtual center
3) Re-install virtual center and point to your DSN making sure not to overwrite.

With this method, I have been able to refresh my 4.1 and 5.0 hosts.  Have not confirmed if this works for 5.1.

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:

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

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:

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:

add the line:

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:

or

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.