-
See this help file: about_Try_Catch_Finally $one=1 $zero=0 try{ $one/$zero } catch [System.DivideByZeroException]{ #"The first Catch script block handles System.DivideByZeroException exceptions" "Attempted to divide by zero" } catch { "the second Catch script block handles any...
-
By Joel 'Jaykul' Bennett Note: WatiN requires Single Threaded Apartment mode, so you need to be using PowerShell 2.0 (currently in CTP3) in order for any of this to work, and you need to pass the -STA parameter to PowerShell. Regardless, I thought I’d throw two ... Read More
-
This is very good info, but I'm lost when it comes to dealing with COM object exceptions inside PowerShell. Some are rather simple, for example, I've registered a DLL (e.g. KiXtart.DLL which comes with KiXtart 4.60). I can invoke the interface as an object in VBScript and JScript fine. It works...
-
Widows 2008 R2 comes with powershell v2 by default. and added with 76 new Ad cmdlets and Ad provders New-ADOrganizationalUnit -Name "OUname" -ProtectedFromAccidentalDeletion $true This command creates new OU under the root. If we wanted created OU in specific path then we have to provide the...
-
#********************************************************************************************* #** This script will read information from a SQL database with the Windows server names #** It will take that list and pass it to a WMI call to get the drive type information #** You need the SQLCommand Script...
-
By Doug Finke I find the PDC09 site a bit frustrating to navigate the sessions I want to attend. So I whipped up this 25 line PowerShell/WPK GUI. Type in the search box to find matching session titles. Click on a title and the browser navigates to ... Read More
-
Hey all - I am trying to get Remote PowerShell working so that I can connect to systems in a test domain from my prod domain, and I am getting an error related to the IP address issue. I have read about this a fair amount but I don't see a great solution or a good explanation of the issue with the...
Posted to
Remoting
(Forum)
by
virtuallynothere
on
04-03-2012
Filed under: Remoting, PowerShell, PowerShell v2, Remoting Options, PSSession Cmdlets, WS-Management, Workgroups, Remoting without Admin Permissions, powerShell v1, firewall exception, Enable-PSRemoting, remoting Options p
-
The MAX_PATH for Windows is 260 characters, really 259 because the <NULL> character at the end. At my company there are some users who have files and directories that they cannot open because the file path is too long. In order to find and suggest how to fix the problem for them I thought "Oh...
-
I am running powershell in windows 8. Powershell came installed on the machine. I installed the Exchange Management tools on my machine. I have my powershell profile configured to load "add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010". If I do a get-help test-* I can see the list...
-
I'm trying to work out how to specify the Catch values for PowerShell V2 CTP3's Try/Catch stuff. Here's a simple divide by zero error that I'm trying to catch: <# .SYNOPSIS Demonstrates try/catch/finally in V2 .DESCRIPTION Shows a simple example of the try/catch/finally syntax introduced...