Profil aufjeden fall anlegen.
This commit is contained in:
27
install.ps1
27
install.ps1
@@ -166,6 +166,15 @@ do {
|
||||
Write-Host "Probleme beim verlinken der Powershell config ~/Documents/PowerShell/profile.ps1 " -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
else {
|
||||
Try {
|
||||
New-Item -Path "~/Documents/PowerShell/profile.ps1" -ItemType SymbolicLink -Value "~/.winconfig/profile.ps1" | Out-Null
|
||||
Write-Host "Powershell config ~/Documents/PowerShell/profile.ps1 erfolgreich verlinkt."
|
||||
}
|
||||
Catch {
|
||||
Write-Host "Probleme beim verlinken der Powershell config ~/Documents/PowerShell/profile.ps1 " -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
if ((Test-Path "~/Documents/WindowsPowerShell/profile.ps1" -PathType Leaf) -eq $True) {
|
||||
Remove-Item -Force "~/Documents/WindowsPowerShell/profile.ps1"
|
||||
Write-Host "Powershell config ~/Documents/WindowsPowerShell/profile.ps1 erfolgreich gelöscht." -ForegroundColor Green
|
||||
@@ -177,6 +186,15 @@ do {
|
||||
Write-Host "Probleme beim verlinken der Powershell config ~/Documents/PowerShell/profile.ps1" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
else {
|
||||
Try {
|
||||
New-Item -Path "~/Documents/PowerShell/profile.ps1" -ItemType SymbolicLink -Value "~/.winconfig/profile.ps1" | Out-Null
|
||||
Write-Host "Powershell config ~/Documents/WindowsPowerShell/profile.ps1 erfolgreich verlinkt."
|
||||
}
|
||||
Catch {
|
||||
Write-Host "Probleme beim verlinken der Powershell config ~/Documents/PowerShell/profile.ps1" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
if ((Test-Path "~/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1" -PathType Leaf) -eq $True) {
|
||||
Remove-Item -Force "~/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1"
|
||||
Write-Host "Powershell ~/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 config erfolgreich gelöscht." -ForegroundColor Green
|
||||
@@ -188,6 +206,15 @@ do {
|
||||
Write-Host "Probleme beim verlinken der Powershell config ~/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 ." -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
else {
|
||||
Try {
|
||||
New-Item -Path "~\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1" -ItemType SymbolicLink -Value "~/.winconfig/profile.ps1" | Out-Null
|
||||
Write-Host "Powershell config ~/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 erfolgreich verlinkt."
|
||||
}
|
||||
Catch {
|
||||
Write-Host "Probleme beim verlinken der Powershell config ~/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 ." -ForegroundColor Red
|
||||
} <# Action when all if and elseif conditions are false #>
|
||||
}
|
||||
# Powershell Modul für Updates
|
||||
Write-Host "Beginne mit der Insallation des Powershell Update Modul..." -ForegroundColor Blue
|
||||
Try {
|
||||
|
||||
Reference in New Issue
Block a user