Hogy tudok egy külső fileban tárolt, Exchange 2007-es PS scriptet futtatni? (Export-Mailbox) Illetve a script futását valahogy tudom logolni egy fileba?
A ps1 file elejére írd be ezt: Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin
Ez hozzáadja az Exchange Snap int, és érteni fogja az Exchange CmdLet-eket.
A kész fájlt így tudod futtatni mondjuk egy sima parancssorból, vagy időzítheted is: Powershell -command "& {c:\scripts\script.ps1 }"
Logolásra ebben az esetben sztem a legjobb a >> c:\scripts\script_log.txt módszer. A ps1-et úgy kell megírni, hogy értelmes eredményeket jelenítsen meg (pl statusmessage).
Üdv, G
Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.