Skip to main content

Posts

Showing posts with the label Module

Filesystem v 0.992

Just over a year after I published the first version of this module, and too many revisions to count later, I am fast approaching 1000 downloads!  This update takes the number of functions past 50 too!  Thanks to everyone who have given me great feedback!  The latest release can be downloaded here . For more info on the module see here . Bug Fix removed the discovery error on load Added Functions get-sharePermission (not sure why it took so long for this one to appear) get-NTFSBlockedInheritance - to compliment get-NTFSExplicitPermissions, this return the path of a folder if inheritance has been blocked updated Function get-NTFSExplicitPermissions - added an exclude parameter in the same way that get-NTFSPermission works Cheers Adam

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

new-DFSrGroup

New-DFSRGroup This function contains pretty much everything about dfs-r groups.  When you create a replication group from the GUI, have you ever noticed the steps that complete on the page after you click create? Ever paid any attention to what they are actually doing? Me neither, until I started looking at this new-dfsrgroup function.  Assuming that there are 2 members to the replication group and all parameters have been entered, my function calls dfsradmin no less that 9 times to complete the task. So how can we use the function?  here are some examples.... new-dfsrgroup -name "rg2" -description "desc1" -Servers server1,server2 -folderpath e:\data\users -foldername Users This command will invoke every part of the function and create a fully meshed replication group.  Out of the parameters presented, only name and servers are mandatory.  If you were to omit foldername eg :  new-dfsrgroup -name "rg2" -description "desc1" -Se...

Filesystem 0.99 update (DFS-R!)

Filesystem Update  Another update / bug fix for my module Filesystem. The latest release can be downloaded here . For more info on the module see here . In update v0.99, DFS-r management has been released...with a couple of other changes : NOTE: dfsradmin.exe is required to be installed for the DFSR functions to work Updated list-DFSRoots has been renamed to get-dfsroots due to list not being on the approved verb list (an alias exists to redirect list-dfsroots to get-dfsroots for now) list-DFSLinks has been renamed to get-dfslinks due to list not being on the approved verb list (an alias exists to redirect list-dfslinks to get-dfslinks for now) get-NTFSPermission - fixed issue with inherited only permissions   New DFS-r functions add-dfsrGroupMember disable-dfsrGroupMember enable-dfsrGroupMember get-DFSrGroup get-dfsrGroupConnection get-DFSRGroupfolder get-dfsrGroupMember new-DFSRgroup new-dfsrGroupConnection new-dfsrGroupFolder new-dfs...

Filesystem Module v0.98

Filesystem Update  Another update / bug fix for my module Filesystem. The latest release can be downloaded here . For more info on the module see here . In update v0.98, the follow has changed : updated get-dfslink (added path parameter to output object) New function list-DFSRoots list-DFSLinks As requested by Deas, the list functions have been added to list all DFS roots in a domain and subsequently, list all links in a dfs root. get-dfslink has been updated to add a path property to the object output.  Just for reference, I have started on my next update already.....Adding DFS-r management!   cheers Adam

Filesystem 0.97

Filesystem Update  Another update / bug fix for my module Filesystem. The latest release can be downloaded here . For more info on the module see here . In update v0.97, the follow has changed : updated new-dfsroot (now supports standalone namespaces) New function get-fileshares (list all shares on a server) Thanks goes to Steve for helping test this release.  cheers Adam

Filesystem v0.96

Filesystem - Update 4 This is my fourth update / bug fix for my module Filesystem. The latest release can be downloaded here . For more info on the module see here . In update v0.96, the follow has changed : updated get-dfslink (now supports spaces in the link path) get-dfslink    (output now says "disabled" rather than "disbled") Thanks again to everyone who has take the time to send feedback.  cheers Adam

Filesystem Module update 3

Filesystem - Update 3 This is my third update / bug fix for my module Filesystem. The latest release can be downloaded here . For more info on the module see here . In update v0.94, the follow has changed : added get-ntfspermission updated add-ntfspermission (now has a domain parameter) remove-ntfspermission (now has a domain parameter) new-dfsroot (now has a version parameter) Thanks to everyone who has take the time to send feedback. I have hopefully addressed all bugs reported. One thing I have not changed is the name and would like to know how many other people have a name conflict with this module. Use the comments to to report back and even suggest a new name! cheers Adam

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