Download Run.ps1 from minefarts/server-main-virtual_machines: direct link, hf CLI and curl.
- Browser
- Download file 537 Bytes
-
https://huggingface.co/datasets/minefarts/server-main-virtual_machines/resolve/main/Run.ps1
- Command line
-
hf download hf://datasets/minefarts/server-main-virtual_machines/Run.ps1
-
curl -L -o Run.ps1 https://huggingface.co/datasets/minefarts/server-main-virtual_machines/resolve/main/Run.ps1
537 Bytes
| param( | |
| [string] $Name, | |
| [string] $Username, | |
| [securestring] $Password = (New-Object System.Security.SecureString), | |
| [string] $CMD | |
| ) | |
| $cred = New-Object ` | |
| -TypeName System.Management.Automation.PSCredential ` | |
| -ArgumentList($Username, $Password) | |
| if ($null -eq $CMD) { | |
| Enter-PSSession ` | |
| -VMName $Name ` | |
| -Credential $cred ` | |
| -Authentication NegotiateWithImplicitCredentials | |
| } else { | |
| Invoke-Command ` | |
| -VMName $Name ` | |
| -ScriptBlock { $cmd } ` | |
| -Credential $cred | |
| } |