Change file write order

This commit is contained in:
L3D 2022-12-29 16:44:54 +01:00
parent 2ae8ac0da2
commit e50ada5192
Signed by: l3d
GPG key ID: CD08445BFF4313D1
2 changed files with 5 additions and 6 deletions

View file

@ -435,6 +435,6 @@ Else {
[System.IO.Directory]::CreateDirectory('.ansible\status')
attrib +h .ansible
Add-Content -Path .ansible/status/ConfigureRemotingForAnsible.txt -Value "PS Remoting has been successfully configured for Ansible. See https://backwesen.de/voc/win_ansible_role_winrm.git"
Add-Content -Path .ansible\status\ConfigureRemotingForAnsible.txt -Value "PS Remoting has been successfully configured for Ansible. See https://backwesen.de/voc/win_ansible_role_winrm.git"
Write-VerboseLog "PS Remoting has been successfully configured for Ansible."

View file

@ -17,6 +17,10 @@
# 6.2 is 2012
# 6.3 is 2012 R2
[System.IO.Directory]::CreateDirectory('.ansible\status')
attrib +h .ansible
Add-Content -Path .ansible\status\upgrade_to_ps3.txt -Value "PS2 upgrades to PS3. See https://backwesen.de/voc/win_ansible_role_winrm.git"
if ($PSVersionTable.psversion.Major -ge 3) {
Write-Output "Powershell 3 Installed already; You don't need this"
@ -82,8 +86,3 @@ $FileName = $DownLoadUrl.Split('/')[-1]
download-file $downloadurl "$powershellpath\$filename"
Start-Process -FilePath "$powershellpath\$filename" -ArgumentList /quiet
[System.IO.Directory]::CreateDirectory('.ansible\status')
attrib +h .ansible
Add-Content -Path .ansible/status/upgrade_to_ps3.txt -Value "PS2 upgrades to PS3. See https://backwesen.de/voc/win_ansible_role_winrm.git"