https://keyoxide.org/8CCEE7469BC346F39E384E65D55828BC778954CB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ============================================================================= | |
| # winrm-bootstrap.ps1 | |
| # ============================================================================= | |
| # Configures the Windows Server 2022 VM for Ansible WinRM access. | |
| # | |
| # This script is fetched by the Azure Custom Script Extension on first boot | |
| # and runs as SYSTEM. By the time it finishes, the workshop's control node | |
| # can connect to this VM via Ansible's winrm connection plugin. | |
| # | |
| # What it does: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Add Veeam Snap-in | |
| Add-PSSnapin -Name VeeamPSSnapin -ErrorAction SilentlyContinue | |
| function Remap-VMs ([Veeam.Backup.Core.CBackup]$backup, [string]$newVCenterFQDN) { | |
| # get Veeam's hostId using new VC FQDN | |
| $newHostId = (Get-VBRServer -Name $newVCenterFQDN).Id | |
| # Get Objects in backup | |
| $OIBs = $backup.GetObjects() | |
| foreach ($OIB in $OIBs) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Set-VCSAShell { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter( Mandatory = $true, | |
| Position = 0)] | |
| [string]$VCSAName, | |
| [ValidateNotNull()] | |
| [System.Management.Automation.PSCredential] |
1.1.02