Skip to content

Instantly share code, notes, and snippets.

View jatubio's full-sized avatar

Juan Antonio Tubio jatubio

View GitHub Profile
@jatubio
jatubio / ReplaceIniValue_Sample1.ps1
Last active March 13, 2023 15:33
PowerShell. Ini Files. Replacing a value in a key inside a section sample 1
# Ini files
# Replacing a value in a key inside a section sample
#
# http://stackoverflow.com/questions/29688299/powershell-and-regex-how-to-replace-a-ini-name-value-pair-inside-a-named-sectio/29688435#29688435
#
$Path="c:\temp\test.ini"
@"
# This line have a white line after and before
@jatubio
jatubio / ReplaceIniValue_Sample2.ps1
Last active March 14, 2016 11:04
PowerShell. Ini Files. Replacing a value in a key inside a section sample 2
# Ini files
# Replacing a value in a key inside a section sample
#
# RegEx101 Test (https://regex101.com/r/uC0cC3/1)
#
# http://stackoverflow.com/questions/29688299/powershell-and-regex-how-to-replace-a-ini-name-value-pair-inside-a-named-sectio/29688435#29688435
# Ini files
# Replacing a value in a key inside a section sample
#
@jatubio
jatubio / WaitForKey.ps1
Last active August 1, 2018 23:06
Show "Press any key to continue ..." and Wait until a key is pressed #powershell
Function WaitForKey
{
<#
.Synopsis
Show "Press any key to continue ...." and Wait until a key is pressed.
.Description
Can show a text before waiting.
.Notes