Link to home
Start Free TrialLog in
Avatar of Anthony K O365
Anthony K O365Flag for United States of America

asked on

Trouble running Powershell Script

This is a SharePoint PS running in Windows PowerShell ISE. I get the followng error message:

Test-Path : Cannot bind argument to parameter 'Path' because it is an empty string.
At C:\Users\katadmin\Desktop\O 365 items\Remove-OneDriveForBusinessFolder.ps1:143 char:19
+         If (!(Test-Path $LogFile))
+                         ~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Test-Path], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands
   .TestPathCommand

I'm wanting to run the attached PS Script to remove certain folders in Office 365 OneDrive for Business. Any thoughts?
Remove-OneDriveForBusinessFolder.txt
ASKER CERTIFIED SOLUTION
Avatar of Vasil Michev (MVP)
Vasil Michev (MVP)
Flag of Bulgaria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Anthony K O365

ASKER

For some reason it's not asking for the -logfile parameter nor the path where the csv file is located.
Actually, after inserting the name of logfile I got pass that error. Thanks. However, it's not asking for the location of the csv file, but it's navigating throughout the entire Tenant.
Once again, I apologize. I have also supply the Input file. Thanks!!
thanks!!