Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
# Create a bootable USB flash drive in Win Srv 2022 # https://t.ly/HzBuo # Save as winsrv2022_bootable.ps1 # Select USB drive letter $usbDriveLetter = Read-Host "Enter USB drive letter (Ex: E)" # Format USB drive Format-Volume -DriveLetter $usbDriveLetter -FileSystem NTFS -NewFileSystemLabel "WinServerUSB" -Confirm:$false | Out-Null # Select ISO file mount point $isoMountPointDriveLetter = Read-Host "Enter ISO mount point drive letter (Ex: F)" # Copy ISO files to USB drive $source = "$($isoMountPointDriveLetter):\" $destination = "$($usbDriveLetter):\" robocopy $source $destination /COPYALL /Z /E /SEC /R:3 /W:3 # Make USB drive bootable $usbDriveNumber = (Get-WmiObject -Class Win32_DiskDrive | Where-Object {$_.InterfaceType -eq "USB" -and $_.DeviceID -like "*$usbDriveLetter"}).Index bootsect /nt60 $usbDriveLetter`: # Task completion notification Write-Host "USB Creation Complete!" Start-Sleep -Seconds 2 #------------------------------------------------------------------------------------------------ # Error with script policy not letting it run The following will allow all local scripts to execute on the VM, irrespective of whether they're signed or not: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)