Skip to content

Instantly share code, notes, and snippets.

@DiegoCarvalho75
Created August 3, 2020 15:33
Show Gist options
  • Save DiegoCarvalho75/ecf4d73eddd2bed8c25dc6572a75caba to your computer and use it in GitHub Desktop.
Save DiegoCarvalho75/ecf4d73eddd2bed8c25dc6572a75caba to your computer and use it in GitHub Desktop.
$tipo = $args[0]
Write-Output $path;
Write-Output (Get-Item .).BaseName
Write-Output $PSScriptRoot
$local = Get-Location
# Get-History | Export-Csv $local\history.csv -IncludeTypeInformation
if ($tipo -eq "hello") {
Import-Csv $local\history.csv | Add-History
Write-Output "Histórico de camandos atualizado";
}
elseif ($tipo -eq "by") {
Get-History | Export-Csv $local\history.csv -IncludeTypeInformation
Write-Output "Salvou histórico de comandos";
exit
}
else {
Write-Output "Nem by nem hello ";
exit
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment