Rexxer

Some tips for me and other

Windows

CMD: find a string and run another script

find /c “string” file if %errorlevel% equ 1 goto notfound echo found goto done :notfound echo notfound goto done :done

“Password’s expired” alert

Import-Module ActiveDirectory #System globalization #$ci = New-Object System.Globalization.CultureInfo(“ru-RU”) #SMTP server name $smtpServer = “mail.domain.com” #Creating a Mail object $msg = new-object Net.Mail.MailMessage #Creating a Mail object for report $msgr = new-object Net.Mail.MailMessage #Creating SMTP server object $smtp = new-object Net.Mail.SmtpClient($smtpServer) #E-mail structure Function EmailStructure($to,$expiryDate,$upn) { $msg.IsBodyHtml = $true $msg.From = “admin@domain.com” $msg.To.Clear() $msg.To.Add($to) $msg.Subject = […]

iSCSI – be careful

I never mind iSCSI can’t be mounted more than 1 server simultaneously. Really it can but will damage a file system. I tried it :). 2 FS servers were mounted 1 iSCSI disk simultaneously. In the beginning it seemed OK. I did some transfer operations on a 1 server then on a 2 server. Everything […]

Windows event log + subscription to “Account locked out” event

There is just my script for a subscription on event 4740: @echo off wevtutil qe Security “/q:*[System [(EventID=4740)]]” /f:text /rd:true /c:1 > c:\Event\event4740.txt c:\Event\postie.exe -host:192.168.111.222 -port:25 -to:admin@local.com -from:event@local.com -s:”Account Locked Out on Server” -msg:Server -file:”c:\Event\event4740.txt”

Windows 2008 R2 NPS + Ubiquiti AP Pro + Radius = issues

Some time ago I wrote about configuring WiFi network with Radius authentication. Recently I got some issues with that: some devices couldn’t connect to WiFi for a long time, then suddenly could and so on. So, I started the investigation … 1. I look at the NPS log – You can find it in the […]

Network scan form command line

for /L %i in (1,1,254) do ping -a -n 1 192.168.0.%i | find /i “Reply”  

Load Balancer for Exchange

I was needed in a cheep software NLB and found this article: http://marksmith.netrends.com/Lists/Posts/Post.aspx?ID=111 In this article I will show you how to build an open-source, Linux (CentOS) based load balancer using the Direct Server Return (DSR) method of load balancing with the Linux Virtual Server (LVS) package and the Piranha web GUI. Let me first […]

Configure Static RPC Ports on an Exchange 2010 Client Access Server

It’s needed for NLB. Copy-pasted from TechNet: http://social.technet.microsoft.com/wiki/contents/articles/864.configure-static-rpc-ports-on-an-exchange-2010-client-access-server.aspx Exchange 2010 RPC Client Access Service By default the RPC Client Access service on an Exchange 2010 Client Access server uses the TCP End Point Mapper port (TCP/135) and the dynamic RPC port range (6005-59530) for outgoing connections, every time an Outlook clients establish a connection to […]

You receive error 401.1 when you browse a Web site that uses Integrated Authentication and is hosted on IIS 5.1 or a later version

It’s just a copy from Microsoft support site about this issue (very useful for me): http://support.microsoft.com/kb/896861 Method 2 works for me. Method 1: Specify host names (Preferred method if NTLM authentication is desired) To specify the host names that are mapped to the loopback address and can connect to Web sites on your computer, follow […]

Windows 8 + how to change the product key

Wonder again from Windows – no visual way to change a product key and activate Windows. I found resolution in MSDN: To change the product key without first activating Windows, use one of the following methods: Method 1 Swipe in from the right edge of the screen, and then tap Search. Or, if you are […]

Previous Posts Next posts