Skip to content

Instantly share code, notes, and snippets.

@josephoaks
Last active March 8, 2016 21:42
Show Gist options
  • Save josephoaks/9ffccc9056b8e62dc23f to your computer and use it in GitHub Desktop.
Save josephoaks/9ffccc9056b8e62dc23f to your computer and use it in GitHub Desktop.
#######################
### determine agent ###
#######################
$dir = "C:\Users\Administrator\Downloads"
$agent = Get-ChildItem $dir | Where-Object {$_.Extension -eq ".msi"}
msiexec /qn /norestart /l*v puppet_agent_install.log /i $agent.fullname PUPPET_MASTER_SERVER=master.puppetlabs.vm
#############################
### Remove RunOnce Script ###
#############################
Remove-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\RunOnce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment