-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It's 0.1 version of this project. Finished two basic function for baseline check: 1. compare-rsop which compare gpresult xml. 2. compare-scriptoutput which compare script stored in csv also revised psake build files.
- Loading branch information
Showing
10 changed files
with
553 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,35 @@ | ||
#Module vars | ||
$ModulePath = $PSScriptRoot | ||
|
||
#Get public and private function definition files. | ||
$Public = @( Get-ChildItem -Path $PSScriptRoot\Public\*.ps1 -ErrorAction SilentlyContinue ) | ||
$Private = @( Get-ChildItem -Path $PSScriptRoot\Private\*.ps1 -ErrorAction SilentlyContinue ) | ||
$Public = Get-ChildItem $PSScriptRoot\Public\*.ps1 -ErrorAction SilentlyContinue | ||
$Private = Get-ChildItem $PSScriptRoot\Private\*.ps1 -ErrorAction SilentlyContinue | ||
[string[]]$PrivateModules = Get-ChildItem $PSScriptRoot\Private -ErrorAction SilentlyContinue | | ||
Where-Object {$_.PSIsContainer} | | ||
Select -ExpandProperty FullName | ||
|
||
#Dot source the files | ||
Foreach ($import in @($Public + $Private)) { | ||
Try { | ||
. $import.fullname | ||
} | ||
Catch { | ||
Write-Error -Message "Failed to import function $($import.fullname): $_" | ||
# Dot source the files | ||
Foreach($import in @($Public + $Private)) | ||
{ | ||
Try | ||
{ | ||
. $import.fullname | ||
} | ||
Catch | ||
{ | ||
Write-Error "Failed to import function $($import.fullname): $_" | ||
} | ||
} | ||
} | ||
|
||
# Here I might... | ||
# Read in or create an initial config file and variable | ||
# Export Public functions ($Public.BaseName) for WIP modules | ||
# Set variables visible to the module and its functions only | ||
|
||
Export-ModuleMember -Function $Public.Basename | ||
# Load up dependency modules | ||
foreach($Module in $PrivateModules) | ||
{ | ||
Try | ||
{ | ||
Import-Module $Module -ErrorAction Stop | ||
} | ||
Catch | ||
{ | ||
Write-Error "Failed to import module $Module`: $_" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.