2

I would like to script the uninstallation and reinstallation of Profiles on a group of Networked Macs. In order to do this I shall use the UNIX Command part of Remote Desktop.

When sending the

profiles -D

Command, it responds with

Are you sure you want to delete all configuration profiles? [y/n]:

but I have no way of pressing the Y key.

Any ideas?

3
  • Guesswork, hence comment not answer, but what other parameters other than -D can you send? Is there a -Y for example?
    – stuffe
    Commented May 7, 2014 at 22:34
  • Yeah I tried that, but it seems -f does the trick!
    – Josh
    Commented May 8, 2014 at 6:17
  • You can pipe yes to the command as well... => $ yes | profiles -D Commented Jan 21, 2017 at 20:16

1 Answer 1

2

Checking the profiles man page, the -f flag will:

Automatically confirm any questions, or when used with -s, will retry startup profiles at each startup until successfully installed.

So, my guess is profiles -Df is what you're looking for.

1
  • Can't believe I didn't see that myself! Thanks
    – Josh
    Commented May 8, 2014 at 6:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .