Last active
January 16, 2020 08:33
-
-
Save Satak/69776adfa9f19eda2779375f52ac31ad to your computer and use it in GitHub Desktop.
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
param( | |
[string]$version, | |
$AllowRemoteExecution = $True | |
) | |
# install AV | |
$path = 'C:\av' | |
$fileName = 'output.txt' | |
$fullFilePath = (Join-Path -Path $path -ChildPath $fileName) | |
New-Item -ItemType Directory -Path $path | |
New-Item -ItemType File -Path $fullFilePath | |
$version | Set-Content $fullFilePath | |
# init data disks | |
Get-Disk | Where-Object {$_.PartitionStyle -eq 'RAW'} | Initialize-Disk -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume | |
if($AllowRemoteExecution) { | |
Enable-PSRemoting | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment