SCR and Automated Cmdlets
Is there a way to automate cmdlets so that they launch from either command line or desktop icon? I'd liketo run acmdlet such as restore-storagegroupcopy with the click of a mouse if possible. Ted
September 18th, 2008 12:43am

Hello Ted, Create a file name Restore-SGC.ps1 in C:\Scripts of your Exchange 2007 server and add your code like below... Restore-SGC.ps1 Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin Restore-StorageGroupCopy Identity Now create a Restore-SGC.CMD file to execute your script Restore-SGC.CMDPowershell -command "& {C:\Scripts\Restore-SGC.ps1 }" Restore-SGC.CMD is your single click solution.
Free Windows Admin Tool Kit Click here and download it now
September 18th, 2008 3:21am

Thanks. Any way of getting the shell window to not exit so that I can see the results? Ted
September 18th, 2008 6:45am

Add pause command in CMD file so until you press any key it will pause the screen before exit. Restore-SGC.CMD Powershell -command "& {C:\Scripts\Restore-SGC.ps1 }" Pause
Free Windows Admin Tool Kit Click here and download it now
September 18th, 2008 6:50am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics