Not a mopar - 2002 Trailblazer question

Do NOT run the engine with the battery cable off, It can damage the PCM. The ignition switch will only cause a problem with no crank. You need to 1st check all the grounds on the engine if they are tight make sure they have a clean connection. take both battery cables off and clean, make sure they are tight on the battery. does the engine light turn on when it is running? if so what are the codes. when they replaced the crank sensor did the relearn to the PCM. was this a problem before work performed? Do you have any other warning light turning on when engine is running?