• Home
  • Linux
  • Docker
  • Windows
    • PS
    • C#
    • Exchange Server
  • Other
    • Perl
    • IPV6
    • MacOS
  • DB
    • MSSQL
    • MariaDB
    • PG

Home

Собираем информацию через WMI в БД MSSQL

Details
Written by: po3dno
Category: C#
Created: 08 December 2015
Hits: 1121

            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"

            };

Read more …

Exchange 2016 удаление

Details
Written by: po3dno
Category: Exchange Server
Created: 08 December 2015
Hits: 1112

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

 

Copy Receive Connectors to a New Exchange Server

Details
Written by: po3dno
Category: Exchange Server
Created: 29 May 2015
Hits: 1132

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)"}

Read more …

Удалить IE

Details
Written by: po3dno
Category: Other
Created: 16 March 2015
Hits: 1139

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

Port WWN

Details
Written by: po3dno
Category: Power Shell
Created: 16 March 2015
Hits: 1155

Get-WmiObject -class MSFC_FibrePortHBAAttributes -namespace "root\WMI" | Select -Expandproperty Attributes | % { ($_.PortWWN | % {"{0:x2}" -f $_}) -join ":"}

  1. Windows Server 2012 R2 Hyper-V Core
  2. Просмотр логов с транспортных серверов Exchange (Get-MessageTrackingLog)
  3. Обновление поля "Руководитель" в AD
  4. Установка кластера серверов 1С на двух физических серверах

Subcategories

Power Shell Article Count:  53

C# Article Count:  10

Perl Article Count:  1

Exchange Server Article Count:  15

Other Article Count:  24

MSSQL Article Count:  17

Windows Article Count:  25

MariaDB Article Count:  3

Linux Article Count:  8

Docker Article Count:  2

pg Article Count:  1

Page 22 of 32

  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26

Login Form

  • Forgot your password?
  • Forgot your username?

Statistics

  • Users 2
  • Articles 175
  • Articles View Hits 154385