Rexxer

Some tips for me and other

News

Powershell: send and read email

In your Gmail account we have to turn the feature “Less secure app” on. To read mail I used the fine tool for PS: https://github.com/nikoblag/Gmail.ps Script example: #============================================================== # Mail function global:Send-Email ($recipient,$SSubject,$BBody) { $email = “your.mail@gmail.com” $pass = “password” $smtpServer = “smtp.gmail.com” $Credentials = New-Object System.Management.Automation.PSCredential -ArgumentList $email, $($pass | ConvertTo-SecureString -AsPlainText -Force) $From […]

CRM 2011 + copy for staging

How to copy Microsoft CRM 2011 organization on the same server. There are many reasons to copy organizations, one of the most common – for testing purpose. You can do as following: Select a database in SQL Server Management Studio which will be copied (TEST_MSCRM). Right click on the target database -> Tasks -> Backup. […]

DNS server + memory consumption

In Windows Server 2008 R2 or older OS with MS08-037 patch installed, DNS server (dns.exe) consumes ridiculously large amount of precious memory. Under the hood, dns.exe opens more than 5000 UDP ports during start up, 2500 for UDP IPv4, 2500 for UDP IPv6.  Large amount of kernel memory is also allocated for these ports.  This can […]

Windows 10 + cannot install Intel Haxm + No VT detection

Disable the group policy setting that was used to enable Credential Guard.On the host operating system, click Start > Run, type gpedit.msc, and click Ok. The Local group Policy Editor opens. Go to Local Computer Policy > Computer Configuration > Administrative Templates > System > Device Guard > Turn on Virtualization Based Security. Select Disabled. […]

Extract a text between delimiters with sh instead of using regex

Example file: UNKNOWN[123.21.181.4] abts-tn-dynamic-161.155.174.122.airtelbroadband.in[122.174.155.161] fm-dyn-118-137-18-160.fast.net.id[118.137.18.160] UNKNOWN[118.69.71.76] ip-177.71.93.43.juniornet.psi.br[177.71.93.43] UNKNOWN[210.245.34.254] UNKNOWN[185.140.242.41] I want to extract IP-addresses: command shell: cat drop.txt | cut -d'[‘ -f2 | cut -d’]’ -f1 Get data from the file Delete all the text before the delimeter (we choose the text after the delimiter) Delete alle the text after the delimeter ( … before […]

Zabbix + reset password for the web interface

update zabbix.users set passwd=md5(‘mynewpassword’) where alias=’Admin’;

Windows 7 + shell commands for consoles

Shell commands list for Windows 7 Обнаружение беспроводных сетей – rundll32.exe van.dll,RunVAN Настройка беспроводной сети – RunDll32.exe shell32.dll,Control_RunDLL NetSetup.cpl,@0,WNSW Управление беспроводными сетями – explorer.exe shell:::{1fa9085f-25a2-489b-85d4-86326eedcd87} Архивация и восстановление – sdclt.exe /restorewizardadmin Восстановление файлов – sdclt.exe /restorewizard Настройка системы архивации – sdclt.exe /configure Добавление сетевого расположения – rundll32.exe shwebsvc.dll,AddNetPlaceRunDll Параметры индексирования – control.exe srchadmin.dll Настройка значков […]

Gitlab + maintenance

Maintenance Rake Tasks Gather information about GitLab and the system it runs on This command gathers information about your GitLab installation and the System it runs on. These may be useful when asking for help or reporting issues. Source: https://docs.gitlab.com/ce/administration/raketasks/maintenance.html Omnibus Installation sudo gitlab-rake gitlab:env:info Source Installation bundle exec rake gitlab:env:info RAILS_ENV=production Example output: System […]

WGET + Measure for web

wget -E -H -p -Q300K –user-agent=Mozilla –no-cache –no-cookies –no-check-certificate –delete-after –timeout=15 –tries=2 yoursite.com 2>&1 | grep Downloaded

Windows Update + CheckSUR

If you have issues with updating Windows or installing some components you can try CheckSUR: http://support.microsoft.com/kb/947821/en-us Using: DISM.exe /Online /Cleanup-image /Scanhealth DISM.exe /Online /Cleanup-image /Restorehealth or DISM.exe /Online /Restorehealth

Previous Posts Next posts