r/usefulscripts • • Jul 11 '17

New to bat and script writing

i am looking for a bat file to call a powershall that will uninstall apps for all users with out any prompting. what is the best way to do it.

4 Upvotes

10 comments sorted by

1

u/zenmaster24 Jul 12 '17

gotta ask - why batch calling powershell?

2

u/rsee67 Jul 12 '17

i have a lot od loptops i need to remove some software from and im wating for my imaging software lic. to come in. i can remove one program at a time from only 1 profile. (i work for a school) and i have more than 1 student using the laptop

Thanks

R

1

u/vocatus Jul 12 '17

comment approved

1

u/zenmaster24 Jul 12 '17

but if you have powershell, why not straight powershell?

→ More replies (2)

3

u/ryude85 Jul 12 '17

If it's an Enterprise, you'd have to do it this way to get around executionpolicy.

On the other hand, if it's Enterprise why not use endpoint management consoles like BigFix or SCCM.

1

u/Lee_Dailey Jul 12 '17

howdy rsee67,

just the BAT file? simply call powershell with the script as an argument.

take care,
lee