Hi All.
I am trying to place the code below in a sriptblock, not sure about the format.
$root_drive = "D" New-Partition -DiskNumber 1 -DriveLetter $root_drive -Size 20GB Format-Volume -DriveLetter $root_drive -FileSystem NTFS -NewFileSystemLabel “D_” -Confirm:$false -Force
In previous examples, I have seen
$scriptblock = $ExecutionContext.InvokeCommand.NewScriptBlock("Remove-DnsServerResourceRecord -ZoneName $ZoneName -ComputerName $DCName -Name $HostName -RecordData $IPv4Address -RRType A -Force")