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
| [CmdletBinding()] | |
| Param( | |
| [Parameter(Mandatory)] | |
| [String[]] | |
| $TrustedHosts | |
| ) | |
| begin { | |
| if(-not (Test-WSMan)){ | |
| Enable-PSRemoting -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
| choco list -lo --audit -r | | |
| ConvertFrom-Csv -Delimiter '|' -Header Package,Version,InstalledBy,Domain,RequestedBy,InstallDate | | |
| Select Package, Version, | |
| @{Name='InstalledBy';Expression={$_.InstalledBy -replace ('User:','')}}, | |
| @{Name='Domain';Expression={$_.Domain -replace ('Domain:','')}}, | |
| @{Name='RequestedBy';Expression={$_.RequestedBy -replace ('Original User:','')}}, | |
| @{Name='InstallDate';Expression={$_.InstallDate -replace ('InstallDateUtc:','')}} | | |
| ConvertTo-Html -Title "Chocolatey Package Audit" -PreContent "Machine: $env:COMPUTERNAME" > C:\temp\audit.htm |
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 Set-EnvironmentVariable { | |
| <# | |
| .SYNOPSIS | |
| Sets a system environment variable | |
| .DESCRIPTION | |
| Sets an environment variable in either machine, currentuser, or process scope | |
| .PARAMETER Scope | |
| The scope to set variable too |
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
| { | |
| "meta": { | |
| "theme": "kendall" | |
| }, | |
| "basics": { | |
| "name": "Stephen Valdinger", | |
| "label": "Customer Success Manager", | |
| "picture": "https://avatars.githubusercontent.com/u/8674240?v=4", | |
| "email": "[email protected]", | |
| "phone": "330.503.7322", |
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
| <# | |
| .SYNOPSIS | |
| Internalize package icons for internalized packages | |
| .EXAMPLE | |
| $params = @{ | |
| InternalizerDownloadPath = 'C:\internalized\download\' | |
| IconRepository = 'http://nexus.fabrikam.com:8081/repository/icons/' | |
| PackageRepository = 'http://nexus.fabrikam.com:8081/repository/choco/' | |
| } |
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
| if(-not (Get-Command choco)){ | |
| iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
| } | |
| choco install wsl wsl-ubuntu-2004 vscode vscode-powershell vscode-ansible -y |
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 Install-ChocolateyNotifyingPackage { | |
| [cmdletBinding()] | |
| param( | |
| [parameter()] | |
| [string] | |
| $Package | |
| ) | |
| process { |
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-ChocolateyExtension { | |
| <# | |
| .SYNOPSIS | |
| Generate chocolatey extension package from existing powershell module | |
| .DESCRIPTION | |
| Generate Chocolatey extension package from existing powershell module | |
| .PARAMETER PowerShellModule | |
| Use this to generate an extension from an existing, installed PowerShell module |
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
| $outdated = choco outdated -r | ConvertFrom-Csv -Delimiter '|' -Header 'PackageName', 'CurrentVersion', 'LatestVersion', 'Pinned' | |
| $outdated = $outdated | Select-Object PackageName, CurrentVersion, LatestVersion, @{Name = 'Outdated'; Expression = { if ([version]$_.LatestVersion -gt [version]$_.CurrentVersion) { $true } else { $false } } } | |
| $outdatedpackages = $outdated | Where-Object { $_.Outdated -eq $true } | Select-Object -First 4 | |
| $packageCollection = @() | |
| $x = 24020 | |
| foreach ($odp in $outdatedpackages) { |
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 Remove-RemoteGitBranch { | |
| [cmdletbinding()] | |
| param( | |
| [Parameter(Mandatory = $true, Position = 0)] | |
| [String] | |
| $Branch | |
| ) | |
| process { |