Home
- Details
- Written by: po3dno
- Category: Exchange Server
- Hits: 1088
1. Удаление автономной адресной книги
Get-OfflineAddressBook | Remove-OfflineAddressBook -confirm:$false -force
2. Удаление арбитражных ящиков
Get-Mailbox -Arbitration | Disable-Mailbox -Arbitration –DisableLastArbitrationMailboxAllowed -confirm:$false
3. Отключение всех ящиков
Get-Mailbox -archive | Disable-Mailbox -confirm:$false
Get-Mailbox -monitoring | Disable-Mailbox -confirm:$false
Get-Mailbox | Disable-Mailbox -confirm:$false
Get-Mailbox -AuditLog | Disable-Mailbox -confirm:$false
4. Удаление базы данных
Get-MailboxDatabase | Remove-MailboxDatabase -confirm:$false
- Details
- Written by: po3dno
- Category: Exchange Server
- Hits: 1094
To perform this task, we'll first set two variables to define the source and target servers:
$OldServer = "OldServer"
$NewServer = "NewServer"
Then, we'll retrieve the list of non-default Receive Connectors from the source server into the variable$ReceiveConnectors:
[array]$ReceiveConnectors = Get-ReceiveConnector -Server $OldServer | Where {$_.Name -notlike "Default $($OldServer)" -and $_.Name -notlike "Client $($OldServer)"}
- Details
- Written by: po3dno
- Category: Other
- Hits: 1104
gc computers.txt | %{$c = $_; ..\PsExec.exe -s -d -n 5 \\$c cmd /c 'Uninstall_IE10.cmd'}
Содержимое Uninstall_IE10.cmd:
FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*10.*.mum /c "cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /quiet /norestart
Содержимое Uninstall_IE11.cmd:
FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*11.*.mum /c "cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /quiet /norestart
- Details
- Written by: po3dno
- Category: Power Shell
- Hits: 1127
Get-WmiObject -class MSFC_FibrePortHBAAttributes -namespace "root\WMI" | Select -Expandproperty Attributes | % { ($_.PortWWN | % {"{0:x2}" -f $_}) -join ":"}
- Details
- Written by: po3dno
- Category: Other
- Hits: 1198
Настройка сервера в режиме Core
Исходные данные:
2 сетевых адаптера, managment VLAN 1618
Задача:
- Объединить в тиминг
- Создать vSwitch
- Пробросить mangment vlan через vSwitch
- Ввести в домен
- Предоставить доступ RDP
Выполняем:
Получаем установленные адаптеры в системе:
Get-NetAdapter
Делаем тиминг из активных адаптеров:
New-NetLbo-Team -name "NIC Team" -Teammembers
Создаем виртуальный свитч и говорим, что ОС может управляться через vlan 1618:
New-VMSwitch -name "Physics" -NetAdapterName "NIC Team" -AllowManagementOS $true
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "Physics" -Access -VlanId 1618
Задаем IP и DNS:
Get-NetAdapter
New-NetIPAddress -InterfaceAlias "vEthernet (Physics)" -IPAddress 10.116.18.221 -PrefixLength 24 -DefaultGateway 10.116.18.254
Set-DNSClientServerAddress -InterfaceAlias "vEthernet (Physics)" –ServerAddresses (“10.0.0.1”,”10.0.0.2”)
Разрешаем подключение через RDP в Firewall:
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
Доменим
через sconfig