How to skip confirmation prompts
hi all,
i'm software developer , no nothing powershell sorry if is a dumb question.
i'm running exchange commandlet remote wipe device (the source below in batch file):
c:\windows\system32\windowspowershell\v1.0\powershell.exe -psconsolefile "c:\program files\microsoft\exchange server\bin\exshell.psc1" -command "clear-activesyncdevice -identity test@airwatchportals.com\airsync-pocketpc-b6be604c8373b93a96073e7d7f2f787a"
the command works except can't automate because prompts confirmation.
confirm
are sure want perform action? clearing mobile device "test@airwatchportals.com\airsync-pocketpc-b6be604c8373b93a96073e7d7f2f787a". data on device permanently deleted. [y] yes [a] yes [n] no [l] no [s] suspend [?] (default "y"):n
is there way of running exchange commandlets in silent or unatented mode?
in case you're wondering why need behavior:
our product manages mobile devices enterprises, can remote wipe windows mobile , blackberry devices because expose api this. iphones not, can remote wiped through exchanges. need way of remotely telling exchange "hey, wipe device".
we have several people researching ways of doing this. i'm researching exchange + powershell option.
thanks in advance help.
i'm software developer , no nothing powershell sorry if is a dumb question.
i'm running exchange commandlet remote wipe device (the source below in batch file):
c:\windows\system32\windowspowershell\v1.0\powershell.exe -psconsolefile "c:\program files\microsoft\exchange server\bin\exshell.psc1" -command "clear-activesyncdevice -identity test@airwatchportals.com\airsync-pocketpc-b6be604c8373b93a96073e7d7f2f787a"
the command works except can't automate because prompts confirmation.
confirm
are sure want perform action? clearing mobile device "test@airwatchportals.com\airsync-pocketpc-b6be604c8373b93a96073e7d7f2f787a". data on device permanently deleted. [y] yes [a] yes [n] no [l] no [s] suspend [?] (default "y"):n
is there way of running exchange commandlets in silent or unatented mode?
in case you're wondering why need behavior:
our product manages mobile devices enterprises, can remote wipe windows mobile , blackberry devices because expose api this. iphones not, can remote wiped through exchanges. need way of remotely telling exchange "hey, wipe device".
we have several people researching ways of doing this. i'm researching exchange + powershell option.
thanks in advance help.
most other powershell cmdlet's allow bypass using -confirm
Windows Server > Windows PowerShell
Comments
Post a Comment