gimp -i -b '(batch-crop-to-content "D:\Test\*.png") is a shell/terminal command that calls Gimp, not a script-fu instruction. You cannot use it in the script-fu console.
Gimp batch is executed by calling Gimp from a terminal (gimp -i -b, and giving it a script-fu/python-fu script to execute ('(batch-crop-to-content "D:\Test\*.png")').
To make things even more confusing the syntax of shell commands (in particular, relative to single quotes and double quotes) is different between Windows and Unix (Linux and OSX) so make sure you follow examples for the proper OS.
Gimp batch is executed by calling Gimp from a terminal (gimp -i -b, and giving it a script-fu/python-fu script to execute ('(batch-crop-to-content "D:\Test\*.png")').
To make things even more confusing the syntax of shell commands (in particular, relative to single quotes and double quotes) is different between Windows and Unix (Linux and OSX) so make sure you follow examples for the proper OS.