Skip to main content

Posts

Showing posts from 2011

Filesystem Module update 1

Filesystem - Update 1 This is my first update / bug fix for my module Filesystem. The latest release can be downloaded here . For more info on the module see here . In version 0.91, the following has been changed : Fixed In new-fileshare, the path parameter now points to the share path rather than the parent path Various help file updates Added New function : Get-diskspace New function : Remove-fileshare Updated Add-NTFSpermission and remove-NTFSpermission now have a custom option. Any granular permission can be assigned to the file system this way. e.g. The read permission is actually made up of 3 granular permissions, read, listDirectory and ExecuteFile. These can now be assigned individually with Add-NTFSPermission -path d:\data -object adams -Permission custom -custom ListDirectory. The full list of permissions (from .net class [System.Security.AccessControl.FileSystemRights] ) are : AppendData ChangePermissions CreateDirectories CreateFiles Delete Delet...

AADSites Module - Update 2

AADSites - Update 2 This is my second update / bug fix for my module AADSites.  The latest release can be downloaded  here . For more info on the module see here . This is, in real terms, quite a big update!  Not for those who are using MSAD management pack, for those who use quest tools!  This update adds quest support - just open up your quest powershell console and load the AADSites module and it will find the quest snappin. Thanks goes to Shay for taking the time to give me feedback on this module! As always please post any feedback to this page! In version 0.92, the following has been changed : Fixed Issue in set-AADSitelink where a null value caused an error Added Quest tools are now supported! Updated As quest tools are now supported, either MSAD or the quest tools need to be loaded before this module is loaded. If you have both loaded, the MSAD module will be used.

Updated : V0.992 Filesystem Powershell module

Update : version 0.992  now available including DFS-r Hot on the heals of my AD sites module , I have been looking at some file system functions.  This module is driven primarily by my own needs, but after a prompt on the powergui website from someone after a way of managing DFS with powershell (thanks packetboy), this is what I have come up with.  All help files are included with examples, but I will publish the help and examples over time. Requirements This module has been built on a Windows 2008 R2 platform and therefore the DFS functions will be based around the 2008 R2 version of DFSUTIL.  This is not to say that it is not compatible with anything earlier, it has just not been tested. Installation and use Download the zip file and extract to your modules folder. This can be found by running "explorer $pshome\modules" from a PowerShell console. To use, run "import-module Filesystem" Command list and Help To retrieve the list of comma...

AADSites - Update 1

This is the first update / bug fix for my module AADSites.  The latest release can be downloaded  here . For more info on the module see here . AADSites - Update 1 In version 0.91, the following has been changed : Fixed Issue in confirm-AADSitelink where a null value caused an error Added Each of get-aadsite, get-aadsitelink, and get-aadsubnet now no longer require an identity to be supplied. If identity is null, then all objects are returned. Updated Help files have been tweaked in most functions cheers Adam

AADSites - Confirm-AADSite Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . This function enables you to check the options of a site are correct. NAME Confirm-AADSite SYNOPSIS Confirms the values provided match the configured site settings SYNTAX Confirm-AADSite [-Identity]  [[-SiteLinks] ] [[-description] ] [[-location] ] [ ] DESCRIPTION This function allows you to validate the settings of an AD Site. You can supply any combination of sitelinks, description or location to check and the function will return true or false whether the values match or not. PARAMETERS -Identity Mandatory - The name of the object you want to confirm. Position 0. -SiteLinks Optional - The sitelinks of the site you want to confirm Accepts 1 or more sitelinks, comma separated. Position 1. -description Optional - The description of the site you want to confirm Position 2. -location Optional - The location of the s...

AADSites - Confirm-AADSitelink Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . This function enables you to confirm the options of a sitelink are correct. NAME Confirm-AADSitelink SYNOPSIS Confirms the values provided match the configured sitelink settings SYNTAX Confirm-AADSitelink [-Identity] [[-Sites] ] [[-cost] ] [[-frequency] ] [[-description] ] [ ] DESCRIPTION This function allows you to validate the settings of an AD Sitelink. You can supply any combination of sites, cost, frequency or description to check and the function will return true or false whether the values match or not. PARAMETERS -Identity Mandatory - The name of the object you want to confirm. Position 0. -Sites Optional - The sites of the sitelink you want to confirm. Accepts 1 or more sites, comma separated. Position 1. -cost Optional - The cost of the sitelink you want to confirm Position 2. -frequency Optional - The freque...

AADSites - Confirm-AADSubnet Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . This function enables you to confirm the options of a subnet are correct. NAME Confirm-AADSubnet SYNOPSIS Confirms the values provided match the configured subnet settings SYNTAX Confirm-AADSubnet [-Identity] [[-description] ] [[-location] ] [[-site] ] [ ] DESCRIPTION This function allows you to validate the settings of an AD Subnet. You can supply any combination of site, description or location to check and the function will return true or false whether the values match or not. PARAMETERS -Identity Mandatory - The name of the object you want to confirm. Position 0. -description Optional - The description of the subnet you want to confirm Position 2. -location Optional - The location of the subnet you want to confirm Position 3. -site Optional - The site that the subnet belongs to. Position 1. ----------------------...

AADSites - Get-AADServicesObject Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . This function returns a sites and services object with the specified name and type. NAME Get-AADServicesObject SYNOPSIS Returns an AD object that matches the name and type supplied SYNTAX Get-AADServicesObject [-Identity] [-Type] [ ] DESCRIPTION Returns an AD object, if one exists, that matches the name and type. Returns $null if nothing found PARAMETERS -Identity Mandatory - The name of the object you want to return. Position 0. -Type Mandatory - The type of the object to check. Accepts site, subnet or sitelink. Position 1. -------------------------- EXAMPLE 1 -------------------------- Simple usage get-AADServicesObject -identity Sitename -type Site -------------------------- EXAMPLE 2 -------------------------- Simple usage get-AADServicesObject -identity Sitelinkname -type Sitelink -------------------------- EXAMPLE 3 -...

AADSites - Get-AADsite Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . This function returns all attributes of an AD site. NAME Get-AADsite SYNOPSIS Returns the AD site object that matches the name supplied SYNTAX Get-AADsite [-Identity] [ ] DESCRIPTION Returns the AD site object, if one exists, that matches the name given Returns $null if nothing found PARAMETERS -Identity Mandatory - The name of the object you want to return. Position 0. -------------------------- EXAMPLE 1 -------------------------- Simple usage get-AADSite -identity Sitename

AADSites - Get-AADsitelink Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . This function returns all the attributes of an AD Sitelink. NAME Get-AADsitelink SYNOPSIS Returns the AD sitelink object that matches the name supplied SYNTAX Get-AADsitelink [-Identity] [ ] DESCRIPTION Returns the AD site object, if one exists, that matches the name given Returns $null if nothing found PARAMETERS -Identity Mandatory - The name of the object you want to return. Position 0. -------------------------- EXAMPLE 1 -------------------------- Simple usage get-AADSitelink -identity Sitename

AADSites - Get-AADsubnet Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . This function returns all attributes of an AD subnet. NAME Get-AADsubnet SYNOPSIS Returns the AD subnet object that matches the name supplied SYNTAX Get-AADsubnet [-Identity] [ ] DESCRIPTION Returns the AD subnet object, if one exists, that matches the name given Returns $null if nothing found PARAMETERS -Identity Mandatory - The name of the object you want to return. Position 0. -------------------------- EXAMPLE 1 -------------------------- Simple usage get-AADSubnet -identity 10.0.1.0/24

AADSites - Move-AADSubnetToSite Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . This function moves a subnet to a different site. This can be useful to adjust the site topology slightly, or preparation for removal of a site.  NAME Move-AADSubnetToSite SYNOPSIS Move a subnet to a different site SYNTAX Move-AADSubnetToSite [-Identity] [-site] [ ] DESCRIPTION Move a subnet to a different site Returns true if successful and false if not.   PARAMETERS -Identity Mandatory - The name of the subnet you want to move. Position 0. -site Mandatory - The name of the site to move to. Position 0. -------------------------- EXAMPLE 1 -------------------------- Simple usage move-AADSubnetToSite -identity 192.168.1.0/24 -site Sitename -------------------------- EXAMPLE 2 -------------------------- Simple usage - using positional parameters move-AADSubnetToSite 192.168.1.0/24 Sitename

AADSites - New-AADSite Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . This function enables you to create a new site.  On Create options available to set include the site links that the site is a member of, the location field and the description. NAME New-AADSite SYNOPSIS Create a new AD site object SYNTAX New-AADSite [-name] [[-SiteLinks] ] [[-Location] ] [[-Description] ] [ ] DESCRIPTION This function enables you to create a new AD Site. You can supply any combination of sitelinks, description or location to add to the new site PARAMETERS -name Mandatory - The name of the object you want to create. Position 0. -SiteLinks Optional - The sitelinks of the site you want to add it to Position 1. -Location Optional - The location of the site you want to set Position 3. -Description Optional - The description of the site you want to set Position 2. -------------------------- EXAMPL...

AADSites - New-AADSiteLink Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . This function enables you to create a new sitelink.  Options available to set on create include the sites that are members of the site linkt, the description, cost and frequency of replication.  NAME New-AADSiteLink SYNOPSIS Creates a new AD sitelink object SYNTAX New-AADSiteLink [-name] [-Sites] [[-cost] ] [[-frequency] ] [[-description] ] [ ] DESCRIPTION This function enables you to create a new AD Sitelink. You can supply any combination of sites, cost, frequency or description to set PARAMETERS -name Mandatory - The name of the object you want to create. Position 0. -Sites Optional - The sites you want to add to the site link. Accepts 1 or more sites, comma separated. Position 1. -cost Optional - The cost of the sitelink you want to set Position 2. -frequency Optional - The frequency of replication th...

AADSites - New-AADSubnet Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . This function enables you to create a new AD subnet.  Options you can set on create include the site that the subnet is a member of, the location field and the description. NAME New-AADSubnet SYNOPSIS Creates a new AD subnet object SYNTAX New-AADSubnet [-name] [-Site] [[-Description] ] [[-Location] ] [ ] DESCRIPTION This function enables you to create a new AD Subnet. You can supply any combination of site, description or location to set PARAMETERS -name Mandatory - The name of the object you want to create. Position 0. -Site Mandatory - The site that the subnet belongs to. Position 1. -Description Optional - The description of the subnet you want to set Position 2. -Location Optional - The location of the subnet you want to set Position 3. -------------------------- EXAMPLE 1 -------------------------- Simple us...

AADSites - Set-AADSite Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . This function enables you to update the options of a site.  These include the site links that the site is a member of, the location field and the description. NAME Set-AADSite SYNOPSIS Sets the values of an AD site object SYNTAX Set-AADSite [-Identity]  [[-SiteLinks] ] [[-description] ] [[-location] ] [ ] DESCRIPTION This function allows you to set the values of an AD Site. You can supply any combination of sitelinks, description or location to set PARAMETERS -Identity Mandatory - The name of the object you want to set. Position 0. -SiteLinks Optional - The sitelinks of the site you want to set Position 1. -description Optional - The description of the site you want to set Position 2. -location Optional - The location of the site you want to set Position 3. -------------------------- EXAMPLE 1 --------------------...

AADSites - Set-AADSitelink Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . This function allows you to update the option of sitelink.  These include the sites that are members of the sitelink, the cost, the replication frequency and the description. NAME Set-AADSitelink SYNOPSIS Sets the values of an AD sitelink object SYNTAX Set-AADSitelink [-Identity] [[-Sites] ] [[-cost] ] [[-frequency] ] [[-description] ] [ ] DESCRIPTION This function allows you to set the values of an AD Sitelink. You can supply any combination of sites, cost, frequency or description to set PARAMETERS -Identity Mandatory - The name of the object you want to change. Position 0. -Sites Optional - The sites of the sitelink you want to set. Accepts 1 or more sites, comma separated. Position 1. -cost Optional - The cost of the sitelink you want to set Position 2. -frequency Optional - The frequency of replication the siteli...

AADSites - Set-AADSubnet Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . This function allows you to change the description and location attributes of a subnet and also the site it is associated with. NAME Set-AADSubnet SYNOPSIS Sets the values of an AD subnet object SYNTAX Set-AADSubnet [-Identity] [[-description] ] [[-location] ] [[-site] ] [ ] DESCRIPTION This function allows you to set the values of an AD Subnet. You can supply any combination of site, description or location to set PARAMETERS -Identity Mandatory - The name of the object you want to set. Position 0. -description Optional - The description of the subnet you want to set Position 2. -location Optional - The location of the subnet you want to set Position 3. -site Optional - The site that the subnet belongs to. Position 1. -------------------------- EXAMPLE 1 -------------------------- Simple usage PS C:\> set-AAD...

AADSites - Test-AADServicesObject Syntax

This function is part of my AADSites module, which can be downloaded here .  For more info on the module see here . Test-AADServicesObject returns true or false against a object name and type.  Can be used to check or confirm the existance of a Site / Subnet / Sitelink object in AD. NAME Test-AADServicesObject SYNOPSIS Checks to see whether an AD object exists with the name and type supplied SYNTAX Test-AADServicesObject [-Identity] [-Type] [ ] DESCRIPTION Checks to see whether an AD object exists with the name and type supplied. returns true if exists and false if not. PARAMETERS -Identity Mandatory - The name of the object you want to check. Position 0. -Type Mandatory - The type of the object to check. Accepts site, subnet or sitelink. Position 1. -------------------------- EXAMPLE 1 -------------------------- Simple usage PS C:\> Test-AADServicesObject -identity Sitename -type Site -----------------------...

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...