Quantcast
Channel: Exchange Server 2010 forum
Viewing all articles
Browse latest Browse all 19572

How to pass parameters to a ps1 script published by RBAC

$
0
0

Hi

I am developing a script for our service desk so that they can create a mailbox for a user on Exchange 2010. I want to use powershell for this to ensure that stuff like Policy, archive policy and audit gets set every time.

I got everything working except one part, setting audit log level and enable audit logging on the mailbox. 

Now I don't want to give our service desk the permission so that they can change og disable audit logging on a mailbox. I have before had great success with placing af script in the "Remotescript" folder on the Exchange server and publish the script with RBAC. That way I can control that they can execute a single vital command but without giving them the permissions to do other stuff.

Now to my problem. 

I would like to run CreateMailbox.ps1 from a tools server where Exchange management tools are installed, and the script is being executed from and Exchange Management Shell. I have made a "setAudit.ps1" script that is located on the Exchange servers and published via RBAC. So I would like to call the setAudit.ps1 from the CreateMailbox.ps1 with 2 parameters, and that I can't get to work. 

I cannot figure out how to pass the arguments to the script published by RBAC. 

I have looked around on the forums and tried the suggestions that listed but they all seem to handle it well as long as the PS1 files are more or less local on the machine.

Anyone got any suggestions ?


Viewing all articles
Browse latest Browse all 19572

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>