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
| function ConvertTo-PascalCase | |
| { | |
| [OutputType('System.String')] | |
| param( | |
| [Parameter(Position=0)] | |
| [string] $Value | |
| ) | |
| # https://devblogs.microsoft.com/oldnewthing/20190909-00/?p=102844 | |
| return [regex]::replace($Value.ToLower(), '(^|_)(.)', { $args[0].Groups[2].Value.ToUpper()}) |
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
| # Simple script to reproduce remaining WiredTiger.lock | |
| # lock file issue observed with MongoDB Windows container: | |
| # https://github.com/docker-library/mongo/issues/385 | |
| function Remove-MongoLock | |
| { | |
| param( | |
| [string] $VolumeName | |
| ) |
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
| $Features = @(` | |
| 'Web-Server', | |
| 'Web-Http-Errors', | |
| 'Web-Http-Logging', | |
| 'Web-Static-Content', | |
| 'Web-Default-Doc', | |
| 'Web-Dir-Browsing', | |
| 'Web-AppInit', | |
| 'Web-Net-Ext45', |
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
| function Get-Netstat | |
| { | |
| $netstat = Get-Command -Name 'netstat' -ErrorAction SilentlyContinue | |
| if (-Not $netstat) { | |
| Write-Warning "netstat command not available" | |
| return ,@() | |
| } |
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
| function Invoke-PSCmdClient | |
| { | |
| param( | |
| [Parameter(Position=0)] | |
| [string] $PipeName | |
| ) | |
| $Pipe = [System.IO.Pipes.NamedPipeClientStream]::new('.', $PipeName, | |
| [System.IO.Pipes.PipeDirection]::In) |
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
| function New-ModulePackage | |
| { | |
| [CmdletBinding()] | |
| param( | |
| [Parameter(Mandatory=$true,Position=0)] | |
| [string] $InputPath, | |
| [Parameter(Mandatory=$true,Position=1)] | |
| [string] $OutputPath, | |
| [string] $TempPath |
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
| function Invoke-VMAutologon | |
| { | |
| [CmdletBinding()] | |
| param( | |
| [Parameter(Mandatory=$true,Position=0)] | |
| [string] $VMName, | |
| [Parameter(Mandatory=$true)] | |
| [string] $UserName, | |
| [string] $DomainName = ".\", |
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
| # | |
| # New-IsoFile: simple PowerShell function to create iso file from a directory | |
| # | |
| # This is heavily simplified code inspired from: | |
| # https://blog.apps.id.au/powershell-tools-create-an-iso/ | |
| # http://blogs.msdn.com/b/opticalstorage/archive/2010/08/13/writing-optical-discs-using-imapi-2-in-powershell.aspx | |
| # http://tools.start-automating.com/Install-ExportISOCommand/ | |
| # http://stackoverflow.com/a/9802807/223837 | |
| function New-IsoFile |
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
| function Expand-AlpineOverlay | |
| { | |
| [CmdletBinding()] | |
| param( | |
| [Parameter(Mandatory=$true,Position=0)] | |
| [string] $InputFile, | |
| [Parameter(Mandatory=$true,Position=1)] | |
| [string] $Destination, | |
| [switch] $Force | |
| ) |
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
| # Fetch latest PowerShell release information from GitHub and export ORAS manifest | |
| $Headers = @{ | |
| Accept = "application/vnd.github.v3+json"; | |
| } | |
| $RequestParams = @{ | |
| Method = 'GET'; | |
| Headers = $Headers; |
OlderNewer