Quantcast
Channel: PowerShell General
Viewing all articles
Browse latest Browse all 10624

run a command with anther user credential

$
0
0

Hi,

 

I wrote a PS script that ruining a command that deal with user email.

I have the admin privilege for running this command.

By default the mailbox user owner and the exchange admin have privilege to delete emails from the mailbox.(exchange 2007)

This script will be use by Help-Desk users that don't have exchange admin privilege, I need a way that when they run the command they can put the user credential (I used get-Credential command) and the specific command (Export-Mailbox) will run with the mailbox owner credential that the Help-Desk user input before.

The "get-Credential " part is working well.

I need help with the second part - ruining the specific command with user credential.

Thanks'

Lior 

 


Viewing all articles
Browse latest Browse all 10624

Trending Articles