Thursday, March 3, 2016

[EX2010] Configure TLS Certificate for Receive Connectors




Get-ExchangeCertificate


$cert = Get-ExchangeCertificate -Thumbprint E67EC3C8D679AA35D17678FEC51907272B1BAE2

$tlscertificatename = "<i>$($cert.Issuer)<s>$($cert.Subject)"

Set-ReceiveConnector "EX2016SRV1\Client Frontend EX2016SRV1" -TlsCertificateName $tlscertificatename

Wednesday, March 2, 2016

[WSRV] Hyper-V VM doesn't start. “‘General access denied error’ (0x80070005)”



  1. Note the Virtual Machine ID that is listed in the "‘General access denied error’ (0x80070005)" error message.

    For example, consider the following error message:

    ‘VMName’: IDE/ATAPI Account does not have sufficient privilege to open attachment
    ‘E:\VMs\VMName\Disk0.vhd. Error: ‘General access denied error’ (0x80070005). (Virtual
    Machine ID 5FC5C385-BD98-451F-B3F3-1E50E06EE663)

    In this example, the Virtual Machine ID is 5FC5C385-BD98-451F-B3F3-1E50E06EE663.
  2. Open an elevated command prompt.
  3. To give the Virtual Machine ID (SID) access to the .vhd or .avhd file, type the following command, and then press Enter:
    icacls <Path of .vhd or .avhd file> /grant "NT VIRTUAL MACHINE\<Virtual Machine ID from step 1>":(F)
    For example, to use the Virtual Machine ID that you noted in step 1, type the following command, and then press Enter:
    icacls "E:\VMs\VMName\Disk0.vhd" /grant "NT VIRTUAL MACHINE\5FC5C385-BD98-451F-B3F3-1E50E06EE663":(F)
  4. Start the virtual machine.
https://support.microsoft.com/en-us/kb/2249906

[WSRV] List Global Catalog Servers



  • nslookup
  • set type=srv
  • _gc._tcp.domain.local




  • nltest /dsgetdc:alabama.usa /gc




  • netdom query dc



  • Open Active Directory Sites and Services.
  • In the console tree, expand the Sites container, expand the site of the domain controller you want to check, expand the Servers container, and then expand the Server object.
  • Right-click the NTDS Settings object, and then click Properties.
  • On the General tab, if the Global Catalog box is selected, the domain controller is designated as a global catalog server.

Tuesday, February 2, 2016

[EX2016] Pre-requisites

Exchange 2016

  • Mailbox (2012 R2)

Install-WindowsFeature RSAT-ADDS, AS-HTTP-Activation, Desktop-Experience, NET-Framework-45-Features, RPC-over-HTTP-proxy, RSAT-Clustering, RSAT-Clustering-CmdInterface, RSAT-Clustering-Mgmt, RSAT-Clustering-PowerShell, Web-Mgmt-Console, WAS-Process-Model, Web-Asp-Net45, Web-Basic-Auth, Web-Client-Auth, Web-Digest-Auth, Web-Dir-Browsing, Web-Dyn-Compression, Web-Http-Errors, Web-Http-Logging, Web-Http-Redirect, Web-Http-Tracing, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Lgcy-Mgmt-Console, Web-Metabase, Web-Mgmt-Console, Web-Mgmt-Service, Web-Net-Ext45, Web-Request-Monitor, Web-Server, Web-Stat-Compression, Web-Static-Content, Web-Windows-Auth, Web-WMI, Windows-Identity-Foundation, RSAT-DNS-Server, GPMC, Telnet-Client

.NET Framework 4.5.2
https://www.microsoft.com/en-us/download/details.aspx?id=42642

Unified Communications Managed API 4.0 Runtime



  • Edge Transport (2012 R2)

Install-WindowsFeature ADLDS

After you've installed the operating system roles and features, install .NET Framework 4.5.2
https://www.microsoft.com/en-us/download/details.aspx?id=42642


Friday, January 29, 2016

[O365] Recover messages deleted from Recoverable items folders


To verify the number of items:
Search-Mailbox "user@testtenant.com.br" -TargetMailbox "Discovery Search Mailbox" -TargetFolder "Recover1" -LogLevel Full -SearchDumpsterOnly -LogOnly

To copy the items to another user folder:
Search-Mailbox "user@testtenant.com.br" -TargetMailbox "user2@testtenant.com.br"  -TargetFolder "Recover1" -LogLevel Full -SearchDumpsterOnly

Tuesday, January 26, 2016

[WSRV] Retrieve user details from Active Directory using SID


$strSID="S-1-5-21-500000003-1000000000-1000000003-1001"
$uSid = [ADSI]"LDAP://<SID=$strSID>"
echo $uSid


distinguishedName : {CN=John Doe,OU=Domain Admins,OU=People,OU=xxx,DC=xxx}
Path              : LDAP://<SID=S-1-5-21-500000003-1000000000-1000000003-1001>

[WSRV] Reset the Secure Channel


netdom reset /d:devgroup.contoso.com mywksta


OR


nltest /sc_verify:iammred

ipconfig /flushdns
arp -d *
Get-Service netlogon | restart-service
nltest.exe /sc_verify:<fully.qualified.domain.name.here>


OR

nltest /SC_RESET:<DomainName> - Reset secure channel for <Domain> on <ServerName>

OR

Test-ComputerSecureChannel

Test-ComputerSecureChannel -Repair