NetboxPS/Functions/Setup/Set-NetboxHostName.ps1

15 lines
408 B
PowerShell
Raw Normal View History

2020-04-09 09:57:20 -04:00
function Set-NetboxHostName {
[CmdletBinding(ConfirmImpact = 'Low',
SupportsShouldProcess = $true)]
[OutputType([string])]
param
(
[Parameter(Mandatory = $true)]
[string]$Hostname
)
if ($PSCmdlet.ShouldProcess('Netbox Hostname', 'Set')) {
$script:NetboxConfig.Hostname = $Hostname.Trim()
$script:NetboxConfig.Hostname
}
}