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

Home

Кол-во записей по всем таблицам

Details
Written by: po3dno
Category: MSSQL
Created: 06 June 2016
Hits: 1032

SELECT OBJECT_NAME(id) table_name, rows FROM sysindexes WHERE indid IN (0,1) order by rows desc

Сброс пользователей 1С

Details
Written by: po3dno
Category: MSSQL
Created: 06 June 2016
Hits: 925

use [DBNAME]

EXEC sp_rename 'v8users', 'v8users_old'

GO

UPDATE Params

SET FileName = 'users.usr_old'

WHERE FileName = 'users.usr'

GO

 

use [DBNAME]

DROP TABLE v8users

GO

EXEC sp_rename 'v8users_old', 'v8users'

GO

UPDATE Params

SET FileName = 'users.usr'

WHERE FileName = 'users.usr_old'

GO

DHCP Policy

Details
Written by: po3dno
Category: Power Shell
Created: 24 May 2016
Hits: 1076

# получить список mac

[System.Collections.ArrayList]$d = (Get-DhcpServerv4Policy -ScopeId 172.16.36.0 -name "Mac allow").MacAddress

 

# удалить MAC

$d.Remove("24-e3-14-82-6c-86")

 

# добавить EQ

$res = ($d | ?{$_ -ne "EQ"} | sort) -join ",EQ," -replace '^(.*)','EQ,$1' -split ","

 

# сохранить политику

Set-DhcpServerv4Policy -ScopeId 172.16.36.0 -Name "Mac allow" -MacAddress $res

Add user to local group

Details
Written by: po3dno
Category: Power Shell
Created: 28 April 2016
Hits: 1036

$user = [ADSI]"WinNT://domain/username,user"

$AdminGroup = [ADSI]"WinNT://$host/Пользователи удаленного рабочего стола,group";

$AdminGroup.Add($user.Path)

Unlock local account

Details
Written by: po3dno
Category: Power Shell
Created: 28 April 2016
Hits: 1024

$ObjUser = [ADSI]"WinNT://$computer/$user" 
$ObjUser.IsAccountLocked = $false

  1. Powershell SSL Certificate
  2. Exchange 2013/2016 обновление
  3. процессы и их блокировки в SQL
  4. dump process in Windows Server 2008

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

Page 20 of 32

  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24

Login Form

  • Forgot your password?
  • Forgot your username?

Statistics

  • Users 2
  • Articles 176
  • Articles View Hits 157835