Skip to main content

Posts

Showing posts with the label function

quick look at get-NTFSExplicitPermissions

get-NTFSExplicitPermissions As one of favourite time saving functions of late, I thought I'd continue my recent trend of blogging again by giving a bit of insight to it's background. One of the parts to my day job is looking after file servers.  I don't do day to day admin work on them, more look at managing space and migrating data to new servers / volumes if required. Now the problem with doing the data migrations and not being involved in the day to day admin work (ie assigning permissions creating shares etc) is that I have no control over how and where the permissions are assigned.  I learnt how to assign permissions to file systems years ago in Novell environments, which was soon followed with the MCSE taught A-G-D-L-P model. (AGDLP? now that sound like a reasonable blog post for an AD Admin blog site!) Anyway, I have since found that these early teaching on permission models are not implemented as thoroughly as I would like, where ever I seem to work...

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.

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