#Requires -Version 7.2 <# .SYNOPSIS Builds and installs the Noz PowerShell module for the current user. .EXAMPLE ./Install-NozModule.ps1 ./Install-NozModule.ps1 -Verbose #> $ErrorActionPreference = 'Stop' $moduleDir = Join-Path ([Environment]::GetFolderPath('MyDocuments')) 'PowerShell' 'Modules' 'Noz' Write-Host "Building Noz.PowerShell..." -ForegroundColor Cyan dotnet build "$PSScriptRoot/Noz.PowerShell.csproj" -c Release -v quiet $src = "$PSScriptRoot/bin/Release/net8.0" Write-Host "Installing to: $moduleDir" -ForegroundColor Cyan New-Item -ItemType Directory -Force -Path $moduleDir | Out-Null # Copy DLLs and manifest Copy-Item "$src/Noz.PowerShell.dll" $moduleDir -Force Copy-Item "$src/NozCli.Core.dll" $moduleDir -Force Copy-Item "$PSScriptRoot/Noz.psd1" $moduleDir -Force Write-Host "Done. Import with:" -ForegroundColor Green Write-Host " Import-Module Noz" -ForegroundColor White Write-Host " Get-NozNote -Topic psychologie" -ForegroundColor White