Using parallel to invoke commands via schroot

Expanding on the discussion here, why does starting commands via parallel into an schroot cause all the problems described?
I can for example, stagger start a number of commands through schroot as long as they don't start at the same time with no problem.
Example (each has been started one-at-a-time:
% schroot -p -- nice -19 makepkg -s
% schroot -p -- htop
schroot -p -- mprime

The solution is not to use schroot at all but to simply call chroot directly via parallel which works fine.
Example worker code for parallel.  See the complete build script for more.
% sudo linux32 chroot --userspec=1000:100 /opt/arch32 /bin/bash -c 'cd $here ; nice -19 makepkg -scd --skipinteg --config $HOME/bin/repo/makepkg.i686'

Similar Messages

  • Invoke-Command and $using:ACL problem

    Hi,
    Can anyone point me in the right direction.
    I want to modify and ACL on a remote server, but i cannot assign a variable inside the invoke-command where i'm also refferencing an local variable.
    When the first invoke-command is ran i get an error:
    A Using variable cannot be retrieved. A Using variable can be used only with Invoke-Command, Start-Job, or InlineScript
    in the script workflow. When it is used with Invoke-Command, the Using variable is valid only
    if the script block is invoked on a remote computer.
    $DriveFunctionDirectoryStructure="z:\projects\1"
    Invoke-Command
    -Session$s-ScriptBlock{$acl=get-acl$using:DriveFunctionDirectoryStructure}
    Invoke-Command
    -Session$s-ScriptBlock{$acl.SetAccessRuleProtection($using:True,$using:ToggleAccessRuleFlag)}
    Invoke-Command
    -Session$s-ScriptBlock{Start-Sleep-Seconds5}
    Invoke-Command
    -Session$s-ScriptBlock{$rule=New-ObjectSystem.Security.AccessControl.FileSystemAccessRule("localdomain\$using:groupName","$using:AccessOption","ContainerInherit,
    ObjectInherit","None","Allow")}
    Invoke-Command
    -Session$s-ScriptBlock{$acl.AddAccessRule($rule)}
    Invoke-Command
    -Session$s-ScriptBlock{Set-Acl$using:DriveFunctionDirectoryStructure$acl}

    Hi RFalken,
    you can use the -ArgumentList parameter of Invoke-Command like this:
    $script = {
    Param (
    $Parameter1,
    $Parameter2
    Invoke-Command -ScriptBlock $script -ArgumentList @(2,42)
    Cheers,
    Fred
    There's no place like 127.0.0.1

  • Invoke-Command and ShellId Issues

    Hi all,
    I'm struggling to figure out what is going on here.
    I'm trying to add a domain user to a VM's local administrators group via this:
    $localAdminBlock = `
    $objUser = [ADSI]("WinNT://domain/domainaccount")
    $objGroup = [ADSI]("WinNT://$vm/Administrators")
    $objGroup.PSBase.Invoke("Add",$objUser.PSBase.Path)
    Invoke-Command -ComputerName $vm -Scriptblock $localAdminBlock -Credential $adminCreds
    I receive an error:
    "Processing data from remote server TestServer failed with the following error message: The request for the Windows Remote Shell with ShellId <id here> failed because the shell was not found on the server.  Possible causes are: the specified
    ShellId is incorrect or the shell no longer exists on the server.  Provide the correct ShellId or create a new shell and retry the operation..."
    Any idea what's going on?
    Thanks.

    You need to use $using:vm instead of $vm since you are passing a value from a local variable into the scriptblock which
    is executed remotely. If you don't do this then the $vm will be $null in the remote session. If you use $using:vm then Invoke-Command will evaluate the local $vm variable and use this value in the remote session.
    $localAdminBlock = `
    $objUser = [ADSI]("WinNT://domain/domainaccount")
    $objGroup = [ADSI]("WinNT://$using:vm/Administrators")
    $objGroup.PSBase.Invoke("Add",$objUser.PSBase.Path)
    Invoke-Command -ComputerName $vm -Scriptblock $localAdminBlock -Credential $adminCreds
    --Neptune
    That was the issue, thanks a lot!

  • Installing SQL Server 2012 remotely via Powershell using Invoke-Command

    I am trying to perform a SQL Server 2012 command line installation using Powershell Invoke-Command on Windows 2012 Datacenter.
    The code I am using is as follows:
     $ret = Invoke-Command -ComputerName $COMPUTER -ArgumentList $MEDIA,$ACTION,$FEATURES,$INSTALLDIR,$INSTANCEID,$INSTANCENAME,$SQLDATADRIVE,$SQLLOGDRIVE,$DOMAIN,$SQLSERVERSERVICEUSER,$SQLSERVICEPASSWORD,$PRODUCTKEY,$SQLSERVERSA,$username,$ADMINPASSWD
    -Credential $cred -ScriptBlock {
      param($MEDIA,
         $ACTION,
         $FEATURES,
         $INSTALLDIR,
         $INSTANCEID,
         $INSTANCENAME,
         $SQLDATADRIVE,
         $SQLLOGDRIVE,
         $DOMAIN,
         $SQLSERVERSERVICEUSER,
         $SQLSERVICEPASSWORD,
         $PRODUCTKEY,
         $SQLSERVERSA,
         $USERNAME,
         $PASSWD)
      Set-Location $MEDIA
      Import-Module ServerManager
      if (-not [IO.Directory]::Exists($MEDIA)){
       $hn = hostname
       return 0,"Failed to find SQL Server Installer at $MEDIA on $hn"
      $tran = ""
      Try{
       & $MEDIA\setup.exe /ACTION=$ACTION /Q /FEATURES=$FEATURES /IACCEPTSQLSERVERLICENSETERMS /UPDATEENABLED=False /INSTALLSHAREDDIR="$INSTALLDIR\Program Files\Microsoft SQL Server" /INSTALLSHAREDWOWDIR="$INSTALLDIR\Program Files
    (x86)\Microsoft SQL Server" /RSINSTALLMODE="FilesOnlyMode" /INSTANCEID="$INSTANCEID" /INSTANCENAME="$INSTANCENAME" /INSTANCEDIR="$INSTALLDIR\Program Files\Microsoft SQL Server" /ENU="True" /AGTSVCSTARTUPTYPE="Automatic"
    /SQLSVCSTARTUPTYPE="Automatic" /NPENABLED=1 /TCPENABLED=1 /RSSVCStartupType="Automatic" /ERRORREPORTING=0 /SQMREPORTING=0 /INDICATEPROGRESS /INSTALLSQLDATADIR="$SQLDATADRIVE\DATA" /SQLUSERDBDIR="$SQLDATADRIVE\DATA" /SQLUSERDBLOGDIR="$SQLLOGDRIVE\LOG"
    /ASDATADIR="$SQLDATADRIVE\OLAP\DATA" /ASLOGDIR="$SQLLOGDRIVE\OLAP\Log" \ASBACKUPDIR="$SQLDATADRIVE\OLAP\Backup" \ASTEMPDIR="$SQLDATADRIVE\OLAP\Temp" /ASCONFIGDIR="$SQLDATADRIVE\OLAP\Config" /ASCOLLATION="Latin1_General_CI_AS"
    /SQLCOLLATION="SQL_Latin1_General_CP1_CS_AS" /SQLSVCACCOUNT="$DOMAIN\$SQLSERVERSERVICEUSER" /SQLSVCPASSWORD="$SQLSERVICEPASSWORD" /AGTSVCACCOUNT="$DOMAIN\$SQLSERVERSERVICEUSER" /AGTSVCPASSWORD="$SQLSERVICEPASSWORD"
    /ASSVCACCOUNT="$DOMAIN\$SQLSERVERSERVICEUSER" /ASSVCPASSWORD="$SQLSERVICEPASSWORD" /RSSVCACCOUNT="$DOMAIN\$SQLSERVERSERVICEUSER" /RSSVCPASSWORD="$SQLSERVICEPASSWORD" /FTSVCACCOUNT="NT AUTHORITY\LOCAL SERVICE"
    /INDICATEPROGRESS > $out
      } Catch [System.Exception] {
       return 0,$_.Exception.ToString()
      if ($tran -ne ""){
       $out += $tran
      return 1,$out
    The media resides on the server that I am remoting to in powershell and the server is on the same domain. The credentials I pass are for a Domain Admin, but SQL Server fails to validate the credentials for the passed parameter for the sql service user with
    a Access Denied.
    If I run the same command with the same user directly on the server it works fine.
    My guess is that the elavated privs for Administrator are not being set when using Invoke-Command? Is there a way to utilize powershell to install SQL Server 2012 with command line option using the invoke-command and passing credentials? Or is this a limitation
    to the SQL Server installer. If there is can a example be provided?

    Ok, so with the help of some friends, we found a fix that works!
    Prior to running the Invoke-Command I now run:
    # enable CredSSP on a client computer; this command allows the client credentials to be delegated to the server01 computer.:
    Enable-WsManCredSSP -Role Client -DelefateComputer server.some.domain.com
    Then I add the -Authentication option to my Invoke-Command with option Credssp.
    The install the works fine. Hope this helpes all.

  • Are there any memory restrictions when using Invoke-Command?

    Hi, I'm using the Invoke-PSCommandSample workbook to run a batch file inside a VM.
    The batch file inside the VM runs a Java program.
    The batch file works fine, when I run it manually in the VM.
    However, when I use the Invoke-PSCommandSample workbook to run the batch file, I get the following error:
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    errorlevel=1
    Press any key to continue . . .
    Does anybody know if there are any memory restrictions when invoking commands inside a VM via runbook?
    Thanks in advance.

    Hi Joe, I'll give some more background information. I'm doing load testing with JMeter in Azure and I want to automate the task. This is my runbook:
    workflow Invoke-JMeter {
    $Cmd = "& 'C:\Program Files (x86)\apache-jmeter-2.11\bin\jmeter-runbook.bat'"
    $Cred = Get-AutomationPSCredential -Name "[email protected]"
    Invoke-PSCommandSample -AzureSubscriptionName "mysubscription" -ServiceName "myservice" -VMName "mymachine" -VMCredentialName "myuser" -PSCommand $Cmd -AzureOrgIdCredential $Cred
    This is my batch file inside the VM:
    set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_71
    set PATH=%JAVA_HOME%\bin;%PATH%
    %COMSPEC% /c "%~dp0jmeter.bat" -n -t build-web-test-plan.jmx -l build-web-test-plan.jtl -j build-web-test-plan.log
    Initially I tried to run JMeter with "-Xms2048m -Xmx2048m". As that didn't work, I lowered the memory allocation but even with "-Xms128m -Xmx128m" it does not work. I have tried with local PowerShell ISE as you suggested, but I'm
    running into certification issues. I'm currently have a look at this. Here's my local script:
    Add-AzureAccount
    Select-AzureSubscription -SubscriptionName "mysubscription"
    $Uri = Get-AzureWinRMUri -ServiceName "myservice" -Name "mymachine"
    $Credential = Get-Credential
    $Cmd = "& 'C:\Program Files (x86)\apache-jmeter-2.11\bin\jmeter-runbook.bat'"
    Invoke-command -ConnectionUri $Uri -credential $Credential -ScriptBlock {
    Invoke-Expression $Args[0]
    } -Args $Cmd
    With this, I get the following error (sorry, it is in German):
    [myservice.cloudapp.net] Beim Verbinden mit dem Remoteserver "myservice.cloudapp.net" ist folgender Fehler
    aufgetreten: Das Serverzertifikat auf dem Zielcomputer (myservice.cloudapp.net:666) enthält die folgenden
    Fehler:
    Das SSL-Zertifikat ist von einer unbekannten Zertifizierungsstelle signiert. Weitere Informationen finden Sie im
    Hilfethema "about_Remote_Troubleshooting".
        + CategoryInfo          : OpenError: (myservice.cloudapp.net:String) [], PSRemotingTransportException
        + FullyQualifiedErrorId : 12175,PSSessionStateBroken

  • Using invoke-command to run 'vssadmin list writers' on several servers, how do I sort the results from each server?

    Hi I am a PS virgin so be gentle with me. I am trying to run the vssadmin list writers command on 8 servers.
    invoke-command -computername srv-bx-hvc1, srv-bx-hvc2, srv-bx-hvc3, srv-bx-hvc4,
    srv-bx-hvc5,
    srv-bx-hvc6,
    srv-bx-hvc7, srv-bx-hvc8
    -command {vssadmin list writers}
    The command works but I cannot tell which response is from what server.
    The objective whould be to eventually have the command so I know which server has  failed vss writers if possible restart them automatically.
    Any thoughts on how to achieve this lofty ideal??
    Thanks

    This is a tweak to the example that JRV listed.  I am using this code to just pull the information about the Exchange Writers but you could adapt it for others.
    $servers='sdcexmail001','sdcexmail002','sdcexmail003','sdcexmail004','sdcexmail005'
    $servers | %{
    $sb={
    $writers=vssadmin list writers
    New-Object PSObject -Property @{Server=$_;Writers=$writers}
    $ServerName = $_
    $out = invoke-command -computername $_ -scriptblock $sb -Argumentlist $_
    $WritersData = $Out.Writers
    for ($I = 0;$I -le $WritersData.Count -1;$I++)
    $Data = $WritersData[$I]
    If($Data.StartsWith('Writer name:'))
    $WriterName = ($Data.Split(':')[1]).Trim()
    $WriterID = ($WritersData[$I+1].Split(':')[1]).Trim()
    $WriterInstID = ($WritersData[$I+2].Split(':')[1]).Trim()
    $State = ($WritersData[$I+3].Split(':')[1]).Trim()
    $LastError = ($WritersData[$I+4].Split(':')[1]).Trim()
    $info = [Ordered]@{
    'ComputerName' = "$ServerName";
    'WriterName' = "$WriterName";
    'WriterID' = "$WriterID";
    'WriterInstID' = "$WriterInstID";
    'State' = "$State";
    'LastError' = "$LastError";
    $object = New-Object -TypeName psobject -Property $info
    $object | Where-Object {$_.WriterName -like '*Microsoft Exchange*'} | Select-Object -Property ComputerName,WriterName,State,LastError

  • Certreq -submit run locally returns successful but run remote via invoke-command hangs

    Good morning I have been struggling with a certificate request script.
    The requesting server is in the dmz and I have a management server internally.
    I successfully create the Inf file, as well as the req file then copy the req file to my internal management server. Once copied internal I attempt to run the following command from my laptop executing as my admin account
    $Fqdn = "server.dmz.com"
    $managementServer = "InternalServer"
    $Path = "C$\Test\CertRequests"
    Invoke-Command -ComputerName $Managementserver -ScriptBlock {param($CertificateAuthority,$FQDN,$Managementserver,$Path) certreq.exe -submit -attrib "CertificateTemplate:DVNOfflineComputer" -config "$CertificateAuthority" "\\$Managementserver\$Path\$FQDN.req" "\\$Managementserver\$Path\$FQDN.crt"} -ArgumentList $CertificateAuthority,$FQDN,$Managementserver,$Path
    This exact command pasted into a powershell window locally on the management server returns the crt file.
    Run via invoke-command just hangs forever. I even tried to the Silent=True in inf file as well as -q but neither worked.
    Any help is greatly appreciated.

    Hi Jason,
    I reform the script as below, and add the "test-path" to check if the .req and .crt files exist, please also note you haven't assign value to the "$CertificateAuthority" variable:
    $Fqdn = "server.dmz.com"
    $managementServer = "InternalServer"
    $Path = "C$\Test\CertRequests"
    $CertificateAuthority = "something"
    $script={
    param($CertificateAuthority,$FQDN,$Managementserver,$Path)
    test-path "\\$Managementserver\$Path\$FQDN.req"
    test-path "\\$Managementserver\$Path\$FQDN.crt"
    certreq.exe -submit -attrib "CertificateTemplate:DVNOfflineComputer" -config $CertificateAuthority "\\$Managementserver\$Path\$FQDN.req" "\\$Managementserver\$Path\$FQDN.crt"
    Invoke-Command -ComputerName $Managementserver -ScriptBlock $script -ArgumentList $CertificateAuthority,$FQDN,$Managementserver,$Path
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How to run powershell in adminsitrator mode using invoke-command

    Hi,
    I'm trying to run the below script from the remote machine I'm getting the output as below and the msnpatch.exe is not getting executed on the remote machine(testserver).
    When I run the same command on the testserver, a new powershell session is getting opened and able to run msnpatch.exe.
    So, how to invoke powershell in runas administrator mode and run msnpatch.exe on that administrator window is my question.
    Thanks for your time. Your reply is highly appreciated.
    Script:
    Invoke-Command -ComputerName testserver -ScriptBlock {
    $myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent()
    $myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID)
    $newProcess = new-object System.Diagnostics.ProcessStartInfo "PowerShell";
    $newProcess.Verb = "runas"
    $newProcess.Arguments="-noprofile -command msnpatch.exe"
    [System.Diagnostics.Process]::Start($newProcess)
    Output:
    PS C:\Users\v-sridal> Invoke-Command -ComputerName 1f4-00073 -ScriptBlock{
    >> $myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent()
    >> $myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID)
    >> $newProcess = new-object System.Diagnostics.ProcessStartInfo "PowerShell";
    >> $newProcess.Verb = "runas"
    >> $newProcess.CreateNoWindow = "true"
    >> $newProcess.Arguments="-noprofile -command msnpatch.exe"
    >> [System.Diagnostics.Process]::Start($newProcess)
    >> }
    >>
    Handles  NPM(K)    PM(K)      WS(K) VM(M)   CPU(s)     Id ProcessName                   
    PSComputerName
          4       4      244       1156     8     0.06   4968 powershell                    
    testserver

    There is no elevation when running remotely. UAC only affects local sessions. You cannot elevate a remote session.
    ¯\_(ツ)_/¯

  • Is it possible to pass a multi line PowerShell code block to the Invoke-Command ScriptBlock option?

    Hello,
    In my code I am trying to start a windows service on an Azure VM via Azure Automation.  My code fragment is:
    $vm = Get-AzureVM -Name $VMName -ServiceName $VMServiceName
    $uri = Get-AzureWinRMUri -ServiceName $vm.ServiceName -Name $vm.Name
    # Run a command on the Azure VM
    $PSCommandResult = InlineScript {
    $options = New-PSSessionOption -SkipCACheck
    $output = Invoke-Command -ConnectionUri $Using:uri `
    -Credential $Using:Credential `
    -SessionOption $options `
    -ScriptBlock { stop-service -DisplayName <ServiceName> -Force }
    My issue is: Is it possible to pass in a multiple line PS block as the ScriptBlock option?
    After looking around online, there appeared to be two options:
    $psblock = {
    line1
    line2
    line3
    Or
    $PSCommand = @"
    Line1
    Line2
    Line3
    But I have not been able to get either of these to work. (I was trying to end up with something like below)
    $output = Invoke-Command -ConnectionUri $Using:uri `
    -Credential $Using:Credential `
    -SessionOption $options `
    -ScriptBlock { $psCommand }
    Can someone offer a suggestion? Putting a few lines of PS code directly into the ScriptBlock parameter does work but it looks ugly!
    Thanks!

    Thanks for getting back to me!
    I have tried as you suggested but when I attempt to publish the runbook I get this error:
    Runbook definition is invalid. Cannot store the results of this type of expression into a variable. Only the results of commands, pipelines, constant expressions, foreach statements, parallel and sequence statements can be stored in variables.
     However if I just cut and paste the same code inside the ScriptBlock { CODE HERE } it works.
    Perhaps I am breaking the rule as listed above in bold? Would variable declarations in the code block not be allowed?

  • Trying to Download a Software Image to Cisco 2800 series router through TFTP Using the tftpdnld ROMmon Command

    Trying to Download a Software Image to Cisco 2800 series router through TFTP Using the tftpdnld ROMmon Command
    and I am getting an Error , I cant figure out what I am doing wrong. I have also pasted my display down here can someone help me out, thanks in advance, I am still new to this utility.
    My questions are How do you direct this utility to point to the desktop or the TFTP folder
    does FE_PORT: Fast Ethernet 0 imply or point to Fa0/0 on my router
    My router is suppose to have 10.0.0.3 255.0.0.0
    Gateway of 10.0.0.1 255.0.0.0
    My TFTP Server 10.0.0.2 255.0.0.0
    How do I get the MAC address of the Router or the TFTP Server and which one  is required?
    my Ethernet port is 100Mb/Sec I cant tell whether it is full duplex or not so How do i set this FE_SPEED_MODE: Auto???
    =====================================================================================
    rommon 10 >
    rommon 10 > set
    PS1=rommon ! >
    FE_PORT=0
    WARM_REBOOT=
    RET_2_RTS=20:35:55 UTC Thu Sep 25 2014
    BSI=0
    RET_2_RCALTS=
    RANDOM_NUM=1600357627
    ?=0
    IP_ADDRESS=10.0.0.3
    IP_SUBNET_MASK=255.0.0.0
    DEFAULT_GATEWAY=10.0.0.1
    TFTP_SERVER=10.0.0.2
    TFTP_FILE=
    rommon 11 > TFTP_FILE=c2800nm-adventerprisek9-mz.124-24.T4
    rommon 12 > TFTP_CHECKSUM=0
    rommon 13 > SET
    monitor: command "SET" not found
    rommon 14 > set
    PS1=rommon ! >
    FE_PORT=0
    WARM_REBOOT=
    RET_2_RTS=20:35:55 UTC Thu Sep 25 2014
    BSI=0
    RET_2_RCALTS=
    RANDOM_NUM=1600357627
    IP_ADDRESS=10.0.0.3
    IP_SUBNET_MASK=255.0.0.0
    DEFAULT_GATEWAY=10.0.0.1
    TFTP_SERVER=10.0.0.2
    ?=0
    TFTP_FILE=c2800nm-adventerprisek9-mz.124-24.T4
    TFTP_CHECKSUM=0
    rommon 15 > tftpdnld
              IP_ADDRESS: 10.0.0.3
          IP_SUBNET_MASK: 255.0.0.0
         DEFAULT_GATEWAY: 10.0.0.1
             TFTP_SERVER: 10.0.0.2
               TFTP_FILE: c2800nm-adventerprisek9-mz.124-24.T4
            TFTP_VERBOSE: Progress
        TFTP_RETRY_COUNT: 18
            TFTP_TIMEOUT: 7200
           TFTP_CHECKSUM: No
            TFTP_MACADDR: 30:37:a6:49:35:a8
                 FE_PORT: Fast Ethernet 0
           FE_SPEED_MODE: Auto
    Invoke this command for disaster recovery only.
    WARNING: all existing data in all partitions on flash: will be lost!
    Do you wish to continue? y/n:  [n]:  y
    ARP: address resolution for 10.0.0.2 timed out.
    ARP failed with failure code 1.  TFTP transfer aborted.
    TFTP: Operation terminated prematurely.
    rommon 16 >       " not found
    rommon 17 >FE_SPEED_MODE=2
    variable name contains illegal (non-printable) characters
    rommon
    rommon 18 > set
    PS1=rommon ! >
    FE_PORT=0
    WARM_REBOOT=
    RET_2_RTS=20:35:55 UTC Thu Sep 25 2014
    BSI=0
    RET_2_RCALTS=
    RANDOM_NUM=1600357627
    IP_ADDRESS=10.0.0.3
    IP_SUBNET_MASK=255.0.0.0
    DEFAULT_GATEWAY=10.0.0.1
    TFTP_SERVER=10.0.0.2
    TFTP_FILE=c2800nm-adventerprisek9-mz.124-24.T4
    TFTP_CHECKSUM=0
    ?=0
    rommon 19 > tftpdnld [ur]
    usage: tftpdnld [-hr]
      Use this command for disaster recovery only to recover an image via TFTP.
      Monitor variables are used to set up parameters for the transfer.
      (Syntax: "VARIABLE_NAME=value" and use "set" to show current variables.)
      "ctrl-c" or "break" stops the transfer before flash erase begins.
      The following variables are REQUIRED to be set for tftpdnld:
                IP_ADDRESS: The IP address for this unit
            IP_SUBNET_MASK: The subnet mask for this unit
           DEFAULT_GATEWAY: The default gateway for this unit
               TFTP_SERVER: The IP address of the server to fetch from
                 TFTP_FILE: The filename to fetch
      The following variables are OPTIONAL:
              TFTP_VERBOSE: Print setting. 0=quiet, 1=progress(default), 2=verbose
          TFTP_RETRY_COUNT: Retry count for ARP and TFTP (default=18)
              TFTP_TIMEOUT: Overall timeout of operation in seconds (default=7200)
             TFTP_CHECKSUM: Perform checksum test on image, 0=no, 1=yes (default=1)
              TFTP_MACADDR: The MAC address for this unit
                   FE_PORT: 0= (default), 1
             FE_SPEED_MODE: 0=10/hdx, 1=10/fdx, 2=100/hdx, 3=100/fdx,
                            5=Auto (default)
          TFTP_DESTINATION: The flash destination device for the file
                            flash:(default), usbflash0:, usbflash1:
      Command line options:
       -h: this help screen
       -r: do not write flash, load to DRAM only and launch image
    rommon 20 > tftpdnld
              IP_ADDRESS: 10.0.0.3
          IP_SUBNET_MASK: 255.0.0.0
         DEFAULT_GATEWAY: 10.0.0.1
             TFTP_SERVER: 10.0.0.2
               TFTP_FILE: c2800nm-adventerprisek9-mz.124-24.T4
            TFTP_VERBOSE: Progress
        TFTP_RETRY_COUNT: 18
            TFTP_TIMEOUT: 7200
           TFTP_CHECKSUM: No
            TFTP_MACADDR: 30:37:a6:49:35:a8
                 FE_PORT: Fast Ethernet 0
           FE_SPEED_MODE: Auto
    Invoke this command for disaster recovery only.
    WARNING: all existing data in all partitions on flash: will be lost!
    Do you wish to continue? y/n:  [n]:  y
    ARP: address resolution for 10.0.0.2 timed out.
    ARP failed with failure code 1.  TFTP transfer aborted.
    TFTP: Operation terminated prematurely.
    rommon 21 >

    What I notice in the original post is this error
    ARP: address resolution for 10.0.0.2 timed out.
    which says that the router is looking for the 10.0.0.2 server but not getting response to its arp request. Can the original poster clarify for us how the device that has the image file is connected to the router that has the problem? Also what kind of device is 10.0.0.2? Is it a PC running TFTP server software or is it something else?
    HTH
    Rick

  • Invoke-command takes 20-90 seconds to complete

    all servers I'm testing with is server 2008r2 with powershell 4.  I have a text file with 100 servers that are online and with PS remoting enabled.
    When I run this command:
    # this takes about 20-30 seconds to complete
    Invoke-Command
    -ScriptBlock
    {get-date}
    -ComputerName
    (gc
    100servers.txt)
    # this takes at least 90 seconds to complete when I set throttle to 100
    Invoke-Command
    -ScriptBlock
    {get-date}
    -ComputerName
    (gc
    100servers.txt)
    -ThrottleLimit
    100
    I didn't get these delays when my local was running powershell 2 and executing against the same set of servers with PS4 on them.  PS2 only took 2-3 seconds to finish the command if all were online.  If I run the command in PS4 ISE, it seems to
    work fast as well but for some reason PS4 traditional shell (not ISE) gives me these delays when working with large set of servers and increasing throttle to 100+
    Sometimes you get different results if you keep running it with the same shell, but if you open a new shell with -noprofile switch then I get the same execution delays with PS4.
    # I even tried skipping the different checks with sessionOption below but same results
    Invoke-Command
    -ScriptBlock
    {get-date}
    -ComputerName
    (gc
    100servers.txt)
    -ThrottleLimit
    100
    -SessionOption
    (New-PSSessionOption
    -SkipCACheck
    -SkipRevocationCheck
    -SkipCNCheck)
    I also tried running the same command from win8.1 with PS4 and it will hang for about 90 seconds before it spits out all the results at once.
    This seems to be a problem with large number of servers of at least 50.  Works fine with small set.  Is anyone else having this problem?  I know there's other ways of running scripts in parallel, but I can't figure out why this is not working. 
    I'm also using the default pssessionoption below.  I have full admin rights to all the servers.  Any suggestions?
    MaximumConnectionRedirectionCount : 5
    NoCompression                     : False
    NoMachineProfile                  : False
    ProxyAccessType                   : None
    ProxyAuthentication               : Negotiate
    ProxyCredential                   :
    SkipCACheck                       : False
    SkipCNCheck                       : False
    SkipRevocationCheck               : False
    OperationTimeout                  : 00:03:00
    NoEncryption                      : False
    UseUTF16                          : False
    IncludePortInSPN                  : False
    OutputBufferingMode               : None
    Culture                           :
    UICulture                         :
    MaximumReceivedDataSizePerCommand :
    MaximumReceivedObjectSize         :
    ApplicationArguments              :
    OpenTimeout                       : 00:03:00
    CancelTimeout                     : 00:01:00
    IdleTimeout                       : -00:00:00.0010000

    -asjob only puts it in the background, but it still takes the same amount of time to finish.  Any other suggestions?  I want to be able to increase the throttle to at least 100 servers.  With PS2, I was able to throttle to 200 servers and
    was very fast.  Not sure why PS4 is so much slower.  It seems to run better without increasing the throttle, but still slower when dealing with 100 servers compared to PS2 results.
    Invoke-Command
    -ScriptBlock
    {get-date}
    -ComputerName
    (gc
    100servers.txt)
    -ThrottleLimit
    100

  • How to use new cluster  'cl' commands from c/c++ code

    Hi All
    I need to invoke cluster commands from c/c++ code and parse the output to retrieve neccessary fields e.g status to be used in program.
    e.g
    #cluster status
    I need to capture output and use it in c/c++ code.
    Does any one have tried to use new cluster 'cl' commands from c/c++ code??
    Thanks
    Pandit

    The output of the cl* commands is for human consumption and as such (as most administrative commands) the output is not considered stable, so it could change with a Patch, etc.
    Instead you should use the cluster api to retreive the information you need.
    The Sun Cluster Data Services Developer's Guide for Solaris OS (http://docs.sun.com/app/docs/doc/819-2972?a=expand) describes the various possibilities, including the C API.
    Read especially http://docs.sun.com/app/docs/doc/819-2972/6n57ngitf?a=view for more details as which functions are available via the libdsdev. Each function has a specific manpage outlining the lib and includes needed as well es which information it offers.
    In your example, you can use scha_resource_get() (3HA) in order to retrieve the status of a specific resource (http://docs.sun.com/app/docs/doc/819-3055/6n5a6lhnl?a=view).
    Greets
    Thorsten

  • A communication error has occurred while invoking commands in SharePoint host process

    Hi All,
    I am using Virtual box to connect to Sharepoint 2013 VPC. Due to an unexpected sutdown of my machine the VPC got some issue. Now I restored it using my bak up file. But after this when I deploy my sharepoint 2013 farm solution Iam getting the following error.
    Error occurred in deployment step 'Recycle IIS Application Pool': A communication error has occurred while invoking commands in SharePoint host process: The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature
    session shutdown or an internal server error.
    What could be the issue? Any suggestions ?
    Thanks in advance...
    Regards
    Nimisha
    [email protected]

    Hi Nimisha,
    Seems that the original issue of communication error has been solved, for this new issue, it is recommended that you open a new thread which can make others easier
    to focus on one issue in one single thread.
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Using Parallels with Windows 7 on Bootcamp caused startup logo to disappear

    Please let me know whether this is just neurotic or what! Windows 7 RC on Bootcamp partition worked great until I installed a trial copy of Parallels 5.0. Even with Parallels, things seemed fine, but I did not like some behaviors of the program when run under Parallels. Using Parallels, I was leery about the issue that when I clicked on the icon of the E-drive (the Macintosh hard drive), I kept getting the message that it needed to be formatted. Certainly I was able to access the files of the MacIntosh through shared folders, and by dragging files from desktop to desktop, but I saw very little advantage of for running Parallels for what I do with the Windows programs, and I did not want to mess up the Macintosh hard drive by an accidental reformat while using Windows. Also I like the fact that if I start Windows from the Bootcamp partition rather than access it via Parallels, Windows is physically well isolated from MacOSX, I do not really have a chance to delete or mess up the Mac hard drive, and at the same time one can access the Mac OSX disk for files that might be needed by dragging these into the Windows partition. Parallels just seemed unneeded.
    Now that I have uninstalled Parallels from the Mac partition and have uninstalled the Parallels programs and tools on the Windows partition, I still have a strange phenomenon that first showed itself when I had first installed the Parallels 5.0 program. Specifically, since the very day that Parallels first was installed and the bootcamp partition was used as the hard drive for Windows run under Parallels, and now even after uninstalling Parallels, the behavior of the Windows flag logo and startup graphics have been changed. A progress bar that previously did not exist before I used Parallels appears on startup, and the moving colored pieces of the Windows flag logo that are supposed to come together as Windows 7 is booted now do not appear during startup.
    To my best knowledge, besides uninstalling Parallels programs, I have also removed manually all parts of Parallels that I can find from Windows, and I even excised hidden files and folders of Parallels found on the C drive. I also sought out PRL files from the Windows partition. I uninstalled and physically removed a program called Stardust (?)... Starcolor (?) or something like that, which was installed at the time Parallels was installed. Folders for this had icons of Macintosh programs. Additionally tried to remove all Parallels, PRL, and Stardust items also from the registry, but there are stubborn ones that are in the "pnp Lockdown files", and some others there that also fail to remove elsewhere. The Lockdown files that do not remove are Parallels files involved in booting, and the others are for a PRL 4600 monitor (???). I was able to remove PRL files in the "Driver Store" folder by changing permissions, and then these were able to be removed. I see no settings anywhere for startup logos in msconfig or when I search through programs in the control panel or in the Windows system folder. I have emptied temporary folders, Prefetch, and have used Windows Live Safety Center to remove stray registry files and to fix issues.
    Attempts to go back to an old restore point do not work and do not get me back to the Windows 7 installation that i used to have. I reinstalled drivers for Bootcamp from the Snow Leopard disk, and finally I tried to repair the installation (by starting up windows using function keys) with at the same time the Windows 7 RC installation disk available for access of files. The option for repair when started up this way is for repair of a non-starting installation. When this is selected, it seems there is nothing found that needs to be repaired. Thus the startup for Windows still has the same behavior. Maybe I do not know how to repair an installation of Windows, and maybe nothing really needs to be changed back to the former condition. Am I just bothering with something that is just fine but which never will be identical to what it was before Parallels?
    The bottom line is that even though things seem to operate fine otherwise, I feel Parallels has somehow adulterated the Windows installation, which I would rather just run as Windows without artifacts from a prior installation that influence it.
    Thank you for guiding through whatever I need or need not do with these issues.

    Please let me know whether this is just neurotic or what! Windows 7 RC on Bootcamp partition worked great until I installed a trial copy of Parallels 5.0. Even with Parallels, things seemed fine, but I did not like some behaviors of the program when run under Parallels. Using Parallels, I was leery about the issue that when I clicked on the icon of the E-drive (the Macintosh hard drive), I kept getting the message that it needed to be formatted. Certainly I was able to access the files of the MacIntosh through shared folders, and by dragging files from desktop to desktop, but I saw very little advantage of for running Parallels for what I do with the Windows programs, and I did not want to mess up the Macintosh hard drive by an accidental reformat while using Windows. Also I like the fact that if I start Windows from the Bootcamp partition rather than access it via Parallels, Windows is physically well isolated from MacOSX, I do not really have a chance to delete or mess up the Mac hard drive, and at the same time one can access the Mac OSX disk for files that might be needed by dragging these into the Windows partition. Parallels just seemed unneeded.
    Now that I have uninstalled Parallels from the Mac partition and have uninstalled the Parallels programs and tools on the Windows partition, I still have a strange phenomenon that first showed itself when I had first installed the Parallels 5.0 program. Specifically, since the very day that Parallels first was installed and the bootcamp partition was used as the hard drive for Windows run under Parallels, and now even after uninstalling Parallels, the behavior of the Windows flag logo and startup graphics have been changed. A progress bar that previously did not exist before I used Parallels appears on startup, and the moving colored pieces of the Windows flag logo that are supposed to come together as Windows 7 is booted now do not appear during startup.
    To my best knowledge, besides uninstalling Parallels programs, I have also removed manually all parts of Parallels that I can find from Windows, and I even excised hidden files and folders of Parallels found on the C drive. I also sought out PRL files from the Windows partition. I uninstalled and physically removed a program called Stardust (?)... Starcolor (?) or something like that, which was installed at the time Parallels was installed. Folders for this had icons of Macintosh programs. Additionally tried to remove all Parallels, PRL, and Stardust items also from the registry, but there are stubborn ones that are in the "pnp Lockdown files", and some others there that also fail to remove elsewhere. The Lockdown files that do not remove are Parallels files involved in booting, and the others are for a PRL 4600 monitor (???). I was able to remove PRL files in the "Driver Store" folder by changing permissions, and then these were able to be removed. I see no settings anywhere for startup logos in msconfig or when I search through programs in the control panel or in the Windows system folder. I have emptied temporary folders, Prefetch, and have used Windows Live Safety Center to remove stray registry files and to fix issues.
    Attempts to go back to an old restore point do not work and do not get me back to the Windows 7 installation that i used to have. I reinstalled drivers for Bootcamp from the Snow Leopard disk, and finally I tried to repair the installation (by starting up windows using function keys) with at the same time the Windows 7 RC installation disk available for access of files. The option for repair when started up this way is for repair of a non-starting installation. When this is selected, it seems there is nothing found that needs to be repaired. Thus the startup for Windows still has the same behavior. Maybe I do not know how to repair an installation of Windows, and maybe nothing really needs to be changed back to the former condition. Am I just bothering with something that is just fine but which never will be identical to what it was before Parallels?
    The bottom line is that even though things seem to operate fine otherwise, I feel Parallels has somehow adulterated the Windows installation, which I would rather just run as Windows without artifacts from a prior installation that influence it.
    Thank you for guiding through whatever I need or need not do with these issues.

  • Run invoke-command on multiple machines at the same time

    Hey all so I read that if I store my New-pssession in a variable then used that in my invoke-command it would run all computers at the same time.
    $a = Get-Content "C:\Users\cody-horton\Desktop\list.txt"
    $session
    for($i=0;$i -lt $a.Length;$i++){
    if(!(Test-Connection -Cn $a[$i] -BufferSize 16 -Count 1 -ea 0 -quiet)){
    Write-Host $a[$i] -foregroundcolor red
    else{
    $session = New-PSSession $a[$i]
    Invoke-Command -Session $session -FilePath "\\My computer\C`$\Users\public\Documents\zip folder.ps1"
    What exactly am I doing wrong I just need to run this script on multiple machines at the same time.
    Thanks.
    Edit: Also what would be the best way to close all the sessions thanks.

    Hi there,
    So what I think you are doing wrong here is that you are overwriting the value in $Session everytime you executed code inside for loop. try the below:
    $a = Get-Content "C:\Users\cody-horton\Desktop\list.txt"
    $session = @() #define this as an array
    for($i=0;$i -lt $a.Length;$i++){
    if(!(Test-Connection -Cn $a[$i] -BufferSize 16 -Count 1 -ea 0 -quiet)){
    Write-Host $a[$i] -foregroundcolor red
    else{
    $session += New-PSSession $a[$i] #add the new session to the array, at the end it will be a collection of sessions
    Invoke-Command -Session $session -FilePath "\\My computer\C`$\Users\public\Documents\zip folder.ps1" #I think the above one won't work..first you need to copy the script locally on the machine and then execute it#Why this won't work because of Second-Hop Authentication
    Have put comments where I edited your code.
    Hope this helps
    Knowledge is Power{Shell}. http://dexterposh.blogspot.com/

Maybe you are looking for

  • Importing UDFs through DTW

    Hi I want to import udfs in master data of item through DTW. Howz this possible? I have added one field through tools--user defined tables-setup object type is no object. Now in this udf i want to add diffrent code and diffrent name in front of item

  • Purchase Register and sales register-Std functionality reqd

    Hi gurus, My user requires said register through system.Is there any transaction code/std functionality. Pl advise. Regards, Samar

  • Share a folio from folio producer

    Hi, i write from Italy, I created my first folio with Indesign 5.5 and I uploaded in my folio producer. I shared a folio with a friend (IPAD2) but clicking on the link included in the email, Safari displays the message "Unsupported Browser" and my fr

  • Sbo common error - test connection

    Hello, Im trying to connect the B1DI in SBO common, but I can't: This error appears: XCE001 Nested exception: java.rmi.RemoteException: com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: java.net.MalformedURLException: invalid aut

  • Language settings for BEX Analyser

    Hi All, I am trying to run a report for which dispalys customer names. The BEX report is unable to recognize Greek letters and displays # instead of that. The same report runs fine on Web. Can anybody please suggest what additional settings need to b