Friday, February 16, 2018

You are unable to choose the OU in EAC when creating a new Mailbox, Groups or Contacts

Exchange Control Panel (ECP) can display no more than 500 OUs. When there are more than 500 OUs, a new window is generated, and this window is either blank or contains a "There are more items to show in this view" message.
  1. On the Exchange Server 2013 (2016 ) mailbox server, go to the following folder:
     
    C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp
  2. Add the following lines in the web.config file just above </appsettings>:
    
    <add key="GetListDefaultResultSize" value="5000" /> 
  3. Restart MSExchangeECPAppPool.

Monday, February 12, 2018

Enabling Disk Performance Counters in Windows Server 2012 R2 Task Manager

  1. Ensure Task Manager is closed.
  2. Launch the Command Prompt using the "Run as Administrator" option. 
  3. Enter the following at the Command Prompt:  diskperf -Y

Friday, February 9, 2018

Get proxy settings using PowerShell

Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' `| Select-Object *Proxy*

TMG Allow SSL request on an additional port

“12204 The specified Secure Sockets Layer (SSL) port is not allowed. ISA Server is not configured to allow SSL requests from this port. Most Web browsers use port 443 for SSL requests.”

To add non SSL port:

Create vbs scrript

For example 8455 port, change this on your port

Dim root 
Dim tpRanges 
Dim newRange 
Set root = CreateObject("FPC.Root")
Set tpRanges = root.GetContainingArray.ArrayPolicy.WebProxy.TunnelPortRanges
set newRange = tpRanges.AddRange("SSL 8455", 8455, 8455)

tpRanges.Save

run this script from cmd  running as Administrator using cscript command.




Wednesday, December 6, 2017

Clear IIS logs using powershell script

get-childitem -Path c:\inetpub\logs\logfiles\w3svc*\*.log -recurse |
where-object {$_.lastwritetime -lt (get-date).addDays(-30)} |
Foreach-Object { del $_.FullName }

Tuesday, November 28, 2017

“The RPC server is unavailable” while trying to take Remote Desktop of 2003 Server

When trying to logon to Windows server 2003 via remote desktop you receive the following message:

The system cannot log you on due to the following error:
The RPC server is unavailable.
Please try again or consult your system administrator.

You will also receive the following event in the target server’s application event log:

Event ID: 1219
Logon rejected for Domain\User. Unable to obtain Terminal Server User Configuration. Error: The RPC server is unavailable.

To resolve this :

1. Locate the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
2. Create a new DWORD called IgnoreRegUserConfigErrors
3. Give it a value of 1

Source

Friday, November 10, 2017

ADD extensionAttribute

If you have different upn names , than your domain server name and you need to use different upn-s for ldap queris you can add sammaacountname + server domain name to custem attributes.

In file atribute.txt write users sammaccountnames.

Import-Module ActiveDirectory
$Users = Get-Content c:\tmp\atribute.txt
ForEach ($User in $Users) {
$username = Get-ADUser -Server test.local -Identity "$user" -Properties  samaccountname |select -ExpandProperty samaccountname
Set-ADUser -Server test.local -Identity "$user" -Add @{extensionAttribute13="$Username@test.local"}
}