Archive for September, 2015

Basically if you have correctly configured your web-server, with correct limits (from #ipcs -l command). There will be a moment if this is not scripted, that the limit will be broken. Then, there’s an easy way to clear the limits.

for ipcs in `ipcs -s | awk '{print $2}'`; 
echo "ipcs=$ipcs"
ipcrm -s $ipcs

You have more than 500-1000 users and need to change the UserPrincipalName?


Get-ADUser -Filter * -SearchBase $ou | ForEach-Object { $newUpn = $_.UserPrincipalName.Replace($old,$new) $_ | Set-ADUser -server $server -UserPrincipalName $newUpn }

Of course it is better to debug the command before running in production environment so place a “-WhatIf” mark after the command, like this:

Get-ADUser -Filter * -SearchBase $ou | ForEach-Object { $newUpn = $_.UserPrincipalName.Replace($old,$new) $_ | Set-ADUser -server $server -UserPrincipalName $newUpn -WhatIf }