Direct Booking script errors

Hi Ed, 

#get our input parameters from the command line
Param(
    [ValidateNOtNullOrEmpty()]
    [array] $Identity,
    [ValidateNOtNullOrEmpty()]
    [string] $InputFile,
    [ValidateNOtNullOrEmpty()]
    [string] $EWSURL,
    [switch] $RemoveDirectBooking,
    [switch]$UseDefaultCredentials
    )

This is above lines and not able to do anything as am not a scripting guy. i just downaloeded this script and make it as working

what went wrong , am still getting the error

July 28th, 2015 4:08am

Hello Team

i have dowloaded the below scripts to disable the direct booking in all the mailbox in our organization , unfortunately i got the below error

https://gallery.technet.microsoft.com/scriptcenter/Remove-DirectBookingps1-4c54ec74

Errors:

[PS] D:\Ramki>D:\Ramki\Remove-DirectBooking.ps1
Parameter declarations are a comma-separated list of variable names with option
al initializer expressions.
At D:\Ramki\Remove-DirectBooking.ps1:3 char:31
+     [ValidateNOtNullOrEmpty()] <<<<

Not able to use the switches as given in the below link

http://blogs.technet.com/b/exchange/archive/2013/05/09/use-exchange-web-services-and-powershell-to-discover-and-remove-direct-booking-settings.aspx

Could you please any one help on this

Free Windows Admin Tool Kit Click here and download it now
July 28th, 2015 5:52am

Look at the script.  The error occurs in line 3.
July 28th, 2015 6:19am

Hi,

Please run Get-Host in EMS to check PowerShell verison. If it's 1.0, please install PowerShell V2 for testing.

Because the parameter declaration in the function is a PowerShell V2 advanced function parameter declaration. For your reference: https://support.microsoft.com/en-us/kb/968929

Thanks

Free Windows Admin Tool Kit Click here and download it now
July 29th, 2015 3:20am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics