$password = ConvertTo-SecureString 'Paper123!@#' -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential('INTRANET\sysadmin', $password)

New-PSDrive -Name AD2 -PSProvider FileSystem -Root "\\192.168.0.6\C$" -Credential $cred | Out-Null

Copy-Item -Path "D:\ClaudeTools\stop-and-install-agent.ps1" -Destination "AD2:\Temp\stop-and-install-agent.ps1" -Force

Write-Host "[OK] Updated script copied to C:\Temp\stop-and-install-agent.ps1"

Remove-PSDrive -Name AD2
