Bianchi type II massive string cosmological models with magnetic field and time dependent gauge function (<svg style="vertical-align:-4.15506pt;width:13.6px;" id="M1" height="17.049999" version="1.1" viewBox="0 0 13.6 17.049999" width="13.6" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"> <g transform="matrix(.017,-0,0,-.017,.062,11.813)"><path id="x1D719" d="M542 242q0 -106 -80 -176.5t-192 -72.5l-55 -251l-6 -3q-18 7 -28 38t1 91l23 124q-85 16 -133.5 72.5t-48.5 137.5q0 95 62.5 159.5t166.5 97.5l14 -31q-77 -32 -115 -82.5t-38 -128.5q0 -63 31.5 -107t74.5 -59l125 597l56 43l16 -10l-40 -168q-9 -40 3 -45
q77 -33 120 -85.5t43 -140.5zM469 232q0 67 -37 115t-77 62l-76 -370q89 -4 139.5 52.5t50.5 140.5z" /></g> <g transform="matrix(.012,-0,0,-.012,9.663,16.838)"><path id="x1D456" d="M244 607q0 -25 -15.5 -43t-37.5 -18q-19 0 -32 13t-13 35q0 21 15 41t39 20q20 0 32 -14t12 -34zM222 91q-29 -33 -79 -68t-75 -35q-13 0 -19 7.5t-6 31t10 65.5l62 253q5 26 -1 26q-21 0 -72 -43l-13 24q43 40 91 68t71 28q30 0 10 -78l-71 -274q-8 -30 3 -30
q16 0 76 48z" /></g> </svg>) in the frame work of Lyra's geometry are investigated. The magnetic field is in <svg style="vertical-align:-0.0pt;width:23.924999px;" id="M2" height="11.6" version="1.1" viewBox="0 0 23.924999 11.6" width="23.924999" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"> <g transform="matrix(.017,-0,0,-.017,.062,11.537)"><path id="x1D44C" d="M667 650l-9 -28q-53 -5 -76 -17t-64 -59q-51 -61 -175 -225q-21 -29 -27 -55l-27 -136q-13 -65 -0.5 -80t83.5 -22l-7 -28h-280l8 28q64 4 81 19t30 83l25 128q6 35 -7 65l-98 231q-17 41 -32.5 52t-68.5 16l8 28h252l-6 -28l-40 -4q-27 -3 -33 -12.5t2 -31.5
q8 -26 43 -107.5t61 -134.5q114 145 174 240q14 24 8 33t-37 13l-34 4l8 28h238z" /></g><g transform="matrix(.017,-0,0,-.017,11.605,11.537)"><path id="x1D44D" d="M698 636l-541 -596q60 -5 176 -5q91 0 138.5 5t69.5 24q44 36 85 124l29 -15q-38 -125 -64 -173h-559l-9 16l545 598h-182q-81 0 -109 -8t-48 -31q-26 -29 -55 -103l-29 3q23 86 42 200h22q11 -16 21 -20.5t34 -4.5h428z" /></g> </svg>-plane. To get the deterministic solution, we have assumed that the shear (<svg style="vertical-align:-0.1638pt;width:9.7250004px;" id="M3" height="8.3000002" version="1.1" viewBox="0 0 9.7250004 8.3000002" width="9.7250004" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"> <g transform="matrix(.017,-0,0,-.017,.062,8.038)"><path id="x1D70E" d="M548 455q-32 -77 -74 -77q-37 0 -103 10l-3 -2q36 -30 48.5 -62t12.5 -80q0 -103 -75 -179.5t-175 -76.5q-70 0 -113 45t-43 128q0 115 83.5 200.5t209.5 85.5q31 0 77.5 -4t67.5 -4q36 0 62 30zM350 274q0 54 -17 86q-19 35 -57 35q-50 0 -90 -37.5t-59 -91.5t-19 -109
q0 -61 24.5 -96.5t65.5 -35.5q51 0 87.5 46.5t50.5 100.5t14 102z" /></g> </svg>) is proportional to the expansion (<svg style="vertical-align:-0.1638pt;width:8.5874996px;" id="M4" height="12.4375" version="1.1" viewBox="0 0 8.5874996 12.4375" width="8.5874996" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"> <g transform="matrix(.017,-0,0,-.017,.062,12.162)"><path id="x1D703" d="M475 507q0 -83 -20 -172t-56 -167.5t-93.5 -129t-125.5 -50.5q-157 0 -157 227q0 78 21.5 164t59 161t96.5 123.5t126 48.5q79 0 114 -58t35 -147zM391 522q0 155 -81 155q-62 0 -111 -82.5t-73 -200.5h253q12 81 12 128zM373 346h-255q-12 -91 -12 -150q0 -72 20 -123
t63 -51q34 0 64 28.5t52.5 77t39 103t28.5 115.5z" /></g> </svg>). This leads to <svg style="vertical-align:-0.23206pt;width:45.25px;" id="M5" height="13.9" version="1.1" viewBox="0 0 45.25 13.9" width="45.25" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"> <g transform="matrix(.017,-0,0,-.017,.062,13.55)"><path id="x1D445" d="M627 18l-10 -26q-79 6 -116 27t-69 76q-41 71 -71 138q-13 29 -27.5 39t-42.5 10h-46l-27 -145q-13 -74 -2.5 -88.5t78.5 -20.5l-6 -28h-271l5 28q66 6 82.5 21.5t30.5 87.5l71 387q12 66 2 78.5t-77 19.5l8 28h233q102 0 147 -29q65 -43 65 -129q0 -69 -45.5 -117
t-115.5 -72q40 -86 66 -133q39 -68 65 -101q28 -37 73 -51zM491 483q0 67 -33.5 101t-91.5 34q-35 0 -51 -10q-13 -8 -20 -48l-45 -245h49q71 0 113 28q79 52 79 140z" /></g><g transform="matrix(.017,-0,0,-.017,15.718,13.55)"><path id="x3D" d="M535 323h-483v50h483v-50zM535 138h-483v50h483v-50z" /></g><g transform="matrix(.017,-0,0,-.017,30.422,13.55)"><path id="x1D446" d="M457 488l-30 -3q-17 148 -131 148q-53 0 -84.5 -34.5t-31.5 -82.5q0 -42 25.5 -72t74.5 -62l33 -22q63 -42 95 -85t32 -102q0 -84 -67 -137t-163 -53q-58 0 -113 22t-70 43l-4 152l27 4q4 -32 15 -62.5t31 -59.5t53.5 -47t76.5 -18q56 0 92 35t36 96q0 39 -25 70t-78 68
l-31 22q-32 23 -53.5 41.5t-45 57t-23.5 77.5q0 82 58 132.5t156 50.5q46 0 101 -17l18.5 -6t17 -6t8.5 -3q-4 -55 0 -147z" /></g> <g transform="matrix(.012,-0,0,-.012,38.588,5.388)"><path id="x1D45B" d="M495 86q-46 -47 -87 -72.5t-63 -25.5q-43 0 -16 107l49 210q7 34 8 50.5t-3 21t-13 4.5q-35 0 -109.5 -72.5t-115.5 -140.5q-21 -75 -38 -159q-50 -10 -76 -21l-6 8l84 340q8 35 -4 35q-17 0 -67 -46l-15 26q44 44 85.5 70.5t64.5 26.5q35 0 10 -103l-24 -98h2
q42 56 97 103.5t96 71.5q46 26 74 26q9 0 16 -2.5t14 -11.5t9.5 -24.5t-1 -44t-13.5 -68.5q-30 -117 -47 -200q-4 -19 -3.5 -25t6.5 -6q21 0 70 48z" /></g> </svg>, where <svg style="vertical-align:-0.1092pt;width:11.075px;" id="M6" height="11.3125" version="1.1" viewBox="0 0 11.075 11.3125" width="11.075" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"> <g transform="matrix(.017,-0,0,-.017,.062,11.113)"><use xlink:href="#x1D445"/></g> </svg> and <svg style="vertical-align:-0.23206pt;width:8.2875004px;" id="M7" height="11.75" version="1.1" viewBox="0 0 8.2875004 11.75" width="8.2875004" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"> <g transform="matrix(.017,-0,0,-.017,.062,11.4)"><use xlink:href="#x1D446"/></g> </svg> are metric potentials and <svg style="vertical-align:-0.1638pt;width:8.6625004px;" id="M8" height="7.9499998" version="1.1" viewBox="0 0 8.6625004 7.9499998" width="8.6625004" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"> <g transform="matrix(.017,-0,0,-.017,.062,7.675)"><use xlink:href="#x1D45B"/></g> </svg> is a constant. We find that the models start with a big bang at initial singularity and expansion decreases due to lapse of time. The anisotropy is maintained throughout but the model isotropizes when <svg style="vertical-align:-0.1638pt;width:36.237499px;" id="M9" height="11.125" version="1.1" viewBox="0 0 36.237499 11.125" width="36.237499" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"> <g transform="matrix(.017,-0,0,-.017,.062,10.862)"><use xlink:href="#x1D45B"/></g><g transform="matrix(.017,-0,0,-.017,13.305,10.862)"><use xlink:href="#x3D"/></g><g transform="matrix(.017,-0,0,-.017,28.008,10.862)"><path id="x31" d="M384 0h-275v27q67 5 81.5 18.5t14.5 68.5v385q0 38 -7.5 47.5t-40.5 10.5l-48 2v24q85 15 178 52v-521q0 -55 14.5 -68.5t82.5 -18.5v-27z" /></g> </svg>. The physical and geometrical aspects of the model in the presence and absence of magnetic field are also discussed.