changing a users pst /ost file size remotely powershell

techdrive
techdrive used Ask the Experts™
on
Does anyone have a powershell script that will remotely change a users .ost file size in the registry remotely


HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\15.0\Outlook\PST

I want to change these two values MaxLargeFfileSize and WarnLargeFileSize to a certain value

I found this below but not sure how to setup this to work with the command below.


/$reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $computername )
        $regKey= $reg.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",$true)
        $regKey.SetValue("New_Valuename_String","New_Valuedata",[Microsoft.Win32.RegistryValueKind]::String)
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Active Directory/Exchange Engineer
Top Expert 2015
Commented:
Try launching regedit with you domain admin credentials.
start>run>regedit, shift+right-click (run as a different user)
Once regedit launches File>Connect Network Registry, put in the computername in question and navigate to the registry hive you want to edit

Author

Commented:
Thank you foxluv that did the trick.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial