Issue
When running the Management Console in PowerShell, the script throws the following errors:
The term 'try' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.At C:\Program Files\Scorpion Software\AuthAnvil\AuthAnvilTools\AuthAnvilManagementConsole.ps1
The term 'catch' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.At C:\Program Files\Scorpion Software\AuthAnvil\AuthAnvilTools\AuthAnvilManagementConsole.ps1
Cause
The machine running the script only has PowerShell 1.0 installed, but the Management Console requires PowerShell 2.0.
You can verify which version you have in 2 ways:
1) Run the command, $Host.version and it will display the PowerShell version as the Major build number:
PowerShell 1.0:
Major Minor Build Revision
----- ----- ----- --------
1 0 0 0
PowerShell 2.0:
Major Minor Build Revision
----- ----- ----- --------
2 0 -1 -1
2) Check the copyright date when you open the PowerShell window.
Copyright (C) 2006 = PowerShell 1.0
Copyright (C) 2009 = PowerShell 2.0
Resolution
Install PowerShell 2.0 and run the Management Console again. You can download PowerShell 2.0 in the Windows Management Framework Core: http://support.microsoft.com/kb/968929 (download links are halfway down the page)
Note: In Server 2008, you will be required to run a system restart after installing PowerShell 2.0.
For more information about running PowerShell scripts, see this TechNet article: http://technet.microsoft.com/en-us/library/ee176949.aspx#EFAA
Affects
AuthAnvil Two Factor Auth v4.0 and later.
Questions?
If you have any questions or need some help, we would be happy to assist. Open a case at help.scorpionsoft.com or send an email to support@scorpionsoft.com.