Skip to content

Latest commit

 

History

History
80 lines (66 loc) · 2.98 KB

CONTRIBUTING.md

File metadata and controls

80 lines (66 loc) · 2.98 KB

Contributing to ADSIPS module

Contributions are welcome via pull requests and issues. Before submitting a pull request, please make sure all tests pass.

Environment Setup

# First time execution
## Install requirements and Run the build task
./build.ps1 -InstallDependencies -verbose`

# Re-Running the build task
./build.ps1 -verbose -task build

# Running the test task
## As of 2020/09 this only works with up to Pester 4.10.0
./build.ps1 -verbose -task test

# Running the script analyzer task
./build.ps1 -verbose -task analyze

Guidelines

  • Don't use Write-Host
  • Use Verb-Noun format, Check Get-Verb for approved verb
  • Always use explicit parameter names, don't assume position
  • Don't use Aliases
  • Should support Credential input
  • If you want to show informational information use Write-Verbose
  • If you use Verbose, show the name of the function, you can do this:
# Define this variable a the beginning
$ScriptName = (Get-Variable -name MyInvocation -Scope 0 -ValueOnly).Mycommand

# Show your verbose message this way
Write-Verbose -Message "[$ScriptName] Querying system X"
  • You need to have Error Handling (TRY/CATCH)
  • Return terminating error using $PSCmdlet.ThrowTerminatingError($_)
  • Think about the next guy, document your function, help them understand what you are achieving, give at least one example
  • Implement appropriate WhatIf/Confirm support if you function is changing something

TODO (not in a specific order)

  • Pick one of the issues
  • Add more Pester test
  • Integrate with CI/CD (Appveyor) for auto publish to gallery
    • NOTE: have since migrated to Azure Pipelines
  • Migrate to Azure Pipelines
  • Update documentation, possibly add support for ReadTheDocs to help Adoption
  • Set-ADSIComputer
  • Set-ADSIGroup (also with -ManagedBy, and -ManagerCanUpdateMembership example)
  • Set-ADSIObject
  • New-User -CopyFrom <account/DN/GUID>
  • Set-ADSIOrganizationalUnit
  • Restore-ADSIAccount
  • Unlock-ADSIAccount
  • Search-ADSIAccount (retrieve disabled account, expired, expiring,...)
  • ACL functions
  • GPO functions
  • Set-ADSIDomainMode
  • Set-ADSIForestMode
  • Get-ADSIAccountResultantPasswordReplicationPolicy
  • Get-ADSIDomainControllerPasswordReplicationPolicy
  • Add-ADSIDomainControllerPasswordReplicationPolicy
  • Remove-ADSIDomainControllerPasswordReplicationPolicy
  • Get-ADSIDefaultDomainPasswordPolicy
  • Set-ADSIDefaultDomainPasswordPolicy
  • Get-ADSIDomainControllerPasswordReplicationPolicyUsage
  • Get-ADSIDomainControllerPasswordReplicationPolicyUsage
  • Get-ADSIFineGrainedPasswordPolicy
  • Get-ADSIAccountResultantPasswordReplicationPolicy
  • Set-ADSIAccountPassword
  • Clear-ADSIAccountExpiration
  • Find expensive queries
  • Improve Get TokenSize