Browse Forum Posts by Tags

Showing related tags and posts for the Forums application. See all tags in the site
  • Re: Trouble with Try/Catch

    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...
    Posted to Using Scripts (Forum) by Shay Levy on 12-30-2008
    Filed under: PowerShell V2, error handling, try/catch
  • Using PowerShell and WatiN (PowerWatin?)

    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
    Posted to PowerShell v2 (Forum) by ps2 on 03-09-2009
    Filed under: PowerShell v2, STA, WatiN
  • Re: Trouble with Try/Catch

    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...
    Posted to Using Scripts (Forum) by skatterbrainz on 05-07-2009
    Filed under: PowerShell V2, error handling, try/catch, kixtart
  • Windows 2008 R2 Powershell

    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...
    Posted to Windows Server 2008 R2 (Forum) by Krishna on 10-29-2009
    Filed under: Active Directory, powershell v2, OU, new-adorginizationunit, windows 2008, r2, powershell
  • Can someone help me wrap error checking around this script?

    #********************************************************************************************* #** 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...
    Posted to Using Scripts (Forum) by adrian on 11-05-2009
    Filed under: WMI, PowerShell V2
  • 25 lines of PowerShell to Navigate PDC09 Sessions

    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
    Posted to PowerShell v2 (Forum) by ps2 on 11-19-2009
    Filed under: PowerShell v2
  • Remote powershell from 1 domain to another - no trust or dns, must use IP

    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 JakeS 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
  • Long File Paths

    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...
    Posted to PowerShell for Windows (Forum) by dvsfoo on 06-04-2012
    Filed under: PowerShell v2
  • Need help using Exchange commands on Windows powershell in windows 8?

    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...
    Posted to PowerShell for Windows (Forum) by jwhite on 10-17-2012
    Filed under: windows, powerwershell, PowerShell v2
  • Trouble with Try/Catch

    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...
    Posted to PowerShell General (Forum) by Thomas Lee on 12-29-2008
    Filed under: PowerShell V2, error handling, try/catch
Page 1 of 3 (28 items) 1 2 3 Next >
Copyright 2012 All rights reserved.