I'm trying to save a workbook to a new location with a password and keep the filename the same. The filname gets updated weekly with a date appended to it, so it's never the same. There are two things I'm having trouble with:

1. Using the SaveAs method to save the file with the same name in a different path &
2. I can't add a password because the workbook is shared.

I'm scripting this out in PowerShell, and if possible, I'd like to unshare the workbook in the script. Unfortunately, I can't seem to find a method that accomplishes this. Here is what I have so far... I really appreciate any advice.

```
$xls = new-object -com excel.application 
$xls.Visible = $False
$xlsWB = $xls.Workbooks.Open("path\*.xlsx")
$xlsWB.Password = "Password"                                        
$xlsWB.SaveAs("differentPath\*.xlsx")
$xls.Quit()
[System.Runtime.Interopservices.Marshal]::ReleaseComObject($xls)
[System.Runtime.Interopservices.Marshal]::ReleaseComObject($xlsWB)

```