Exchange 2010 zmiana InternalURL

Wyświetlenie obecnych url:

[PS] C:\Windows\system32>Get-WebServicesVirtualDirectory |fl identity,internalurl,externalurl

Identity : SERVER\EWS (Default Web Site)
InternalUrl : https://server.domena.local/EWS/Exchange.asmx
ExternalUrl : https://mail.domena.com/ews/exchange.asmx

Zmiana:

[PS] C:\Windows\system32>Set-WebServicesVirtualDirectory -Identity "SERVER\EWS (Default Web Site)" -InternalUrl https://mail.domena.com/EWS/Exchange.asmx BasicAuthentication:$true

ponowne sprawdzenie:

[PS] C:\Windows\system32>Get-WebServicesVirtualDirectory |fl identity,internalurl,externalurl

Identity : SERVER\EWS (Default Web Site)
InternalUrl : https://mail.domena.com/EWS/Exchange.asmx
ExternalUrl : https://mail.domena.com/ews/exchange.asmx

Sprawdzenie autodiscovera:

[PS] C:\Windows\system32>Get-ClientAccessServer |fl identity,autodiscoverserviceinternaluri

Identity : SERVER
AutoDiscoverServiceInternalUri : https://server.domena.local/Autodiscover/Autodiscover.xml

ustawienie nowego:

[PS] C:\Windows\system32>Set-ClientAccessServer -Identity SERVER -AutoDiscoverServiceInternalUri https://mail.domena.com/Autodiscover/Autodiscover.xml

Sprawdzenie:

[PS] C:\Windows\system32>Get-ClientAccessServer |fl identity,autodiscoverserviceinternaluri

Identity : SERVER
AutoDiscoverServiceInternalUri : https://mail.domena.com/Autodiscover/Autodiscover.xml

Restart IIS

[PS] C:\Windows\system32>iisreset /restart

Attempting stop...
Internet services successfully stopped
Attempting start...
Internet services successfully restarted

AFP Ubuntu 16.04

Zamontowanie zasobu po sambie

mkdir /mnt/timemachine

mount -t cifs //nazwa_servera_windows/timemachine$ /mnt/timemachine --verbose -o username=user_name,pass=haslo,dir_mode=0777,file_mode=0777

zainstalowanie

apt-get install netatalk

dopisanie w pliku: /etc/default/netatalk

ATALKD_RUN=no
PAPD_RUN=no
CNID_METAD_RUN=yes
AFPD_RUN=yes
TIMELORD_RUN=no
A2BOOT_RUN=no

edycja:  /etc/netatalk/AppleVolumes.default

/mnt/timemachine         "TimeMachine na backup" allow:user1,user2  options:tm

restart serwisów:

/etc/init.d/netatalk restart

źródło:https://mycyberuniverse.com/linux/afp-and-bonjour-under-linux.html

 

DNS – jeden wpis pomimo dwóch NIC

Problem:

Server AD, 2 karty sieciowe w różnych podsieciach LAN, iSCSI. Server DNS zwracał ip ze złej podsieci. Np. Będąc w podsieci LAN 192.168.0.0/24 zwracał ip servera z podsieci iSCSI 172.2.2.0/25.

Rozwiązanie:

To avoid this problem perform the following 3 steps (It is important that you follow all the steps to avoid the issue). 
1. Under Network Connections Properties: 
On the Unwanted NIC TCP/IP Properties -> Advanced -> DNS – > Uncheck “Register this connections Address in DNS” 

2. Open the DNS server console:  highlight the server on the left pane Action-> Properties and on the “Interfaces” tab select “listen on only the following IP addresses”. Remove unwanted IP address from the list

3. On the Zone properties, select Name server tab. Along with FQDN of the DC, you will see the IP address associated with the DC. Remove unwanted IP address if it is listed.

 After performing this delete the existing unwanted Host A record of the DC.

Źródło: https://support.microsoft.com/uz-latn-uz/help/2023004/steps-to-avoid-registering-unwanted-nic-s-in-dns-on-a-mulithomed-domai

Automatyczne mapowanie dysku vhd podczas startu systemu Windows

Fajna sprawa “dyski” vhd można w łatwy sposób mapować nawet po ścieżce UNC z innego servera zawartość pliku mapowanie_vhd.txt

select vdisk file=”\\net_share\backup.vhd”
attach vdisk
exit

łatwo z poziomu powershella dodać taska mapującego dysk po starcie systemu z opóźnieniem 4 minuty:

schtasks /create /tn "mapowanie_vhd" /tr "diskpart.exe /s 'c:\skrypty\mapowanie_vhd.txt'" /sc ONSTART /ru administrator /rp hasło_administratora /DELAY 0004:00

Eksportowanie virtualek

# skasowanie plików i folderow starszych niz 30 dni
$date = (Get-Date).ToString('dd_MM_yyyy')
# tworzenie folderu - nie wywala bledu nawet jesli istnieje
New-Item -ItemType Directory -Force -Path "E:\BACKUP_VIRTUALKI\"
Get-ChildItem –Path "E:\BACKUP_VIRTUALKI" -Recurse | Where-Object {($_.LastWriteTime -lt (Get-Date).AddDays(-30))} | Remove-Item -Recurse -Force
New-Item -ItemType Directory -Path "E:\BACKUP_VIRTUALKI\$date"
Export-VM -NAME "SERVER01" -Path "E:\BACKUP_VIRTUALKI\$date\"
Export-VM -NAME "SERVER02" -Path "E:\BACKUP_VIRTUALKI\$date\"
Export-VM -NAME "SERVER03" -Path "E:\BACKUP_VIRTUALKI\$date\"
Export-VM -NAME "SERVER04" -Path "E:\BACKUP_VIRTUALKI\$date\"