This file contains 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
$FirstHop = "Server1" | |
$SecondHop = "Server2" | |
$Cred = Get-Credential | |
Function Run-CustomFunction { | |
param( | |
$FirstHop, | |
$SecondHop, | |
$Cred | |
) |
This file contains 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
<# | |
Replace individual rows in a CSV | |
(if there are no multiline rows) | |
Define example input file | |
City Zipcode | |
---- ------- | |
Phoenix, AZ 85001 | |
Little Rock, AR 72201 |
This file contains 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
$File = 'C:\Users\miles.gratz\desktop\Dark Console Light Editor default.StorableColorTheme.ps1xml' | |
$Content = Get-Content $file | |
$Results = @() | |
$Index = 0 | |
foreach ($line in $content) | |
{ | |
if ($line -match "\<string\>") | |
{ | |
$key = (($line -split "<string>")[1] -split "</string>")[0] | |
$object = New-Object PSCustomObject |
This file contains 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
# Get cert on local computer by thumbprint | |
$thumbprint = '89D3FC64B6405E161EDC7A4CF14E111F5F6895AA' | |
$Cert = Get-ChildItem Cert:\LocalMachine\My | Where-Object { $_.Thumbprint -eq $thumbprint } | |
################################################### | |
# Manage private key of CAPI cert | |
################################################### | |
# Find private key | |
$privKey = $Cert.PrivateKey.CspKeyContainerInfo.UniqueKeyContainerName |
OlderNewer