├── notebooks ├── sketch │ ├── ImportExcel-part2.ps1 │ └── InspectCallerstate - CollectMetadata.ipynb ├── notebook.utils.tests.ps1 └── web-parsing │ └── power-html.buff.part2.ps1 ├── Parsing Native Apps ├── DOS │ ├── output │ │ ├── DISKPART.txt │ │ ├── GRAFTABL.txt │ │ ├── DISKPART.stderr.txt │ │ ├── CLS.txt │ │ ├── VER.txt │ │ ├── REM.txt │ │ ├── TYPE.txt │ │ ├── VOL.txt │ │ ├── PAUSE.txt │ │ ├── GRAFTABL.stderr.txt │ │ ├── PRINT.txt │ │ ├── Help.txt │ │ ├── TITLE.txt │ │ ├── ECHO.txt │ │ ├── CHCP.txt │ │ ├── VERIFY.txt │ │ ├── RECOVER.txt │ │ ├── REN.txt │ │ ├── RENAME.txt │ │ ├── TREE.txt │ │ ├── POPD.txt │ │ ├── BREAK.txt │ │ ├── RD.txt │ │ ├── RMDIR.txt │ │ ├── DATE.txt │ │ ├── TIME.txt │ │ ├── PATH.txt │ │ ├── SHIFT.txt │ │ ├── SUBST.txt │ │ ├── MKLINK.txt │ │ ├── EXIT.txt │ │ ├── MD.txt │ │ ├── MKDIR.txt │ │ ├── ASSOC.txt │ │ ├── LABEL.txt │ │ ├── GOTO.txt │ │ ├── OPENFILES.txt │ │ ├── ENDLOCAL.txt │ │ ├── MODE.txt │ │ ├── PUSHD.txt │ │ ├── readme.generated.md │ │ ├── FIND.txt │ │ ├── COMP.txt │ │ ├── CONVERT.txt │ │ ├── ATTRIB.txt │ │ ├── FSUTIL.txt │ │ ├── SCHTASKS.txt │ │ ├── CHKNTFS.txt │ │ ├── COLOR.txt │ │ ├── CD.txt │ │ ├── CHDIR.txt │ │ ├── REPLACE.txt │ │ ├── PROMPT.txt │ │ ├── FC.txt │ │ ├── DEL.txt │ │ ├── ERASE.txt │ │ ├── MORE.txt │ │ ├── FTYPE.txt │ │ ├── SYSTEMINFO.txt │ │ ├── MOVE.txt │ │ ├── DRIVERQUERY.txt │ │ ├── COPY.txt │ │ ├── build-readme.ps1 │ │ ├── DOSKEY.txt │ │ └── SETLOCAL.txt │ ├── image │ │ ├── export-dos-command-csv.png │ │ ├── export-dos-command-topics.png │ │ └── exporting-DOS-man-pages-from-Pwsh.png │ └── readme.md ├── readme.md ├── Invoke-Netstat │ ├── final-posh-objects.png │ ├── regex101.highlighted-matches.png │ ├── readme.md │ └── Invoke-Netstat.ps1 ├── Github-FindInvoke-PullRequest │ └── FindInvoke-PullRequest.gif ├── Chocolate-GetAppVersions.ps1 └── git │ └── Convert-Gist-List-To-PSObject.ps1 ├── Dangers-of-Input ├── DangersOf-NonPipelineInput.ps1 ├── new-using-pipeparams.ps1 ├── DangersOfInput │ ├── Case1-part1.ps1 │ ├── Case1-part2.ps1 │ ├── Danger.Hashtable.ps1 │ ├── Danger-EndBlock.ps1 │ ├── Readme.md │ ├── Danger-collectFiles.ps1 │ ├── Case1.base.ps1 │ └── date-modified.wip.ps1 ├── Pipeline-input-Without-using-ValueFromPipeline-attribute.readme.md ├── Pipeline-input-Without-using-ValueFromPipeline-attribute.ps1 └── Split-Verbose-Filter-By-Regex.ps1 ├── GUI └── ShowUI │ ├── readme.md │ ├── part 3 - Select - checkboxes.screenshot.png │ ├── NewListBox-minimal.ps1 │ ├── Select List - Using Images as thumbnails.screenshot.png │ ├── selectboxes-like-fzf-as-ui.ps1 │ └── part 3 - checkboxes -- selectboxes-like-fzf-as-ui.ps1 ├── .gitignore ├── mini-examples.code-workspace ├── Types ├── src │ ├── TypeDate.SqlClusteredResult.png │ └── Minimal-Set-DefaultDisplayPropertySet.screen.png ├── Common-Parameters.ps1 ├── Interfaces │ └── Implements IEquatable compare.ps1 ├── readme.md ├── ModifyExistingPSCO │ ├── Using Add-Member.ps1 │ └── Using Update-TypeData.ps1 ├── TypeInfo │ ├── Get-ObjectTypeInfo.tests.ps1 │ └── Get-ObjectTypeInfo_basic.ps1 ├── Get-HelpFromType.ps1 ├── Minimal-Set-DefaultDisplayPropertySet.ps1 └── Compare-NumericType.ps1 ├── CommandLineInterface ├── img │ └── native_command.bcp.gif ├── readme.md ├── gh │ ├── ex1.ps1 │ └── readme.md └── Template-Invoke-NativeCommands.ps1 ├── Format ├── ShouldProcess-FrontHeader │ ├── TestAll-Colors.png │ ├── ShouldProcess-WithColor.png │ ├── img │ │ ├── StructuredUserOutput.png │ │ ├── invoke-shouldprocess-1and2.png │ │ └── invoke-shouldprocess-4and5.png │ ├── ShouldProcess-FrontHeader-SeeminglySci.png │ ├── ShouldProcess-FrontHeader.ps1 │ └── ShouldProcessCapture.ps1 ├── ShouldProcess │ └── Colorize-WhatIf-Output.ps1 └── File-Listing │ └── Readme.md ├── Module ├── ClassExplorer │ └── image │ │ ├── good-else-duplicate.png │ │ ├── smart-case-regex-syntax.png │ │ ├── Inspecting fake scopes by psdrive.png │ │ ├── find-type-global-wildcard-mashup.png │ │ ├── cheatsheet-which-attribute-to-inheriet.png │ │ ├── get-powershell-list-of-internal-vars.png │ │ ├── type-by-base_member-by-paramtype-mashup.png │ │ └── which-members-are-not-inheritable-sealed.png ├── toc.unsorted.md └── Inspecting-Module-Scope.unstable.ps1 ├── Misc ├── Test-IsAny.ps1 ├── .output │ ├── tt_xor.md │ ├── tt_many.md │ ├── tt_xor-color.md │ └── tt_many-color.md ├── Install-Font-minimal-global.ps1 ├── Where-Object-Uses-ScriptBlock-param.md ├── test-parsing.ps1 └── Special Paths like Desktop or My.ps1 ├── Parameters ├── Image │ └── IsPresent-Compare-switch-parameter.png ├── Validate-Length-of-String-Parameter.ps1 ├── .output │ ├── IsPresent-results.ansi │ └── IsPresent-results.md ├── Validation │ └── IValidateSetValuesGenerator-Custom-ValidateSet-Validation.ps1 ├── AutoCompletion │ └── Function-Changes-CompletionMethod-Based-On-First-Argument.ps1 └── Validate-Parameter_Types-Coercion_Affects_Parameter.ps1 ├── Pester ├── Data Driven │ ├── data │ │ ├── pester-triple-nested-results.png │ │ └── pester-array-testcases.results.png │ ├── Array-TestCases.tests.ps1 │ ├── Three-Layers-of-Nested-TestCases.tests.ps1 │ ├── Assert-BooleanXOR.ps1 │ └── 01 - WildCard Query Reused.Get-Emoji.Tests.ps1 ├── Run Pester in VS Code │ ├── Animal.tests.ps1 │ ├── Animal.ps1 │ ├── Script And Test - In a Single File.Tests.ps1 │ └── .vscode │ │ └── launch.json ├── Function and Pester tests in a single script.tests.ps1 ├── Testing-Parameters │ └── Function-Has-Valid-Completers.ps1 ├── Config │ └── Generate-PesterConfig-examples.ps1 └── readme.md ├── Completers ├── Test1.ps1 ├── Dynamic ValidateSet Completer │ ├── dynamic_validateset_completer.gif │ └── example_use.ps1 ├── New-In-PS6 │ └── ArgumentCompletions-Completer.ps1 ├── Readme.md ├── Readme.Autocompleter-docs.md ├── dotnet-winget │ ├── winget-completer.ps1 │ └── dotnet-cli.md ├── Dynamic ValidateSet using IValidateSetValuesGenerator │ └── Minimum Required for custom IValidateSetValuesGenerator - dynamic validated values.ps1 └── Build-ExternalExamples.ps1 ├── ForEach-Object-Parallel-Thread ├── WriteProgress-Status-of-4-threads.png └── Readme.md ├── Console ├── TitleBar-Show-Progress │ ├── ansi-escapes-show-titlebard-progress.gif │ └── Titlebar-and-taskbar-progress animation.ps1 ├── Invoke-Command-then-ConditionallyPause.ps1 ├── Invoke-Ping.ps1 ├── Invoke-NativeCommand - justin.grote.ps1 ├── Pansies-AnsiColors │ └── readme.pansies-color.md └── PSReadLine-Expand-Aliases.ps1 ├── FromPeople🧑 ├── JustinGrote🧑 │ └── completion │ │ └── GetAzVMImageAutocomplete.ps1 │ │ ├── _Demo.gif │ │ └── readme.md ├── SeeminglyScience🧑 │ ├── minimal-steppable-pipeline.ps1 │ ├── Find-Referenced-Assemblies-ByRegex.ps1 │ └── delayed-loading-profile-of-Git-Posh-ArgumentCompleter.ps1 ├── Santisq🧑 │ └── create-a-runspace-pool-for-threading.ps1 └── Indented-Automation🧑 │ └── create-a-runspace-pool-for-threading.ps1 ├── PInvoke └── Readme.md ├── Cim └── Win32_Process_wildcard_search.ps1 ├── Unicode Runes ├── coerce_type_using_foreach_expressions.ps1 ├── cli_clipboard_invoke_formatter_to_expand_alias.ps1 └── distinct_rune_list.ps1 ├── ScriptBlock-Params ├── minimum-invoke-delayed-scriptblocks.ps1 └── minimum-invoke-delayed-scriptblocks2.ps1 ├── Other └── pipescript │ ├── YAML.Template.yml │ └── YAML.Template.psx.ps1 ├── readme.todo.md ├── Convert-non-hash-dict-to-hash.ps1 ├── PSReadLine ├── Basic - wait for keypress - does not require enter.ps1 └── Basic PSReadLineHistory Filter.ps1 ├── ExecutionContext └── ec-GetCommand.ps1 ├── invoke-format.ps1 ├── VS Code └── collect VS Code and powershell related version numbers - 2021-02.ps1 ├── readme.md ├── wip ├── Test-NullType.ps1 ├── Bitwise │ └── Get-IPAddress-Using-Bitwise-Operators.ps1 ├── GroupByTable │ └── Custom-Sort-TableGroupBy.ps1 └── Get-TypeInfo-Part2.ps1 ├── Custom Prompt ├── Custom Prompt ➟ Minimalism ➟ Monkey and Red for admin.ps1 └── Prompt Examples from the docs.ps1 ├── Section_Commands ├── Show-Command.ps1 ├── Foreach-Object.md └── Trace-Command.ps1 ├── Invoke-RemoteCommands └── Invoke-NativeCommand-wrapper.ps1 ├── Trace-Command └── Compare-Pansies-Vs-Write-host.ps1 ├── Pipeline ├── Pipeline-input-Without-using-ValueFromPipeline-attribute.readme.md ├── Pipeline-input-Without-using-ValueFromPipeline-attribute.ps1 └── Split-Verbose-Filter-By-Regex.ps1 ├── Todo - Cleanup └── Export-PSDefaultParameterValues.ps1 ├── Benchmark └── compare-sorted-strings.ps1 ├── File IO ├── Find-VSCodeLogUsage.basic.ps1 ├── Find newest files by extension - 2021-02-16.ps1 ├── reading piping raw bytes from native commands -- git archive.ps1 ├── ExportCsv │ └── ExportToCsv Using Classes as Structured Records.ps1 ├── maybe-duplicate-Searching filesystem using deque and enumerate files 2021-04-15.ps1 └── DirectoryInfo.EnumerateFilesystemInfos.ps1 ├── WebAPI-Json └── strict-structured-classes-convertTo-From-json.ps1 ├── Templates ├── Function-Config-Join-Hashtable-on-defaults-with-parameters.ps1 ├── doc.md ├── doc-1.20.md └── Ninmonkey.Console │ └── Template-Generic-Pipeline-Commandlet.ps1 ├── Registry └── Set-Taskbar JumpListItems_Maximum.ps1 ├── Null └── Switch Enumeration using Null values.ps1 ├── .github └── workflows │ └── PushGitLogger.yml ├── Regex └── Regex_pattern-maps_to_call_scriptblocks.ps1 ├── ArgumentTransformation └── MyArgumentTransformationAttribute.ps1 ├── Debugging └── Capture-Debug-Stream-To-PSHost.ps1 ├── XML └── data │ └── bookstore.xml ├── DiffTwoPythonVersionInfo.ps1 ├── Error-Handling └── Write-Error-Exception-Object.ps1 ├── Comparison ├── HashSet-Assert-Hashtable-Keys-Equal-ControlCase.ps1 └── Compare-List-of-strings-are-equal.insensitive.ps1 ├── Hashtable └── Compare-Powershell-Hashtables.ps1 └── Performance └── PSProfile-Compare-MemberAccess -- PSProfiler.ps1 /notebooks/sketch/ImportExcel-part2.ps1: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/DISKPART.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/GRAFTABL.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Dangers-of-Input/DangersOf-NonPipelineInput.ps1: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Parsing Native Apps/readme.md: -------------------------------------------------------------------------------- 1 | [Back ↑](..) 2 | 3 | ## -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/DISKPART.stderr.txt: -------------------------------------------------------------------------------- 1 | Access is denied. 2 | -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/CLS.txt: -------------------------------------------------------------------------------- 1 | Clears the screen. 2 | 3 | CLS 4 | -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/VER.txt: -------------------------------------------------------------------------------- 1 | Displays the Windows version. 2 | 3 | VER 4 | -------------------------------------------------------------------------------- /GUI/ShowUI/readme.md: -------------------------------------------------------------------------------- 1 | ## About 2 | 3 | See: 4 | 5 | Currently it runs on WinPS only -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.lnk 3 | Version Before OneDrive - mini-examples.code-workspace 4 | nin.Bookmark.txt 5 | **/.export/* 6 | -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/REM.txt: -------------------------------------------------------------------------------- 1 | Records comments (remarks) in a batch file or CONFIG.SYS. 2 | 3 | REM [comment] 4 | -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/TYPE.txt: -------------------------------------------------------------------------------- 1 | Displays the contents of a text file or files. 2 | 3 | TYPE [drive:][path]filename 4 | -------------------------------------------------------------------------------- /Dangers-of-Input/new-using-pipeparams.ps1: -------------------------------------------------------------------------------- 1 | C:\Users\cppmo_000\SkyDrive\Documents\2022\client_BDG\self\output\PayloJsonCache.json 2 | -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/VOL.txt: -------------------------------------------------------------------------------- 1 | Displays the disk volume label and serial number, if they exist. 2 | 3 | VOL [drive:] 4 | -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/PAUSE.txt: -------------------------------------------------------------------------------- 1 | Suspends processing of a batch program and displays the message 2 | Press any key to continue . . . -------------------------------------------------------------------------------- /mini-examples.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | } 6 | ], 7 | "settings": {} 8 | } -------------------------------------------------------------------------------- /Types/src/TypeDate.SqlClusteredResult.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Types/src/TypeDate.SqlClusteredResult.png -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/GRAFTABL.stderr.txt: -------------------------------------------------------------------------------- 1 | 'GRAFTABL' is not recognized as an internal or external command, 2 | operable program or batch file. 3 | -------------------------------------------------------------------------------- /CommandLineInterface/img/native_command.bcp.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/CommandLineInterface/img/native_command.bcp.gif -------------------------------------------------------------------------------- /CommandLineInterface/readme.md: -------------------------------------------------------------------------------- 1 | ## Command line Examples 2 | 3 | - [Invoking `BCP.exe`.ps1](./Invoke-NativeBCP.ps1) 4 | 5 | ![screenshot_bcp](./img/native_command.bcp.gif) -------------------------------------------------------------------------------- /Format/ShouldProcess-FrontHeader/TestAll-Colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Format/ShouldProcess-FrontHeader/TestAll-Colors.png -------------------------------------------------------------------------------- /Module/ClassExplorer/image/good-else-duplicate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Module/ClassExplorer/image/good-else-duplicate.png -------------------------------------------------------------------------------- /GUI/ShowUI/part 3 - Select - checkboxes.screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/GUI/ShowUI/part 3 - Select - checkboxes.screenshot.png -------------------------------------------------------------------------------- /Misc/Test-IsAny.ps1: -------------------------------------------------------------------------------- 1 | function Test-IsAny { 2 | 3 | } 4 | 5 | $tests = @( 6 | Test-IsDirectory = $_ 7 | $_.Length -eq 1 8 | $_.Extension = 'json' 9 | ) 10 | -------------------------------------------------------------------------------- /Module/ClassExplorer/image/smart-case-regex-syntax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Module/ClassExplorer/image/smart-case-regex-syntax.png -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/PRINT.txt: -------------------------------------------------------------------------------- 1 | Prints a text file. 2 | 3 | PRINT [/D:device] [[drive:][path]filename[...]] 4 | 5 | /D:device Specifies a print device. 6 | 7 | -------------------------------------------------------------------------------- /Parameters/Image/IsPresent-Compare-switch-parameter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Parameters/Image/IsPresent-Compare-switch-parameter.png -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/image/export-dos-command-csv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Parsing Native Apps/DOS/image/export-dos-command-csv.png -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/Help.txt: -------------------------------------------------------------------------------- 1 | Provides help information for Windows commands. 2 | 3 | HELP [command] 4 | 5 | command - displays help information on that command. 6 | -------------------------------------------------------------------------------- /Pester/Data Driven/data/pester-triple-nested-results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Pester/Data Driven/data/pester-triple-nested-results.png -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/image/export-dos-command-topics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Parsing Native Apps/DOS/image/export-dos-command-topics.png -------------------------------------------------------------------------------- /Parsing Native Apps/Invoke-Netstat/final-posh-objects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Parsing Native Apps/Invoke-Netstat/final-posh-objects.png -------------------------------------------------------------------------------- /Pester/Data Driven/data/pester-array-testcases.results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Pester/Data Driven/data/pester-array-testcases.results.png -------------------------------------------------------------------------------- /Types/src/Minimal-Set-DefaultDisplayPropertySet.screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Types/src/Minimal-Set-DefaultDisplayPropertySet.screen.png -------------------------------------------------------------------------------- /Format/ShouldProcess-FrontHeader/ShouldProcess-WithColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Format/ShouldProcess-FrontHeader/ShouldProcess-WithColor.png -------------------------------------------------------------------------------- /Format/ShouldProcess-FrontHeader/img/StructuredUserOutput.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Format/ShouldProcess-FrontHeader/img/StructuredUserOutput.png -------------------------------------------------------------------------------- /GUI/ShowUI/NewListBox-minimal.ps1: -------------------------------------------------------------------------------- 1 | New-ListBox -SelectionMode Multiple { 2 | # Just using files as an example here ... 3 | Get-ChildItem -File -Name | Sort-Object -Descending 4 | } -Show -------------------------------------------------------------------------------- /Module/ClassExplorer/image/Inspecting fake scopes by psdrive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Module/ClassExplorer/image/Inspecting fake scopes by psdrive.png -------------------------------------------------------------------------------- /Module/ClassExplorer/image/find-type-global-wildcard-mashup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Module/ClassExplorer/image/find-type-global-wildcard-mashup.png -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/TITLE.txt: -------------------------------------------------------------------------------- 1 | Sets the window title for the command prompt window. 2 | 3 | TITLE [string] 4 | 5 | string Specifies the title for the command prompt window. 6 | -------------------------------------------------------------------------------- /Completers/Test1.ps1: -------------------------------------------------------------------------------- 1 | @' 2 | See command: 3 | @{ 4 | Name = PowerShellEditorServices.Commands\Find-Ast 5 | BaseName = Find-Ast 6 | Source = PowerShellEditorServices.Commands 7 | } 8 | '@ 9 | -------------------------------------------------------------------------------- /GUI/ShowUI/Select List - Using Images as thumbnails.screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/GUI/ShowUI/Select List - Using Images as thumbnails.screenshot.png -------------------------------------------------------------------------------- /ForEach-Object-Parallel-Thread/WriteProgress-Status-of-4-threads.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/ForEach-Object-Parallel-Thread/WriteProgress-Status-of-4-threads.png -------------------------------------------------------------------------------- /Format/ShouldProcess-FrontHeader/img/invoke-shouldprocess-1and2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Format/ShouldProcess-FrontHeader/img/invoke-shouldprocess-1and2.png -------------------------------------------------------------------------------- /Format/ShouldProcess-FrontHeader/img/invoke-shouldprocess-4and5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Format/ShouldProcess-FrontHeader/img/invoke-shouldprocess-4and5.png -------------------------------------------------------------------------------- /Module/ClassExplorer/image/cheatsheet-which-attribute-to-inheriet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Module/ClassExplorer/image/cheatsheet-which-attribute-to-inheriet.png -------------------------------------------------------------------------------- /Module/ClassExplorer/image/get-powershell-list-of-internal-vars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Module/ClassExplorer/image/get-powershell-list-of-internal-vars.png -------------------------------------------------------------------------------- /Module/toc.unsorted.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | - [dfinke/getreport.ps1](https://gist.github.com/dfinke/861f9b2cec902b2398341620d6338dcb) 6 | - using [PSAdvantage](https://github.com/dfinke/PSAdvantage) 7 | -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/image/exporting-DOS-man-pages-from-Pwsh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Parsing Native Apps/DOS/image/exporting-DOS-man-pages-from-Pwsh.png -------------------------------------------------------------------------------- /Parsing Native Apps/Invoke-Netstat/regex101.highlighted-matches.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Parsing Native Apps/Invoke-Netstat/regex101.highlighted-matches.png -------------------------------------------------------------------------------- /Console/TitleBar-Show-Progress/ansi-escapes-show-titlebard-progress.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Console/TitleBar-Show-Progress/ansi-escapes-show-titlebard-progress.gif -------------------------------------------------------------------------------- /Module/ClassExplorer/image/type-by-base_member-by-paramtype-mashup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Module/ClassExplorer/image/type-by-base_member-by-paramtype-mashup.png -------------------------------------------------------------------------------- /Module/ClassExplorer/image/which-members-are-not-inheritable-sealed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Module/ClassExplorer/image/which-members-are-not-inheritable-sealed.png -------------------------------------------------------------------------------- /Completers/Dynamic ValidateSet Completer/dynamic_validateset_completer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Completers/Dynamic ValidateSet Completer/dynamic_validateset_completer.gif -------------------------------------------------------------------------------- /Format/ShouldProcess-FrontHeader/ShouldProcess-FrontHeader-SeeminglySci.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Format/ShouldProcess-FrontHeader/ShouldProcess-FrontHeader-SeeminglySci.png -------------------------------------------------------------------------------- /FromPeople🧑/JustinGrote🧑/completion/GetAzVMImageAutocomplete.ps1/_Demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/FromPeople🧑/JustinGrote🧑/completion/GetAzVMImageAutocomplete.ps1/_Demo.gif -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/ECHO.txt: -------------------------------------------------------------------------------- 1 | Displays messages, or turns command-echoing on or off. 2 | 3 | ECHO [ON | OFF] 4 | ECHO [message] 5 | 6 | Type ECHO without parameters to display the current echo setting. 7 | -------------------------------------------------------------------------------- /Parsing Native Apps/Github-FindInvoke-PullRequest/FindInvoke-PullRequest.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninmonkey/Mini.Examples-PowerShell/HEAD/Parsing Native Apps/Github-FindInvoke-PullRequest/FindInvoke-PullRequest.gif -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/CHCP.txt: -------------------------------------------------------------------------------- 1 | Displays or sets the active code page number. 2 | 3 | CHCP [nnn] 4 | 5 | nnn Specifies a code page number. 6 | 7 | Type CHCP without a parameter to display the active code page number. 8 | -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/VERIFY.txt: -------------------------------------------------------------------------------- 1 | Tells cmd.exe whether to verify that your files are written correctly to a 2 | disk. 3 | 4 | VERIFY [ON | OFF] 5 | 6 | Type VERIFY without a parameter to display the current VERIFY setting. 7 | -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/RECOVER.txt: -------------------------------------------------------------------------------- 1 | Recovers readable information from a bad or defective disk. 2 | 3 | RECOVER [drive:][path]filename 4 | Consult the online Command Reference in Windows Help 5 | before using the RECOVER command. 6 | -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/REN.txt: -------------------------------------------------------------------------------- 1 | Renames a file or files. 2 | 3 | RENAME [drive:][path]filename1 filename2. 4 | REN [drive:][path]filename1 filename2. 5 | 6 | Note that you cannot specify a new drive or path for your destination file. 7 | -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/RENAME.txt: -------------------------------------------------------------------------------- 1 | Renames a file or files. 2 | 3 | RENAME [drive:][path]filename1 filename2. 4 | REN [drive:][path]filename1 filename2. 5 | 6 | Note that you cannot specify a new drive or path for your destination file. 7 | -------------------------------------------------------------------------------- /PInvoke/Readme.md: -------------------------------------------------------------------------------- 1 | # About 2 | 3 | Calling win32 API from Powershell or c# 4 | 5 | # Docs: 6 | 7 | - https://docs.microsoft.com/en-us/dotnet/standard/native-interop/pinvoke 8 | - https://docs.microsoft.com/en-us/dotnet/standard/native-interop/cross-platform -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/readme.md: -------------------------------------------------------------------------------- 1 | 2 | ## 3 | 4 | [DOS Commands Folder](./output/readme.md) 5 | 6 | ![sdfs](./image/export-dos-command-csv.png) 7 | ![sdfs](./image/export-dos-command-topics.png) 8 | ![sdfs](./image/exporting-DOS-man-pages-from-Pwsh.png)) -------------------------------------------------------------------------------- /Cim/Win32_Process_wildcard_search.ps1: -------------------------------------------------------------------------------- 1 | $query = @( 2 | 'Name like "%fire%fo%"' 3 | 'Name like "%pwsh%"' 4 | 'Name like "%powershell%"' 5 | 'Name like "wt"' 6 | ) 7 | 8 | $query | % { 9 | Get-CimInstance Win32_Process -filter $_ 10 | } 11 | -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/TREE.txt: -------------------------------------------------------------------------------- 1 | Graphically displays the folder structure of a drive or path. 2 | 3 | TREE [drive:][path] [/F] [/A] 4 | 5 | /F Display the names of the files in each folder. 6 | /A Use ASCII instead of extended characters. 7 | 8 | -------------------------------------------------------------------------------- /Unicode Runes/coerce_type_using_foreach_expressions.ps1: -------------------------------------------------------------------------------- 1 | #Requires -PSEdition Core 2 | 3 | # I forget the coercion 'shorthand' 4 | 5 | $nums = 80..100 6 | 7 | # long hand 8 | $nums | ForEach-Object { 9 | [Text.Rune]$_ 10 | } | Join-String 11 | 12 | 13 | -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/POPD.txt: -------------------------------------------------------------------------------- 1 | Changes to the directory stored by the PUSHD command. 2 | 3 | POPD 4 | 5 | 6 | If Command Extensions are enabled the POPD command will delete 7 | any temporary drive letter created by PUSHD when you POPD that 8 | drive off the pushed directory stack. 9 | -------------------------------------------------------------------------------- /ScriptBlock-Params/minimum-invoke-delayed-scriptblocks.ps1: -------------------------------------------------------------------------------- 1 | { $PSItem }.InvokeWithContext($null, [psvariable]::new('_', '🐈')) 2 | 3 | 4 | $MyName = 'fred' 5 | 6 | $SB = { 7 | "Hi $MyName" 8 | $MyName = 'Jen' 9 | } 10 | 11 | $Sb.InvokeWithContext( $null, $Null ) 12 | $MyName -------------------------------------------------------------------------------- /Other/pipescript/YAML.Template.yml: -------------------------------------------------------------------------------- 1 | PipeScript: | 2 | { 3 | @{a='b'} 4 | } 5 | List: 6 | - PipeScript: | 7 | { 8 | @{a='b';k2='v';k3=@{k='v'}} 9 | } 10 | - PipeScript: | 11 | { 12 | @(@{a='b'}, @{c='d'}) 13 | } 14 | - PipeScript: | 15 | { 16 | @{a='b'}, @{c='d'} 17 | } -------------------------------------------------------------------------------- /readme.todo.md: -------------------------------------------------------------------------------- 1 | ## Future ideas 2 | 3 | 4 | - [TraceSource](https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.tracesource?view=net-6.0) 5 | - 6 | -:wq 7 | -------------------------------------------------------------------------------- /GUI/ShowUI/selectboxes-like-fzf-as-ui.ps1: -------------------------------------------------------------------------------- 1 | import-module ShowUI 2 | 3 | ListView -ItemSource { 4 | gci $Env:Public\Pictures -recurse -File 5 | StackPanel -Orientation Horizontal { 6 | Image -Width 40 -source { Binding -Path FullName} 7 | Label -content {Binding -Path Name} 8 | } 9 | } -show -------------------------------------------------------------------------------- /Types/Common-Parameters.ps1: -------------------------------------------------------------------------------- 1 | @( 2 | [System.Management.Automation.Internal.CommonParameters].GetProperties() 3 | [System.Management.Automation.Internal.ShouldProcessParameters].GetProperties() 4 | [System.Management.Automation.Internal.TransactionParameters].GetProperties() 5 | ) 6 | [PoshCode.Pansies.RgbColor].GetProperties() 7 | -------------------------------------------------------------------------------- /Misc/.output/tt_xor.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Truth Table: XOR 4 | 5 | 6 | XOR means: A or B is true, but neither both and neither none 7 | 8 | | Fg | Bg | A XOR B | 9 | | ----- | ----- | ------- | 10 | | False | False | False | 11 | | False | True | True | 12 | | True | False | True | 13 | | True | True | False | 14 | 15 | -------------------------------------------------------------------------------- /Convert-non-hash-dict-to-hash.ps1: -------------------------------------------------------------------------------- 1 | @' 2 | context 3 | >> output is 4 | > You can turn it into a proper dictionary if you want: 5 | '@ 6 | 7 | Get-Package | ForEach-Object { 8 | $metaDataTable = [ordered]@{} 9 | $mdi = $_.Metadata 10 | $mdi.psbase.Keys.ForEach{ $metaDataTable[$_.LocalName] = $($mdi[$_.LocalName]) } 11 | 12 | $metaDataTable 13 | } -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/BREAK.txt: -------------------------------------------------------------------------------- 1 | Sets or Clears Extended CTRL+C checking on DOS system 2 | 3 | This is present for Compatibility with DOS systems. It has no effect 4 | under Windows. 5 | 6 | If Command Extensions are enabled, and running on the Windows 7 | platform, then the BREAK command will enter a hard coded breakpoint 8 | if being debugged by a debugger. 9 | -------------------------------------------------------------------------------- /PSReadLine/Basic - wait for keypress - does not require enter.ps1: -------------------------------------------------------------------------------- 1 | 2 | function _method1 { 3 | 'press X to do something' 4 | if($host.UI.RawUI.ReadKey([System.Management.Automation.Host.ReadKeyOptions]'NoEcho, IncludeKeyDown').Character -eq 'X') { 5 | 'doing something' 6 | } 7 | } 8 | 9 | function _method2 { 10 | [System.Console]::ReadKey($true).Key 11 | } -------------------------------------------------------------------------------- /Other/pipescript/YAML.Template.psx.ps1: -------------------------------------------------------------------------------- 1 | $yamlContent = @' 2 | PipeScript: | 3 | { 4 | @{a='b'} 5 | } 6 | List: 7 | - PipeScript: | 8 | { 9 | @{a='b';k2='v';k3=@{k='v'}} 10 | } 11 | - PipeScript: | 12 | { 13 | @(@{a='b'}, @{c='d'}) 14 | } 15 | - PipeScript: | 16 | { 17 | @{a='b'}, @{c='d'} 18 | } 19 | '@ 20 | 21 | [OutputFile('.\YAML.output.yaml')]$yamlContent 22 | 23 | -------------------------------------------------------------------------------- /Parsing Native Apps/DOS/output/RD.txt: -------------------------------------------------------------------------------- 1 | Removes (deletes) a directory. 2 | 3 | RMDIR [/S] [/Q] [drive:]path 4 | RD [/S] [/Q] [drive:]path 5 | 6 | /S Removes all directories and files in the specified directory 7 | in addition to the directory itself. Used to remove a directory 8 | tree. 9 | 10 | /Q Quiet mode, do not ask if ok to remove a directory tree with /S 11 | -------------------------------------------------------------------------------- /Console/Invoke-Command-then-ConditionallyPause.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .synopsis 3 | Execute a command, pausing if a regex appears 4 | #> 5 | 6 | $Pattern = 'adapter(?