Archive for the ‘Windows’ Category

AppLocker blocking Logon scripts

I ran into an issue today on Windows Server 2012R2 where AppLocker was blocking logon & logoff scripts despite the sysvol folder being in the allowed policy. The documentation indicates that allowing the following folder should be enough: \\domain.com\sysvol\domain.com\policies\* This isnt the case, you actually need the NETLOGON folder too: \\domain.com\NETLOGON\* And in my instance […]

Clear ARP on various systems

Just a quick reference for how to clear ARP entries on various systems following a network change: Windows Print arp table: arp -a Delete single entry: arp -d 192.168.1.1 Delete entire arp table: arp -d * Add static entry: arp -s 192.168.1.1 00-aa-00-62-c6-09 Cisco ASA/IOS/NX-OS Print arp table: show arp Delete entire arp table: clear […]

Server 2012 R2 – Failover Cluster error

So I was installing SQL2008R2 (In 2015? I know not my choice, it was for a legacy application) into a Windows Server 2012 R2 Failover Cluster. I hit the following error during the SQL install: “Rule Cluster Service Verification Failed. The SQL Server failover cluster services is not online”. It turns out that some cluster […]

Mounting Windows drives and shares in Linux

The following have come in handy for mounting a Windows share on a Linux computer: mount -t cifs -o username=user,password=password,umask=000 //winbox/winshare /mnt/home/ or smbmount //winbox/winshare /mnt/home/ -o username=user,password=password,rw An example of mounting a local NTFS partition held on the same machine: ntfsmount /dev/sda2 /mnt/windows -o umask=0002,silent

Exchange 2007 – Renewing self signed SSL

If your running Exchange 2007 and you don’t really have the need for an SSL that’s issued by a valid CA, then you can just renew the self signed one that’s automatically generated on server build.  Most devices are happy to connect to an unsigned SSL once an exceptions been made, but they may well […]

IIS – The network location cannot be reached

I had a strange error in IIS6 today when adding a secondary IP.  The site wouldn’t start and gave the error “The network location cannot be reached”.  The IP was correct, pingable and the IIS host headers were all fine. I had to install the Windows 2003 support tools to fix this.  They can be […]

Appcmd IIS7 command line tool

Appcmd list sites Appcmd list site “sitename” /config Appcmd start/stop sites “Default Web Site” (or whatever site you want to start) Appcmd add sites /name:”Site 5” /id:12 /bindings:http://mysite5.com:80 /physicalPath:C:\inetpub\site5 Backup IIS config: appcmd add backup appcmd list backup appcmd restore backup It has much much more functionality – appcmd /h

Save password for mapped network drive

When you map a network drive in Windows, with a non-domain user for example, Windows will save the username but not the password.  To persistently store the password, use the following from cmd: net use x: \\server’s.DNS.name\share /savecred /persistent:yes

Auto restart IIS when service unavailable

A bit crude but it works.  Make a schedule task for this batch file: del testsql1.asp C:\wget\wget.exe –timeout=30 –tries=1 http://www.website.com/testsql1.asp find /C “SQLServer Test Code 1″ testscript.asp IF ERRORLEVEL 1 IISRESET /RESTART /TIMEOUT:120 /REBOOTONERROR

Force group policy update

To manually force Group Policy to refresh under Windows 2000, you use the command secedit /refreshpolicy Microsoft has replaced this command in Windows 2003 and XP with this command: gpupdate