get-adgroupmember : The size limit for this request was exceeded

Although I have worked in big infrastructures, it is not long time ago, I have personally met with the limitation of ADWS service.  Because exists good reasons why this limit should not be changed on DC server, command-let get-adgroupmember can be easily replaced by Get-ADGroup ‚GroupName‘ -properties Member | select-object -ExpandProperty member 🙂

Novinky v Powershell v 5

Transcript loggining – GPO ( loguje všechno, i příkazy Exchange, AD admin center atd.,  které běží na pozadí!)

GPO cesta k nastavení:
Computer Policy: Computer Configuration -> Administrative Templates -> Windows Components -> Windows PowerShell -> Turn on PowerShell Transcription
New commands v powershell v.5  ———

Drive pouze – []::gettempfile()

Přístup do stránky (ctrl +c)
Get-clipboard -format

Drive pouze – [guid]::newGuid()


Jak volat registry key:

„hello world “ | Format-hex

Převedení zprávy do nečitelného textu :)(zakryptuj si to)
Crypto rfc5652 (base 64)

Práce s balíčky 🙂
Get-package, find-package, remove -package

Powershell – Regular Expressions „list of characters“





matches any character except newline


escape character


word character [a-zA-Z_0-9]


non-word character [^a-zA-Z_0-9]


Digit [0-9]


non-digit [^0-9]


new line


carriage return




white space


non-white space


beginning of a line


end of a line


beginning of the string (multi-line match)


end of the string (multi-line match)


word boundary, boundary between \w and \W


not a word boundary


beginning of a word


end of a word


matches exaclty n times


matches a minimum of n times


matches a min of x and max of y


‘a’ or ‘b’


matches 0 or more times


matches 1 or more times


matches 1 or 0 times


matches 0 or more times, but as few as possible


matches 1 or more times, but as few as possible


matches 0 or 1 time

How automatically set DSRM password or something like that via Powershell

function set-DSRMPass {
Begin {write-host „`n“
Write-Host -ForeGroundColor Yellow „Set new DSRM password …… “ ;
Process {

#$ntdspasschange = ‚ntdsutil „set dsrm password“ „reset password on server null“‚
#invoke-expression $ntdspasschange

$pass = Read-Host „password“ -AsSecureString
$wshell = New-Object -ComObject;
sleep 5
sleep 5
$wshell.SendKeys(‚set dsrm password‘)
sleep 5
$wshell.SendKeys(„reset password on server null“)
sleep 5
#ntdsutil „set dsrm password“ „reset password on server null“ q q