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

Home

LDAP

Details
Written by: po3dno
Category: Windows
Created: 30 September 2021
Hits: 1000

Условия LDAP

Фильтр определяет необходимые условия  для  включения объекта в результат запроса. LDAP-фильтр может содержать одно или более условий. 
Результат условия - "Истина" или "Ложь". Общий вид фильтра

(<Атрибут AD><оператор сравнения><значение>)

<Атрибут AD> - LDAP-имя атрибута AD. Операторы сравнения

Оператор Значение
= Равенство
>= Больше или равно
<= Меньше или равно

Read more …

iso uefi

Details
Written by: po3dno
Category: Power Shell
Created: 05 July 2021
Hits: 1093

Mount-WindowsImage -Path .\iso -ImagePath 'C:\VMs\w2012r2_en\Virtual Hard Disks\w2012r2_en.vhdx' -Index 1

New-WindowsImage -CapturePath .\iso -Name "Windows 2012R2 2111" -ImagePath C:\winpe_x64\install.wim -Description "Windows 2012R2 2111" -Verify

Dismount-WindowsImage -Path .\iso\ -Discard

unpack iso

replace install.wim

.\oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,bC:\winpe_x64\ISO\boot\etfsboot.com#pEF,e,bC:\winpe_x64\ISO\efi\microsoft\boot\efisys.bin c:\winpe_x64\ISO D:\VM\ISO\SW_DVD9_Windows_Svr_Std_and_DataCtr_2012_R2_64Bit_Russian_-4_MLF_X19-82917_2111.iso

How to stop computer from entering sleep under “Critical Battery Trigger Met” misidentification

Details
Written by: po3dno
Category: Other
Created: 17 June 2021
Hits: 1217
powercfg -setdcvalueindex SCHEME_CURRENT SUB_BATTERY BATACTIONCRIT 0

Mailbox permission export in excel

Details
Written by: po3dno
Category: Exchange Server
Created: 08 June 2021
Hits: 1134
$report = @()
$Mbxs = Get-Mailbox -Resultsize Unlimited
foreach ($Mbx in $Mbxs)
{
   $Owner = Get-Mailbox $Mbx | Get-MailboxPermission -Owner
   $Manager = Get-ADUser $mbx.SamAccountName -Server domain.com -Properties Manager #| select Name, @{N='Manager';E={(Get-ADUser $_.Manager).name}}
   $permission = get-mailboxpermission -identity $Mbx |where {$_.user -notlike "*NT AUTHORITY\SELF" -and $_.IsInherited -eq $false}| select  @{Name="Displayname"; Expression={(Get-Recipient $_.user.ToString()).Displayname.ToString()}}, @{Name="primarysmtpaddress"; Expression={(Get-Recipient $_.user.ToString()).primarysmtpaddress.ToString()}}, user, @{Name="AccessRights";Expression={$_.AccessRights}}| Select User, name, accessrights


    $reportObj = New-Object PSObject
    $reportObj | Add-Member NoteProperty -Name "Mailbox Name" -Value $mbx.name
    $reportObj | Add-Member NoteProperty -Name "RecipientTypeDetails" -Value $mbx.RecipientTypeDetails
    $reportObj | Add-Member NoteProperty -Name "Access Rights" -Value $permission.AccessRights
    $reportObj | Add-Member NoteProperty -Name "Username" -Value $permission.user
    $reportObj | Add-Member NoteProperty -Name "Owner" -Value $Owner.owner
    $reportObj | Add-Member NoteProperty -Name "Manager" -Value $Manager.manager


    
    $report += $reportObj

}
$report 

MariaDB partition

Details
Written by: po3dno
Category: MariaDB
Created: 09 February 2021
Hits: 1104
alter table app_log_Test drop PRIMARY KEY, add primary key (`id`, `dateCreated`);

Next, I can re-run my alter table to add the partitions I care about.

ALTER TABLE app_log_Test
PARTITION BY RANGE (TO_DAYS(dateCreated))
    (PARTITION p_invalid_date VALUES LESS THAN (0) ENGINE = TokuDB,
    PARTITION p_201809 VALUES LESS THAN (TO_DAYS('2018-09-01 00:00:00')),
    PARTITION p_201810 VALUES LESS THAN (TO_DAYS('2018-10-01 00:00:00')),
    PARTITION p_max_future_dates VALUES LESS THAN MAXVALUE);

If I need to add more partitions after that. I don't have to specify the partition scheme again I can just add the partition and its constraints.

ALTER TABLE app_log_Test
    REORGANIZE PARTITION p_max_future_dates INTO (
        PARTITION p_201811 VALUES LESS THAN (TO_DAYS('2018-11-01 00:00:00')),
        PARTITION p_201812 VALUES LESS THAN (TO_DAYS('2018-12-01 00:00:00')),
        PARTITION p_max_future_dates  VALUES LESS THAN MAXVALUE);  

My table now looks like this.

show create table app_log_Test;
Create Table: CREATE TABLE `app_log_Test` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `dateCreated` datetime NOT NULL,
  `host` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `label` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `event` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `level` varchar(8) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `message` text COLLATE utf8mb4_unicode_ci,
  `version` bigint(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`,`dateCreated`),
  KEY `app_log_dateCreated` (`dateCreated`),
  KEY `app_log_label` (`label`),
  KEY `app_log_event` (`event`),
  KEY `app_log_level` (`level`)
) ENGINE=TokuDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `COMPRESSION`=tokudb_zlib
  1. Automatic Partition Maintenance in MariaDB
  2. Sleep unattended idle timeout
  3. Схемы электропитания
  4. Mikrotik Dynamic Dhcp-Client Load balance script.

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:  7

Docker Article Count:  2

pg Article Count:  1

Page 11 of 32

  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15

Login Form

  • Forgot your password?
  • Forgot your username?

Statistics

  • Users 2
  • Articles 164
  • Articles View Hits 149004