Code Snippets

Exchange Installation – Enterprise Admins

Exchange Installation – Enterprise Admins

Error: The Active Directory Schema isn’t up-to-date, and this user account isn’t a member of the ‘Schema Admins’ and/or ‘Enterprise Admins’ groups. Error: Global updates need to be made to Active Directory, and this user account isn’t a member of the ‘Enterprise Admins’ group. Error: The local domain needs to be updated. You must be...

AutodiscoverExclude.reg

AutodiscoverExclude.reg

Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Outlook\AutoDiscover] "ExcludeHttpsAutoDiscoverDomain"=dword:00000001 "ExcludeHttpsRootDomain"=dword:00000001 "ExcludeSrvRecord"=dword:00000001 "ExcludeExplicitO365Endpoint "=dword:00000001

ExcludeExplicitO365Endpoint.reg

ExcludeExplicitO365Endpoint.reg

Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Outlook\AutoDiscover] "ExcludeExplicitO365Endpoint"=dword:00000001

Exchange SCP Autodiscover

Exchange SCP Autodiscover

[PS] C:Windowssystem32>Get-ClientAccessService | select Name, *autodiscover* Name : EX2016 AutoDiscoverServiceCN : ex2016 AutoDiscoverServiceClassName : ms-Exchange-AutoDiscover-Service AutoDiscoverServiceInternalUri : https://exchange.domain.com/Autodiscover/Autodiscover.xml AutoDiscoverServiceGuid : 77378f46-2c46-4aa9-a6a6-3e7a41b19596 AutoDiscoverSiteScope : {Vienna}

Set-RemoteMailbox ExchangeGUID

Set-RemoteMailbox ExchangeGUID

Set-RemoteMailbox user.cloud -ExchangeGuid 594fd053-1f81-4ad0-bc89-9f144c5a5183 -ArchiveGuid de702a74-29dd-46d8-a712-0d033e56a69c

Enable-RemoteMailbox

Enable-RemoteMailbox

Enable-RemoteMailbox user.cloud -RemoteRoutingAddress user.cloud@deinedomain.mail.onmicrosoft.com

Get-Mailbox ExchangeGUID

Get-Mailbox ExchangeGUID

PS C:\Users\kschweiger> Get-Mailbox user.cloud | select Name, ExchangeGUID, ArchiveGUID Name ExchangeGuid ArchiveGuid —- ———— ———– user.cloud 594fd053-1f81-4ad0-bc89-9f144c5a5183 de702a74-29dd-46d8-a712-0d033e56a69c

AutoLogon_enable

AutoLogon_enable

### Enable ‚AutoLogon‘ Set-ItemProperty -Path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "AutoAdminLogon" -Value "1" ### Specify for which user AutoLogon should be enabled Set-ItemProperty -Path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "DefaultUsername" -Value "Administrator" ### Extract the initial Administrator Password from the VMWare Config $vmwaretoolspath = "C:\Program Files\VMware\VMware Tools\vmtoolsd.exe" $tmp = & $vmwaretoolspath –cmd "info-get guestinfo.cloudinit.metadata" | Out-String $tmp = [System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String($tmp))...

Load_HKEY_USER_Hive

Load_HKEY_USER_Hive

### Get SID of local Administrator $localadmin = Get-LocalUser | where {$_.Name -like "Administrator"} ### Load HKEY_USER Hive of local Administrator reg load HKU\$($localadmin.SID.Value) C:\Users\Administrator\ntuser.dat ### Check if ‚RunOne‘ Key is already available, if not create it if(!(Test-Path -Path Registry::HKEY_USERS\$($localadmin.SID.Value)\Software\Microsoft\Windows\CurrentVersion\RunOnce)){ New-Item -Path Registry::HKEY_USERS\$($localadmin.SID.Value)\Software\Microsoft\Windows\CurrentVersion\RunOnce } ### Create RunOnce Variable und set Path to Powershell Script Set-ItemProperty...

SetRegion.ps1

SetRegion.ps1

$regionPS = {& $env:SystemRoot\System32\control.exe "intl.cpl,,/f:`"C:\Windows\Temp\Region_de-AT.xml`""} Add-Content -Path "C:\Windows\Temp\SetRegion.ps1" -Value $regionPS