SSHManagement.psm1
class SSHServer { [string]$Name [string]$IP [string[]]$Tags SSHServer( [string]$n, [string]$i, [string[]]$t ) { $this.Name = $n $this.IP = $i $this.Tags = $t } SSHServer(){} } Get-ChildItem (Split-Path $script:MyInvocation.MyCommand.Path) -Filter 'func_*.ps1' -Recurse | ForEach-Object { . $_.FullName } Get-ChildItem "$(Split-Path $script:MyInvocation.MyCommand.Path)\Public\*" -Filter 'func_*.ps1' -Recurse | ForEach-Object { Export-ModuleMember -Function ($_.BaseName -Split "_")[1] } New-Variable -Name SSHServersFile -Value "$env:LOCALAPPDATA\SSHManagement\SSHServer.json" -Scope Script -Force |