Tutorial and tips for GitHub Actions workflows
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <Configuration> | |
| <ViewDefinitions> | |
| <View> | |
| <Name>MatchInfo</Name> | |
| <ViewSelectedBy> | |
| <TypeName>Microsoft.PowerShell.Commands.MatchInfo</TypeName> | |
| </ViewSelectedBy> | |
| <CustomControl> | |
| <CustomEntries> |
This file contains hidden or 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
| Import-Module ActiveDirectory | |
| # Set the number of days since last logon | |
| $DaysInactive = 90 | |
| $InactiveDate = (Get-Date).Adddays(-($DaysInactive)) | |
| #------------------------------- | |
| # FIND INACTIVE COMPUTERS | |
| #------------------------------- | |
| # Below are three options to find inactive computers. Select the one that is most appropriate for your requirements: |
This file contains hidden or 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
| [alias] | |
| # Basically `log --oneline --decorate --graph` with different colors and some additional info (author and date) | |
| lg = log --graph --abbrev-commit --decorate --format=format:'%C(yellow)%h%C(reset) %C(normal)%s%C(reset) %C(dim white)%an%C(reset) %C(dim blue)(%ar)%C(reset) %C(dim black)%d%C(reset)' | |
| # lg (see above) with --first-parent | |
| lgp = log --graph --abbrev-commit --decorate --format=format:'%C(yellow)%h%C(reset) %C(normal)%s%C(reset) %C(dim white)%an%C(reset) %C(dim blue)(%ar)%C(reset) %C(dim black)%d%C(reset)' --first-parent | |
| # https://stackoverflow.com/questions/61510067/show-specific-commits-in-git-log-in-context-of-other-commits | |
| hl = "!f() { cd -- ${GIT_PREFIX:-.}; grep --color -E \"$(git log --pretty=%h \"$@\" | tr '\n' '|')\" || true; }; f" | |
| hlp = "!f() { cd -- ${GIT_PREFIX:-.}; less -R -p $(git log --pretty=%h \"$@\" | tr '\n' '|'); }; f" |
- Create a personal workspace using Initialize Workspace
- initialize with a blank vault
- if you want to version control the vault, run Vault Convert to add a git repository to this vault
- repeat this process with other vaults as needed (we recommend just starting off with a single vault), see reasons for going multi-vault here
- add your workspace to version control by running the following:
- Initialize a git repo
- initialize with a blank vault
This file contains hidden or 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
| version: 1 | |
| schemas: | |
| - id: pro | |
| desc: project | |
| parent: root | |
| namespace: true | |
| template: | |
| id: pro.template | |
| type: note | |
| children: |
This file contains hidden or 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
| version: 1 | |
| schemas: | |
| - id: pro | |
| desc: project | |
| parent: root | |
| namespace: true | |
| template: | |
| id: pro.template | |
| type: note | |
| children: |
This file contains hidden or 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
| using namespace System.Management.Automation | |
| function Set-StandardMember { | |
| [CmdletBinding()] | |
| param( | |
| [parameter(Mandatory, ValueFromPipeline)] | |
| [object] $InputObject, | |
| [parameter(Mandatory)] | |
| [string[]] $DefaultProperties |
This file contains hidden or 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
| [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 | |
| Install-Module @('PSWinDocumentation', 'PSWinDocumentation.AD', 'PSWriteWord', 'PSWriteExcel') -force | |
| Import-Module PSWinDocumentation -force | |
| Import-Module ActiveDirectory -force | |
| Import-Module PSWinDocumentation.AD -Force | |
| Import-Module PSWriteWord -Force | |
| if ($null -eq $ADForest) { | |
| $ADForest = Get-WinADForestInformation -Verbose -DontRemoveEmpty | |
| } |
This file contains hidden or 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
| [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 | |
| Install-Module Posh365 -force | |
| Install-Module GPOZaurr -force | |
| Install-Module Posh365 -force | |
| Import-Module Posh365 -force | |
| Import-Module GPOZaurr -force | |
| Import-Module Posh365 -force |