Wednesday, June 28, 2017

Format HDD for exchange 2016 using ReFS

windows disk management:

  1. Initialize,GPT
  2. Format ReFS, 64K, Quick format
  3. assign drive letter: R

PowerShell: (to disable integrity streams)

  1. Format-Volume -DriveLetter r -FileSystem ReFS -AllocationUnitSize 65536 -SetIntegrityStreams $false

 

Links:
http://www.careexchange.in/creating-refs-volumes-for-exchange-20132016/

https://www.veeam.com/blog/advanced-refs-integration-coming-veeam-availability-suite.html

https://www.vladan.fr/veeam-and-refs-best-practices-and-benefits/

Tuesday, June 27, 2017

vSphere shrink hard drive on windows OS

  1. shrink HDD using windows disk management.
  2. connect to host using SSH
  3. turn off windows computer
  4. cd /vmfs/volumes/<datastore name>/<VM foldername>
  5. use cat “VM name.vmdk” (not the flat one) to make a note of the RW number#
  6. calculate new size 128GB= 128 * 1024 * 1024 * 1024 /512 = 268435456
  7. vi “VM name.vmdk” replace RW with the new number
  8. vi edit shift I is to edit text; ESC to end editing; exit and save changes shift :x; shift:q! is to exit without changes
  9. use vSphere to migrate or move VM to a temporary host (this will resize the HDD to the new size)
  10. be patient depending on the HDD size it can take some time
  11. verify size in temporary location using vSphere
  12. move back to original location

 

Links:

https://www.experts-exchange.com/articles/12938/HOW-TO-Shrink-a-VMware-Virtual-Machine-Disk-VMDK-in-15-minutes.html

Wednesday, June 21, 2017

windows 2012 R2 domain AD health check

 list of simple commands to check the health of AD

  1. DCs replication status (CMD):
    repadmin /showrepl
  2. domain replication status (CMD):
    dcdiag /v
  3. MS AD replication status tool:
    https://www.microsoft.com/en-us/download/details.aspx?id=30005

Exchange 2010 add user permissions on other user calendar

 add-MailboxFolderPermission -Identity smith@contoso.com:\calendar -User novak@contoso.com -AccessRights Reviewer

Here is MS link with additional information: https://technet.microsoft.com/en-us/library/bb124097(v=exchg.160).aspx

Tuesday, June 6, 2017

Purple screen crash on ESXi 5.5 with Windows Server 2012 R2

 the problem seems to be in the NIC driver.

https://communities.vmware.com/message/2313523

There are two reported fixes:

  1. Disable Receive-side scaling (MS article)
    1. On the virtual machine, open Device Manager (In Settings click Control Panel, and then click Device Manager).

    2. Expand Network adapters, right-click the network adapter you want to work with, and then click Properties.

    3. On the Advanced tab in the network adapter properties, locate the setting for Receive-side scaling and make sure it is disabled.

      or use powershell:

      Set-NetAdapterRSS -Name "AdapterName" -Enabled $False

       

  2. Second option is to use vmxnet3 driver instead of the E1000E
    1. Inside the windows host OS make a note of all the NIC information (IP/ MASK/Gate/DNS etc.)
    2. Remove the old NIC using the vSphere console by editing the windows 2012 server host properties (if needed copy the old MAC address and after deleting the old NIC enter it to the properties of the new NIC)
    3. Using the VMWARE vSphere client edit the virtual machine and add new NIC card (make sure to select VMXNET3 as a adapter type).
    4. Edit the new NIC properties inside the windows 2012 server host OS with the previously noted information to make the new NIC be identical to the old one.
    5. Enable the new nic and restart the windows 2012 server

 

I found some people to report that turning OFF the Receive-side scaling didn’t help.

The second option seems to be a better choice since the new VMWARE VMXNET3 driver has a better design with many improvements.

 


Friday, June 2, 2017

Switch to AHCI mode in windows 10 with BitLocker enabled

 

  1. click on start and type manage BitLocker and launch it. (requires administrative user)
  2. click on Turn off BitLocker (wait on the decryption to finish – it is indicated in the system tray)
  3. reboot your computer to make sure BitLocker is disabled.
  4. Right-click the Windows Start Menu and click on Command Prompt (Admin).
  5. Enter: bcdedit /set {current} safeboot minimal
  6. Reboot the computer in to the BIOS  (F2,Del,ESC,F12 or other key depending on the computer manufacturer).
  7. Look for SATA operation mode and change it to AHCI and save + reboot computer. (F10 key etc.)
  8. windows should start up in safemode.
  9. Right-click the Windows Start Menu and click on Command Prompt (Admin).
  10. Enter: bcdedit /deletevalue {current} safeboot
  11. reboot computer and windows should start up normally again.
  12. click on start and type manage BitLocker and launch it. (requires administrative user)
  13. click on Turn ON BitLocker you will be required to reboot computer.
  14. after reboot wait on the encryption to finish – it is indicated in the system tray

Wednesday, May 31, 2017

Disable iCloud and siri prompt when new user login

 After setting up clean install of macOS Sierra in a multi-user environment (computer lab) it is useful to disable iCloud and siri prompt at the first login.

Here is the original link with instructions and a script to disable iCloud promt:

https://derflounder.wordpress.com/2013/10/27/disabling-the-icloud-sign-in-pop-up-message-on-lion-and-later/

the script is:

#!/bin/sh

# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
sw_vers=$(sw_vers -productVersion)

# Checks first to see if the Mac is running 10.7.0 or higher. 
# If so, the script checks the system default user template
# for the presence of the Library/Preferences directory.
#
# If the directory is not found, it is created and then the
# iCloud pop-up settings are set to be disabled.

if [[ ${osvers} -ge 7 ]]; then

 for USER_TEMPLATE in "/System/Library/User Template"/*
  do
    defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant DidSeeCloudSetup -bool TRUE
    defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none
    defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant LastSeenCloudProductVersion "${sw_vers}"
  done

 # Checks first to see if the Mac is running 10.7.0 or higher.
 # If so, the script checks the existing user folders in /Users
 # for the presence of the Library/Preferences directory.
 #
 # If the directory is not found, it is created and then the
 # iCloud pop-up settings are set to be disabled.

 for USER_HOME in /Users/*
  do
    USER_UID=`basename "${USER_HOME}"`
    if [ ! "${USER_UID}" = "Shared" ] 
    then 
      if [ ! -d "${USER_HOME}"/Library/Preferences ]
      then
        mkdir -p "${USER_HOME}"/Library/Preferences
        chown "${USER_UID}" "${USER_HOME}"/Library
        chown "${USER_UID}" "${USER_HOME}"/Library/Preferences
      fi
      if [ -d "${USER_HOME}"/Library/Preferences ]
      then
        defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant DidSeeCloudSetup -bool TRUE
        defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none
        defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant LastSeenCloudProductVersion "${sw_vers}"
        chown "${USER_UID}" "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant.plist
      fi
    fi
  done
fi

 

 

And here is the original link with information on how to disable siri:

https://derflounder.wordpress.com/2016/09/20/supressing-siri-pop-up-windows-on-macos-sierra/

and here is the script

#!/bin/bash

# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
sw_vers=$(sw_vers -productVersion)

# Determine OS build number

sw_build=$(sw_vers -buildVersion)

# Checks first to see if the Mac is running 10.7.0 or higher. 
# If so, the script checks the system default user template
# for the presence of the Library/Preferences directory. Once
# found, the iCloud, Diagnostic and Siri pop-up settings are set 
# to be disabled.

if [[ ${osvers} -ge 7 ]]; then

 for USER_TEMPLATE in "/System/Library/User Template"/*
  do
    /usr/bin/defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant DidSeeCloudSetup -bool TRUE
    /usr/bin/defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none
    /usr/bin/defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant LastSeenCloudProductVersion "${sw_vers}"
    /usr/bin/defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant LastSeenBuddyBuildVersion "${sw_build}"
    /usr/bin/defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant DidSeeSiriSetup -bool TRUE      
  done
  
 # Checks first to see if the Mac is running 10.7.0 or higher.
 # If so, the script checks the existing user folders in /Users
 # for the presence of the Library/Preferences directory.
 #
 # If the directory is not found, it is created and then the
 # iCloud, Diagnostic and Siri pop-up settings are set to be disabled.

 for USER_HOME in /Users/*
  do
    USER_UID=`basename "${USER_HOME}"`
    if [ ! "${USER_UID}" = "Shared" ]; then
      if [ ! -d "${USER_HOME}"/Library/Preferences ]; then
        /bin/mkdir -p "${USER_HOME}"/Library/Preferences
        /usr/sbin/chown "${USER_UID}" "${USER_HOME}"/Library
        /usr/sbin/chown "${USER_UID}" "${USER_HOME}"/Library/Preferences
      fi
      if [ -d "${USER_HOME}"/Library/Preferences ]; then
        /usr/bin/defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant DidSeeCloudSetup -bool TRUE
        /usr/bin/defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none
        /usr/bin/defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant LastSeenCloudProductVersion "${sw_vers}"
        /usr/bin/defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant LastSeenBuddyBuildVersion "${sw_build}"
        /usr/bin/defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant DidSeeSiriSetup -bool TRUE
        /usr/sbin/chown "${USER_UID}" "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant.plist
      fi
    fi
  done
fi

exit 0

Monday, May 15, 2017

simple HTML page redirection

 Create page index.html (or which ever is your server default page to be loaded when you access a folder)

type:

<meta http-equiv=”refresh” content=”0;URL=’http://domain.com/page-to-be-redirected-to'” />

this way when someone opens domain.com/old-location will be redirected to domain.com/page-to-be-redirected-to

Tuesday, May 9, 2017

Grant printer admin rights on a mac to domain users

 allow administration of printers by domain users:

/usr/sbin/dseditgroup -o edit -n /Local/Default -a ‘Domain Users’ -t group _lpadmin

 

If not part of domain you can grant printer admin rights to everyone:

/usr/sbin/dseditgroup -o edit -n /Local/Default -a everyone -t group _lpadmin

Thursday, May 4, 2017

Disable spellcheck word 2016

 Here is a solution on how to disable spellcheck in word 2016 using group policy:

 

 

reference: http://www.edugeek.net/forums/windows/181129-disable-spellcheck-word-2016-a.html

Additionally we create special domain user which is blocked at the firewall level from internet content.

How to Fix ADSelfService Plus SSL Path Errors (GoDaddy P7B Guide)

If you manage ManageEngine ADSelfService Plus on Windows Server 2022 and rely on GoDaddy for your SSL certificates, you have likely run ...