Classes/ImageUSB.psm1
#region Classes class ImageUSBClass { [string] $url = $null [string] $image = $null [object] $config [string] $userProfile [string] $userTemp [string] $username [string] $path [string] $downloadPath [string] $zipFile [string] $localPath [int] $dirCount [string] $dirName [string] $dirName2 [string] $dest [string] $destFolder [string] $drive [string] $drive2 [string] $wimPath ImageUSBClass ([string]$imagePath, [string]$imageName) { $this.config = [pscustomobject]@{ "DownloadFolder" = "\\Image" "UrlPath" = @( [PSCustomObject]@{ Index = 1 Prompt = "Option 1 - $imageName" Path = $imagePath ImageName = $imageName } ) } $this.userProfile = Get-Content env:userProfile $this.username = Get-Content env:username $this.userTemp = Get-Content env:temp $this.downloadPath = Join-Path -path $this.userTemp -childpath "Win10\Image" } SetWimPath ([object]$wimPath) { if (Test-Path $wimPath.FullName) { $this.wimPath = $wimPath } } } #endregion |