Skip to main content

Posts

Showing posts from August, 2011

AADSites - Add-AADSiteToSitelink Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . Add-AADSiteFromSitelink Adds the specified site to a site link. NAME Add-AADSiteToSitelink SYNOPSIS Add an AD site to a sitelink SYNTAX Add-AADSiteToSitelink [-Identity] [-sitelink] [ ] DESCRIPTION Add an AD site to a sitelink returns true if successful and false if not. PARAMETERS -Identity Mandatory - The name of the site you want to add. Position 0. -sitelink Mandatory - The name of the sitelink to add the site to Position 1. -------------------------- EXAMPLE 1 -------------------------- Simple usage PS C:\> Add-AADSiteToSitelink -identity Sitename -sitelink Sitelinkname -------------------------- EXAMPLE 2 -------------------------- Simple usage - using positional parameters PS C:\> Add-AADSiteToSitelink Sitename Sitelinkname

AADSites - Remove-AADSiteFromSitelink Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . Remove-AADSiteFromSitelink removes the specified site from a site link. PARAMETERS -Identity Mandatory - The name of the site you want to remove. Position 0. -sitelink Mandatory - The name of the sitelink to remove the site from Position 1. -------------------------- EXAMPLE 1 -------------------------- Simple usage PS C:\> Remove-AADSiteFromSitelink -identity Sitename -sitelink Sitelinkname -------------------------- EXAMPLE 2 -------------------------- Simple usage - using positional parameters PS C:\> Remove-AADSiteFromSitelink Sitename Sitelinkname

AADSites - Remove-AADsubnet Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . As subnets do not have any lower dependencies, Remove-AADsubnet has only one option and that is to use -confirm:$false to suppress the confirm prompt   NAME Remove-AADsubnet SYNOPSIS Removes the AD subnet object that matches the name supplied SYNTAX Remove-AADsubnet [-Identity] [[-confirm] ] [ ] DESCRIPTION Removes the AD subnet object, if one exists, that matches the name given Returns True if the the site has been removed, False if not. PARAMETERS -Identity Mandatory - The name of the object you want to remove. Position 0. -confirm Optional - Set to false if you want to remove the subnet without being prompted Position 1.   -------------------------- EXAMPLE 1 -------------------------- Simple usage PS C:\> remove-AADSubnet -identity Sitelinkname -------------------------- EXAMPLE 2 ---...

AADSites - Remove-AADsitelink Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . Remove-AADsitelink has to deal with sites still being members of the sitelink. If you have sites associated to the sitelink, remove-AADsitelink will warn you as such but offer -force:$true as an override The -confirm:$false switch is availale to supress the confirm prompt. NAME Remove-AADsitelink SYNOPSIS Removes the AD sitelink object that matches the name supplied SYNTAX Remove-AADsitelink [-Identity] [[-force] ] [[-confirm] ] [ ] DESCRIPTION Removes the AD sitelink object, if one exists, that matches the name given If there are sites configured as part of the sitelink, the command requires -force:$true option to remove the site Returns True if the the site has been removed, False if not. PARAMETERS -Identity Mandatory - The name of the object you want to remove. Position 0. -force Optional - Set to true if you want to ignore war...

AADSites - Remove-AADsite syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . To start the help files, I have chosen the function that has the most logic to deal with.  Remove-AADsite has to deal with linked subnets, child objects such as servers including domain controllers. If you have subnets associated to the site, remove-AADsite will warn you as such but offer -force:$true as an override If you have child server objects (not DC's) within the site, remove-AADsite will warn you as such but offer -force:$true as an override If you have child domain controller objects within the site, remove-AADsite will advise you to move the DC's out of the site before continuing. No override. The -confirm:$false switch is availale to supress the confirm prompt. NAME Remove-AADsite SYNOPSIS Removes the AD site object that matches the name supplied SYNTAX Remove-AADsite [-Identity] [[-force] ] [[-...

UPDATED: AD Sites, Subnets, and Sitelinks Powershell Module

UPDATED: now supports Quest tools see v0.92 update for details It's been a while since I have put anything on here, as noted by a few of my colleagues. I have been busy developing various ideas in PowerShell, and generally pulling together all the scripts, functions, features, techniques etc that I have learnt over the past few years.  This, and raising an ever growning young family! It has been a very exciting journey which is far from over, but I suppose I have come to a point where I feel I have something useful to give back. In my quest to automate AD management (one of the ideas I have been working on), I found that there isn't much in the way of Site / Subnet / Site link management in PowerShell. True, these are just objects in AD and can be referenced by get-ADobject or by the [ADSI] shortcut, or even the quest AD management tools, but formatting the configuration naming context with sub OU's is a pain - if you actually know that this is where sites and servic...