Testing actual SMB version

Ever since I got employed in my present company, I've been told that our NetApp Filer supports SMB2 when used as NAS.
I was always skeptic of that (due to high transfer times and being unable to cancel mid-file) but had no easy way of testing (I guess I could …

more ...

Mass Setting Permissions on Remote Shares

I was recently asked by one of my teammates to add several NTFS permissions to the root folders of a bunch of shares. Seems easy, but I had two problems:

  1. The shares were stored on a NetApp Filer, so I couldn't use any WMI trickery (or the new SMB module …
more ...

Copying List Permissions in SharePoint 2010

I just wrote a small script to copy permissions from one SharePoint list to the other.

Things to consider

  • Custom permission levels are not preserved: For some reason, my method of copying permissions isn't custom-permission-level friendly. The customized permissions will still be copied, but an auto-generated permission level will be …
more ...

Finding WSUS Clients by SusClientId

Today someone showed me a strange problem - he had servers that recently installed new updates from his WSUS server, but he couldn't find them in the WSUS console by their name.
Obviously the servers have been renamed and didn't have time to report to the WSUS server, but he wanted …

more ...

Reverse Lookup in SharePoint 2010

Every SharePoint noob knows that one can create list lookup relationships, like specifying that a book belongs in a specific bookshelf.
What I didn't know until today is SharePoint 2010 supports "reverse lookup" out of the box!

What's Lookup?

Consider this.You have 2 lists in your SharePoint site - one …

more ...

Making Sure Only Your PDC is Scavanging DNS Records

I recently looked over out DNS server settings, and I found out that more than one DNS server (DC in our case) was scavenging records.
In order to put that right, I made a small script that makes sure that only the PDC is scavenging records:

param(
 $scavengeInterval = 7
)

Get-ADDomainController …
more ...

Brute Force Guessing for User Passwords

Our security team complained to me that they found a lot of users with trivial passwords simply by trying to log in as them.
They asked me to write them a script to speed up the process, so I wrote them my brute force guessing script.
It's not very stealthy …

more ...

Automaticlly Updating DNS Server Addresses In A Domain Machine

The Problem

I was recently requested to make sure that our machine's network interface cards (NICs) have their DNS queries pointed to "the correct servers".
I decided that every machine should point to its domain's DNS servers, and it's their job to redirect queries (if needed) to other DNS servers …

more ...

Applying SPWebConfigModification objects safely

My SharePoint team and I wanted to move to SPWebConfigModification rather that just modifying the web.config file manually, but I was always worried that applying faulty modifications will ruin my file.
Why?

How SPWebConfigModification objects work

Some code requires you to modify the SharePoint web application's web.config file …

more ...

Updating VMware discovery info in Active Directory

Recently I decided I want to store physical discovery data (name, physical location, host if it's a VM) on the machine's account in Active Directory, because we have a lot of machines and during a crisis we sometimes forget where they are.
I started with our VMware infrastructure, and decided …

more ...