changed password to securestring and some of the verbs
This commit is contained in:
34
samy.ps1
34
samy.ps1
@@ -194,7 +194,7 @@ $ConfirmPreference = 'None'
|
||||
|
||||
[Parameter(Mandatory,ParameterSetName='DattoFetch')]
|
||||
[Parameter(Mandatory,ParameterSetName='DattoInstall')]
|
||||
[string]$WebhookPassword,
|
||||
[SecureString]$WebhookPassword,
|
||||
|
||||
[string]$WebhookUrl = $Global:DattoWebhookUrl,
|
||||
|
||||
@@ -323,7 +323,7 @@ $ConfirmPreference = 'None'
|
||||
[Parameter(Mandatory = $false)][string] $NewRepositoryURL = "http://proget.svstools.ca:8083/nuget/SVS_Repo/"
|
||||
)
|
||||
|
||||
function Perform-Cleanup {
|
||||
function Start-Cleanup {
|
||||
Write-LogHybrid "Cleanup mode enabled. Starting cleanup..." "Info" "SVSModule"
|
||||
|
||||
# Attempt to uninstall all versions of SVSMSP
|
||||
@@ -435,9 +435,9 @@ $ConfirmPreference = 'None'
|
||||
}
|
||||
|
||||
|
||||
function Perform-ToolkitInstallation {
|
||||
function Start-ToolkitInstallation {
|
||||
Initialize-NuGetProvider
|
||||
Perform-Cleanup
|
||||
Start-Cleanup
|
||||
|
||||
Write-LogHybrid "Registering repo $NewRepositoryName…" "Info" "SVSModule" -LogToEvent
|
||||
if (-not (Get-PSRepository -Name $NewRepositoryName -ErrorAction SilentlyContinue)) {
|
||||
@@ -457,16 +457,16 @@ $ConfirmPreference = 'None'
|
||||
Write-LogHybrid "Install-SVSMSP called" "Info" "SVSModule" -LogToEvent
|
||||
if ($Cleanup) {
|
||||
|
||||
Perform-Cleanup
|
||||
Start-Cleanup
|
||||
Remove-SVSDeploymentRegKey
|
||||
return
|
||||
|
||||
}
|
||||
if ($InstallToolkit) {
|
||||
Perform-ToolkitInstallation; return
|
||||
Start-ToolkitInstallation; return
|
||||
}
|
||||
# default if no switch passed:
|
||||
Perform-ToolkitInstallation
|
||||
Start-ToolkitInstallation
|
||||
}
|
||||
|
||||
#endregion SVS Module
|
||||
@@ -809,8 +809,8 @@ Write-LogHybrid "Tasks by page: onboard=$(
|
||||
|
||||
#endregion building the Menus
|
||||
|
||||
#region Build-Checkboxes
|
||||
function Build-Checkboxes {
|
||||
#region Publish-Checkboxes
|
||||
function Publish-Checkboxes {
|
||||
param(
|
||||
[Parameter(Mandatory)][string]$Page,
|
||||
[string]$Column
|
||||
@@ -854,10 +854,10 @@ Write-LogHybrid "Tasks by page: onboard=$(
|
||||
$html
|
||||
}
|
||||
) -join "`n"
|
||||
} # end function Build-checkboxes
|
||||
} # end function Publish-Checkboxes
|
||||
|
||||
|
||||
#endregion Build-Checkboxes
|
||||
#endregion Publish-Checkboxes
|
||||
|
||||
#region Get-ModuleVersionHtml
|
||||
|
||||
@@ -966,11 +966,11 @@ function Get-UIHtml {
|
||||
#
|
||||
# 1) Build checkbox HTML per page/column
|
||||
#
|
||||
$onboardLeft = Build-Checkboxes -Page 'onboard' -Column 'left'
|
||||
$onboardRight = Build-Checkboxes -Page 'onboard' -Column 'right'
|
||||
$offboard = Build-Checkboxes -Page 'offboard' -Column ''
|
||||
$tweaks = Build-Checkboxes -Page 'tweaks' -Column ''
|
||||
$apps = Build-Checkboxes -Page 'SVSApps' -Column ''
|
||||
$onboardLeft = Publish-Checkboxes -Page 'onboard' -Column 'left'
|
||||
$onboardRight = Publish-Checkboxes -Page 'onboard' -Column 'right'
|
||||
$offboard = Publish-Checkboxes -Page 'offboard' -Column ''
|
||||
$tweaks = Publish-Checkboxes -Page 'tweaks' -Column ''
|
||||
$apps = Publish-Checkboxes -Page 'SVSApps' -Column ''
|
||||
|
||||
#
|
||||
# 2) Build the JS tasks array once (this is the only dynamic JS piece)
|
||||
@@ -1505,7 +1505,7 @@ function Install-DattoRMM {
|
||||
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium')]
|
||||
param (
|
||||
[switch]$UseWebhook,
|
||||
[string]$WebhookPassword,
|
||||
[SecureString]$WebhookPassword,
|
||||
[string]$WebhookUrl = $Global:DattoWebhookUrl,
|
||||
[string]$ApiUrl,
|
||||
[string]$ApiKey,
|
||||
|
||||
Reference in New Issue
Block a user