Skip to content

Instantly share code, notes, and snippets.

@cpuguy83
Created August 7, 2013 17:04
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 cpuguy83/6176071 to your computer and use it in GitHub Desktop.
Save cpuguy83/6176071 to your computer and use it in GitHub Desktop.
knife bootstrap windows fail
Brians-MacBook-Pro:~ bgoff$ knife bootstrap windows winrm 10.0.1.130 -x OCD
WARNING: Could not load IOV methods. Check your GSSAPI C library for an update
WARNING: Could not load AEAD methods. Check your GSSAPI C library for an update
Bootstrapping Chef on 10.0.1.130
Enter your password:
10.0.1.130 "Rendering 'C:\Users\OCD\AppData\Local\Temp\bootstrap-15078-1375894896.bat' chunk 1"
10.0.1.130 "Rendering 'C:\Users\OCD\AppData\Local\Temp\bootstrap-15078-1375894896.bat' chunk 2"
10.0.1.130 '#39' is not recognized as an internal or external command,
10.0.1.130 operable program or batch file.
10.0.1.130 "Rendering 'C:\Users\OCD\AppData\Local\Temp\bootstrap-15078-1375894896.bat' chunk 3"
10.0.1.130 "Rendering 'C:\Users\OCD\AppData\Local\Temp\bootstrap-15078-1375894896.bat' chunk 4"
10.0.1.130 '#39' is not recognized as an internal or external command,
10.0.1.130 operable program or batch file.
10.0.1.130 '#39' is not recognized as an internal or external command,
10.0.1.130 operable program or batch file.
10.0.1.130 "Rendering 'C:\Users\OCD\AppData\Local\Temp\bootstrap-15078-1375894896.bat' chunk 5"
10.0.1.130 "Rendering 'C:\Users\OCD\AppData\Local\Temp\bootstrap-15078-1375894896.bat' chunk 6"
10.0.1.130 "Rendering 'C:\Users\OCD\AppData\Local\Temp\bootstrap-15078-1375894896.bat' chunk 7"
10.0.1.130 "Rendering 'C:\Users\OCD\AppData\Local\Temp\bootstrap-15078-1375894896.bat' chunk 8"
10.0.1.130 "Rendering 'C:\Users\OCD\AppData\Local\Temp\bootstrap-15078-1375894896.bat' chunk 9"
10.0.1.130
10.0.1.130 else was unexpected at this time.
10.0.1.130 C:\Users\OCD>mkdir C:\chef
10.0.1.130
10.0.1.130 C:\Users\OCD>(
10.0.1.130 echo.url = WScript.Arguments.Named("url")
10.0.1.130 echo.path = WScript.Arguments.Named("path")
10.0.1.130 echo.proxy = null
10.0.1.130 echo.Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
10.0.1.130 echo.Set wshShell = CreateObject( "WScript.Shell" )
10.0.1.130 echo.Set objUserVariables = wshShell.Environment("USER")
10.0.1.130 echo.
10.0.1.130 echo.
10.0.1.130 echo.End If
10.0.1.130 echo.
10.0.1.130 echo.On Error Goto 0
10.0.1.130 echo.
10.0.1.130 echo.objXMLHTTP.open "GET", url, false
10.0.1.130 echo.objXMLHTTP.send()
10.0.1.130 echo.If objXMLHTTP.Status = 200 Then
10.0.1.130 echo.Set objADOStream = CreateObject("ADODB.Stream")
10.0.1.130 echo.objADOStream.Open
10.0.1.130 echo.objADOStream.Type = 1
10.0.1.130 echo.objADOStream.Write objXMLHTTP.ResponseBody
10.0.1.130 echo.objADOStream.Position = 0
10.0.1.130 echo.Set objFSO = Createobject("Scripting.FileSystemObject")
10.0.1.130 echo.If objFSO.Fileexists(path) Then objFSO.DeleteFile path
10.0.1.130 echo.Set objFSO = Nothing
10.0.1.130 echo.objADOStream.SaveToFile path
10.0.1.130 echo.objADOStream.Close
10.0.1.130 echo.Set objADOStream = Nothing
10.0.1.130 echo.End if
10.0.1.130 echo.Set objXMLHTTP = Nothing
10.0.1.130 ) 1>C:\chef\wget.vbs
10.0.1.130
10.0.1.130 C:\Users\OCD>(
10.0.1.130 echo.param(
10.0.1.130 echo. [String] $remoteUrl,
10.0.1.130 echo. [String] $localPath
10.0.1.130 echo.)
10.0.1.130 echo.
10.0.1.130 echo.$webClient = new-object System.Net.WebClient;
10.0.1.130 echo.
10.0.1.130 echo.$webClient.DownloadFile($remoteUrl, $localPath);
10.0.1.130 ) 1>C:\chef\wget.ps1
10.0.1.130 C:\Users\OCD>) else (
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment