This commit is contained in:
Zack Meier
2026-04-15 15:42:41 -05:00
parent 74edcc4d9a
commit 03dba08135
146 changed files with 9119 additions and 1 deletions
+131
View File
@@ -0,0 +1,131 @@
<#
.Synopsis
Short description
.DESCRIPTION
Long description
.EXAMPLE
Example of how to use this cmdlet
.EXAMPLE
Another example of how to use this cmdlet
#>
function Add-ITDCredentialToCsv
{
[CmdletBinding()]
Param
(
[Parameter(Mandatory=$true)]
[string]
$VariableName
)
begin
{
}
process
{
$NewCredential=Get-Credential
$obj=[PSCustomObject]@{
'VariableName' = $VariableName
'Username' = $NewCredential.UserName;
'SecureString' = $NewCredential.Password | ConvertFrom-SecureString;
}
$Obj | export-csv ($env:USERPROFILE + "\Documents\accts.csv") -Force -Append
}
end
{
}
}
<#
.SYNOPSIS
Short description
.DESCRIPTION
Long description
.EXAMPLE
Example of how to use this cmdlet
.EXAMPLE
Another example of how to use this cmdlet
.INPUTS
Inputs to this cmdlet (if any)
.OUTPUTS
Output from this cmdlet (if any)
.NOTES
General notes
.COMPONENT
The component this cmdlet belongs to
.ROLE
The role this cmdlet belongs to
.FUNCTIONALITY
The functionality that best describes this cmdlet
#>
function Update-ITDCredentialCsv
{
[CmdletBinding()]
Param
(
[string[]]
$VariableName,
[switch]
$All
)
begin
{
$csv = Import-Csv ($env:USERPROFILE + "\Documents\accts.csv")
}
process
{
If($All)
{
$vn = $csv.VariableName
}
ForEach($vn in $VariableName)
{
$cred=$null
$cred = Get-Credential -Message ("Enter new credentials for variable named: " + $vn)
If($Cred)
{
$csv = $csv | Where-Object VariableName -ne $vn | Export-Csv ($env:USERPROFILE + "\Documents\accts.csv") -Force
Add-ITDCredentialToCsv -VariableName $vn -Credential $cred
}
}
}
end
{
}
}
<#
.SYNOPSIS
Removes old versions of ITD modules
.DESCRIPTION
Long description
.EXAMPLE
Example of how to use this cmdlet
.EXAMPLE
Another example of how to use this cmdlet
.INPUTS
Inputs to this cmdlet (if any)
.OUTPUTS
Output from this cmdlet (if any)
.NOTES
General notes
.COMPONENT
The component this cmdlet belongs to
.ROLE
The role this cmdlet belongs to
.FUNCTIONALITY
The functionality that best describes this cmdlet
#>