Posts

Showing posts from 2013

SharePoint 2007 – Content Audit: Print All Workflows

In this post I would discuss the PowerShell script to query all workflows in SharePoint farm. You may have deployed custom Workflow solutions like custom activities available on CodePlex or built workflows in SharePoint Designer or Visual Studio. It’s important to understand what sort of workflows you have running in your environment & their upgradability to properly plan an upgrade project.There is no way in SharePoint to say whether a workflow has been built on SharePoint Designer or Visual Studio. Thus, we would use the SPList Workflow Associations property to get all Workflows & then filter-out the ones we don’t care like standard approval workflows. [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") # Print all workflows in Web Application function PrintWorkflowDetails(){ $rootSite = new-object Microsoft.SharePoint.SPSite(""); $webApp = $rootSite.WebApplication; foreach($site in $webApp.Sites){ foreach($web…

SharePoint 2007 - Content Audit: Print last modified & ownership of all sites

If you are planning to migrate from SharePoint 2007 to 2010 or to 2013, then first thing you should do is to audit your content to determine what’s being used & thus should be migrated.
I wrote the below script to determine the site collections modified recently & their site owners. I started with “LastModifiedDate” property of SPWeb object but quickly realised that search crawler updates this property every time a crawl takes place. Thus the solution is to go through each list within the site collection & get the most recent modified date. This gives us more accurate figure we can present to business owners.

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Publishing") # Get the last updated date for a site collection # Iterate through all webs & all lists of the site collection and returns the most recent updated date function getLastestChangeDate([…

Active Directory - Domain Controller Settings & Troubleshooting

If you follow an online article about creating a new Domain Controller for either Windows Server 2008 or 2012, then it all seems to be a breeze. Well that’s not how it always turns out to be, as I recently found out myself.I was building a new domain controller on Windows Server 2012 Virtual Server on VMWare Workstation 9. On the face of it, everything I did was to the book – setup static IPs, new forest, new domain and new DNS. But soon I ran into problems where DNS name resolution won’t work and another VM wouldn’t connect to domain controller. After hours of troubleshooting, I gave up and re-built the server from scratch. Below are some of the lessons of this experience. Hopefully this will save someone else a great deal of time.Pre-requisites – Windows Server 2012 or 2008Before you install the ADDS role, make sure your server has the following settings. Don’t proceed without them.Static IP address. Have a look at my article here about how to assign a static IP on VMWare Workstatio…

Active Directory - Join Server to domain using PowerShell

Pre-requisitesMake sure preferred DNS server for all servers in the domain, including Domain Controller (DC) itself, is set to IP of domain controller. Use the following PowerShell command to set the preferred DNS server. Run it on all servers part of the domain including the DC. Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses <IP of your DC>, <alternate DNS server> Joining server to domainGive your server a meaningful name e.g. “WLG-SP13WFE”Run PowerShell command on the server being joined to the domain Add-Computer -DomainName corp.contoso.com -OUPath "ou=SharePoint, ou=Servers, ou=Machines,dc=corp,dc=contoso,dc=com" DebuggingRun “ipconfig /all” command and confirm that DNS server IP is set to your DC IPCheck the error log on DC to find out if there are any domain join failure errors loggedUse fully qualified domain name (FQDN) i.e. “Contoso.co.nz” rather than just “Contoso”Try pinging your DC from computer being joined to domai…

Design & Build Windows Server 2012 Active Directory

Image
In this post, I’ll go through concepts related to configuring Windows Server 2012 domain controller and architecting the AD organisation unit structure. This is not a step by step or click here, here or here post. I’ll outline ideas which may help you to understand AD architecture and best practise design.Static IP is a mustDon’t proceed if you haven’t assigned a static IP address to your server. Check-out my post here about how to do that in VMWare Workstation. If you choose a dynamic IP assigned by DHCP, your domain controller is going to get a new IP address which doesn’t propagate over the network resulting in computers joined to domain no longer able to connect to domain controller. Thus, don’t overlook this requirement.Change server nameNow is the time to give your server a meaningful name rather than sticking with the default e.g. WLG-DC1.Configure Windows Server 2012 as domain controllerIt’s all there in Server Manager to configure the server as a domain controller. No need to…

VMWare Workstation - Assign a static IP address

Image
A virtual DHCP server, included with the installation of VMWare Workstation, assigns IP addresses in Host-Only and NAT network configurations. DHCP follows certain conventions when allocating IP address and sets aside a pool of addresses that it doesn’t assign. An IP address from this static pool can thus be assigned manually to a virtual machine, giving the VM a static IP address.Why static IP?Static IP address is a must have requirement if you are planning to setup an Active Directory domain. Server acting as domain controller must have static IP so that VMs, joined to the domain, can connect to the domain controller all the time. If the domain controller is set to get a dynamic address from DHCP then its IP address will change. This change in address doesn’t propagate to VMs joined to the domain, resulting in domain connection failure.DHCP IP address poolFollowing table outlines the conventions used by VMWare DHCP when allocating an IP address. The net value is the network number a…

VMWare Workstation - Create a template virtual machine

A template (also called gold or master) virtual machine (VM) acts as a base VM which can be cloned to create virtual machines of same build and configuration. Thus, rather than going through the time consuming process of creating a VM from scratch, you can simply clone an existing VM to quickly stand-up a lab of multiple virtual machines.Below are the steps, I usually take to build a Windows based template:Create a new VM of desired OSApply Windows UpdatesInstall base applications e.g. .Net 4, VMWare toolsMake any configuration changes Enable desktop experience in Windows ServerChange folder options – show hidden files, display file extensionsSet time zoneInstall Telnet clientDisable indexing on C for performance gainsChange Internet Explorer settings Default page “about:blank”Disable Enhanced Security Configuration for administratorsRun SysPrep and shutdown. Your template is now ready for use.Create a new VM based on templateTo create virtual machines based on a template use VMWare…

Networking – What it means and possible configurations in VMWare Workstation

At some point, you would like your shining new Virtual Machine (VM) to access the Internet or communicate with other devices (computers, printers), be it VMs on same host or external computers. To configure this networking, you need to understand the fundamentals of computer networks and the components of VMWare virtual networks.Networking jargonWe all have internet at home these days and connected our PC, laptop or our smart phone to our broadband modem. So what’s a modem, is it a Switch or a Router or both?Ethernet adapter or a network interface card (NIC): is a hardware device that allows your computer to connect to other devices. It’s where on your computer you connect that Ethernet cable coming from the broadband modem.Network switch: is a hardware device that connects other networking devices. Switch creates a local area network (LAN) whereby you connect Ethernet cables from your devices to ports on a Switch. E.g. you can connect multiple computers in your home to a shared print…

VMWare Workstation setup

I purchased Workstation 7.0 few years ago and immediately proceeded to building my first virtual machine without doing any reading about Workstation features, fundamentals of networking or virtual machine best practice configurations. Later on, I started noticing problems where my VMs won’t communicate with each other or the domain controller was set to get dynamic IP address resulting in VMs not able to connect to domain at all.Following is a series of posts about concepts which I think are essential for a successful experience with VMWare and virtualisation in general.Networking – what it means and possible configurations in VMWare WorkstationCreate a template virtual machineAssign a static IP address