Skip to content

Instantly share code, notes, and snippets.

Created December 30, 2015 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/f1298a5ac9752ab59db9 to your computer and use it in GitHub Desktop.
Save anonymous/f1298a5ac9752ab59db9 to your computer and use it in GitHub Desktop.
var=scriptext
$myexpansion='
$applicationdrive=Get-Disk 1
$size=$applicationdrive | Get-Partition | Get-PartitionSupportedSize'
$maximumexpansion=$size.SizeMax
$applicationdrive | Get-Partition | Resize-Partition -Size $maximumexpansion
Invoke-Command -ComputerName localhost -ScriptBlock $myexpansion
@crshnbrn66
Copy link

I found a link on this topic on windows it pro.com

I've used it before but it's been a while:
http://windowsafg.no-ip.org/win10x86_x64.html

$message = "Message to John"
$ScriptBlockContent = {
param ($MessageToWrite)
Write-Host $MessageToWrite }

Invoke-Command -ComputerName savdalhv20 -ScriptBlock $ScriptBlockContent -ArgumentList $message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment