How to replace process full with process data + process recalc (On powershell)

Viewed 16

This code works but it is taking too much memory, how can i replace it by processing the data and doing the recalc afterwards?

try{
    $secpasswd = ConvertTo-SecureString "X" -AsPlainText -Force;
    $mycreds = New-Object System.Management.Automation.PSCredential ("X", $secpasswd);
    Invoke-ProcessASDatabase -Server "X" -DatabaseName "#" -RefreshType "Full" -Credential $mycreds -ErrorAction Stop;
    
    exit 1
}
catch{      
        exit 0
}
0 Answers
Related