- Download: https://docs.microsoft.com/en-gb/sysinternals/downloads/psshutdown
- Usage: https://ss64.com/nt/psshutdown.html
psshutdown.exe \\computer1 -k
| $secpasswd = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force | |
| New-Object System.Management.Automation.PSCredential ("username", $secpasswd) |
| $options = [System.Management.Automation.Host.ChoiceDescription[]] @("&Yes", "&No") | |
| [int]$defaultchoice = 1 | |
| $option = $host.UI.PromptForChoice($Title, $Info, $Options, $defaultchoice) | |
| switch($option) | |
| { | |
| 0 { Write-Host "Yes – Write your code"} | |
| 1 { Write-Host "No – Write your code"} | |
| } |
| Get-CDDrive -VM $sql01 | Set-CDDrive -IsoPath "[SQL] SQL2017_DE.iso" -Confirm:0 | |
| Get-CDDrive -VM $sql01 | Set-CDDrive -Connected $true -Confirm:0 |
| $ds = Get-Datastore -Name SQL | |
| Copy-DatastoreItem -Item C:\Administration\SQL2017_DE.iso -Destination $ds.DatastoreBrowserPath |
| function New-IsoFile | |
| { | |
| <# | |
| .Synopsis | |
| Creates a new .iso file .Description The New-IsoFile cmdlet creates a new .iso file containing content from chosen folders | |
| .Example | |
| New-IsoFile "c:\tools","c:Downloads\utils" | |
| This command creates a .iso file in $env:temp folder (default location) that contains c:\tools and c:\downloads\utils folders. The folders themselves are included at the root of the .iso image. | |
| .Example | |
| New-IsoFile -FromClipboard -Verbose |
psshutdown.exe \\computer1 -k
| Enable-PSRemoting -Force | |
| $credential = New-Object System.Management.Automation.PSCredential @(($AdminDomain + "\" + $AdminUsername), (ConvertTo-SecureString -String $AdminPassword -AsPlainText -Force)) | |
| Invoke-Command -FilePath $PSScriptRoot\setup-as-user.ps1 -Credential $credential -ComputerName localhost |
| "background.useDefault": false, | |
| "background.customImages": [ | |
| "https://raw.githubusercontent.com/rwu823/vscode-bg-img/master/images/17/baby-black.png", | |
| "https://raw.githubusercontent.com/rwu823/vscode-bg-img/master/images/17/baby-white.png", | |
| "/your/patch/image" | |
| ], | |
| "background.style": { | |
| "background-position": "95% 95%", | |
| "background-size": "20%", | |
| "opacity": 0.8 |