Category: PowerShell

  • Cliffs Notes: administrating Active Directory with PowerShell

    1. Install ActiveDirectory modules by running PowerShell as Administrator and executing the commands below: [code language=”text”] PS C:\Windows\system32> Import-Module ServerManager PS C:\Windows\system32> Add-WindowsFeature RSAT-AD-PowerShell Success Restart Needed Exit Code Feature Result ——- ————– ——— ————– True No Success {Active Directory module for Windows Power… [/code] 2. Link for newly added Active Directory cmdlets after installation,…

  • PowerShell TDD with PSUnit: some usage examples

    I discussed setting up PSUnit for unit testing PowerShell before. This is a quick followup for my own record and consumption in the future. I will update this post as I find more interesting things to record. 1. Put PowerShell functions in one file such as myBaseFunctions.ps1; 2. Create a test directory and under that…

  • PowerShell TDD with PSUnit

    My own Cliffs Notes on PowerShell unit testing. Hope it helps you as well. I may update this as I move along. 1. For serious, robust programming, TDD is definitely the way to go; 2. I looked at both Pester and PSUnit. Despite the 10 votes (so far) for the Pester answer on a stackoverflow…