February 26, 2017

SMB v1 GPO adm

CLASS MACHINE

CATEGORY !!SMB_Version

POLICY !!SMB1
KEYNAME "SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters"
EXPLAIN !!SMB1Help
VALUENAME "SMB1"
VALUEON NUMERIC 1
VALUEOFF NUMERIC 0
END POLICY

POLICY !!SMB2
KEYNAME "SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters"
EXPLAIN !!SMB2Help
VALUENAME "SMB2"
VALUEON NUMERIC 1
VALUEOFF NUMERIC 0
END POLICY

END CATEGORY

[strings]
SMB_Version="SMB Version"
SMB1="SMB v1"
SMB1Help="Enable/Disable SMB version 1 by changing the value of 'SMB1' REG_DWORD in SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters."
SMB2="SMB v2"
SMB2Help="Enable/Disable SMB version 2 by changing the value of 'SMB2' REG_DWORD in SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters. Caution - SMB v3 works on the same stack as v2 (don't touch it)."



adm file can be easilly converted to admx via ADMX Migrator

February 19, 2017

Exchange setup error

"A reboot from a previous installation is pending. Please restart the system and then rerun Setup." 

If you are getting the error again after reboot (do it twice), clean up the values in REG_MULTI_SZ below: 

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations 

Sure thing backup registry first.

February 14, 2017

RDS connection issue

"The task you are trying to do can't be completed because Remote Desktop Services is currently busy".

In this case you need to reset your session. 

Connect to remote server via psexec tool.
psexec \\Server1 cmd

Optionally you can connect with different credentials by specifying -u key. 

Find out your session ID by running:
query session

Reset your session
reset session ID

Now you should be able to logon with no issue.

Update 25/05/2017: No need to use psexec as query/reset commands have /server parameter. :/ 



Exchange 2013 - IMAP Health

Check components by running:
Get-ServerComponentState -Identity CASServer1

If ImapProxy component has inactive state run the command below:
Set-ServerComponentState -Identity CASServer1 -State Active -Requester HealthAPI -Component ImapProxy

For more deep troubleshooting you can refer to the following KB - Troubleshooting IMAP Health Set.

#Connection Closed Gracefully.

February 1, 2017

PRTG - VMware datastore latency monitoring

Here is an example how to monitor individual ESXi datastores read/write latency through vCenter and PRTG. Tested with PRTG V16.4.28.7421 and ESXi 5.1. "VMware vSphere PowerCLI" is required on Probe server.

# "DataStoreName - totalWriteLatency.ps1" file
Add-PSSnapin VMware.VimAutomation.Core
$a=Connect-VIServer vCenterServer -User "Domain\User" -Password "UserPassword" -WarningAction SilentlyContinue
$p=@()
$p=Get-Datastore DataStoreName | foreach {$dsName = $_.Name; $uuid = $_.ExtensionData.Info.Url.Split('/')[-2]; Get-VMHost -Datastore $_ | Get-Stat -Stat "datastore.totalWriteLatency.average" -Realtime | where {$_.Instance -eq $uuid} | sort Timestamp -descending | select -first 1 | select -expand Value}
echo $p':ok'

# "DataStoreName - totalReadLatency.ps1" file.
Add-PSSnapin VMware.VimAutomation.Core
$a=Connect-VIServer vCenterServer -User "Domain\User" -Password "UserPassword" -WarningAction SilentlyContinue
$p=@()
$p=Get-Datastore DataStoreName | foreach {$dsName = $_.Name; $uuid = $_.ExtensionData.Info.Url.Split('/')[-2]; Get-VMHost -Datastore $_ | Get-Stat -Stat "datastore.totalReadLatency.average" -Realtime | where {$_.Instance -eq $uuid} | sort Timestamp -descending | select -first 1 | select -expand Value}
echo $p':ok' 

Put both files into "PRTG Installation folder\Custom Sensors\EXE" and create EXE/Script sensors.