Home
- Details
- Written by: po3dno
- Category: Power Shell
- Hits: 1086
[void][reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration")
$wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::getUpdateServer("localhost",$False)
$groupall = $wsus.GetComputerTargetGroups()
$pcall = $groupall | %{$_.GetComputerTargets()}
- Details
- Written by: po3dno
- Category: Exchange Server
- Hits: 1229
Set-UserPhoto "Paul Cannon" -PictureData ([System.IO.File]::ReadAllBytes("C:\Users\Administrator\Desktop\PaulCannon.jpg"))
- Details
- Written by: po3dno
- Category: C#
- Hits: 1244
string pc = System.Environment.MachineName;
if (args.Count() == 1)
pc = args[0];
// Ограничение на поле class = 33 символа
string[] List = new string[] {
"Win32_BaseBoard",
"Win32_BIOS",
"Win32_ComputerSystem",
//"Win32_Environment",
"Win32_LogicalDisk",
"Win32_NetworkAdapter",
"Win32_OperatingSystem",
"Win32_NetworkAdapterConfiguration"
};
- Details
- Written by: po3dno
- Category: Exchange Server
- Hits: 1235
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: 1261
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)"}