Scripts I use to update my system from ABS

Banged some scripts together to update from ABS and sharing them cause I like them - they work together or separate.
gather abs directories into ~/abs directory:
#!/usr/bin/perl
my @upgradelist;
system ("sudo pacman -Sy");
system ("sudo abs");
open FH, "pacman -Qqu |";
while (<FH>){
chomp $_;
if (-d "/var/abs/core/$_") {system ("cp -R /var/abs/core/$_/ /home/poiuyt/abs/ ");}
if (-d "/var/abs/community/$_") {system ("cp -R /var/abs/community/$_/ /home/poiuyt/abs/ ");}
if (-d "/var/abs/extra/$_") {system ("cp -R /var/abs/extra/$_/ /home/poiuyt/abs/ ");}
DL and make the ABS packages from the ~/abs directory:
GNU nano 2.2.6 File: makepackages.pl
#!/usr/bin/perl
$absdir = $ENV{"HOME"}."/abs";
opendir (DIR, $absdir);
my @directory= readdir(DIR);
my $workingdir;
foreach (@directory){
# if ($file =~ m/^\./){
$workingdir = $absdir."/$_";
print "calling makepkg on $workingdir\n";
chdir ("$workingdir") or die "can't change directories";
system ("makepkg");
install packages in abs directory:
GNU nano 2.2.6 File: install.pl
#!/usr/bin/perl
$absdir = $ENV{"HOME"}."/abs";
opendir (DIR, $absdir);
my @directory= readdir(DIR);
my $workingdir;
foreach (@directory){
# if ($file =~ m/^\./){
$workingdir = $absdir."/$_";
print "calling pacman on $workingdir\n";
chdir ("$workingdir") or die "can't change directories";
system ("sudo pacman -U *.pkg.tar.xz");
Feel free to comment or improve as I willingly admit I am a crappy coder.
EDIT : My bad code was corrected - sorry was working on it today
Last edited by poiuyt23 (2013-12-17 05:35:21)

Don't use pacman -Sy, use checkupdates
Don't run abs as root, use $ABSROOT, also you cam tell abs just what packages to download. As a sidenote, abs is often out of date, the gir repo is prefered.
And there already are several existing tools to build/update from abs, why not use one of those?

Similar Messages

  • Is it possible to update my system from 10.5.8 to 10.8 on my (2007?) Macbook?

    Is it possible to update my system from 10.5.8 to 10.8 on my (2007?) Macbook?  The Mountain Lion update page on the apple store says you must have 10.6 to update, but can I update to 10.6, then mountain lion?

    The models Late 2006 Core 2 Duos 2,1 through Early 2008 4,1 can only run a maximum of 10.7 Lion.
    The Late 2008 model 5,1 Aluminum Unibody through the Mid 2010 White Unibody model 7,1 can run 10.8 Mountain Lion.
    The Snow Leopard 10.6 DVD should still be available at this time from Apple for $19.99. You will have to call Apple Customer Care 1-800-692-7753 or 1-800-676-2775 to purchase it. It may still be in the Legacy Products list. The App Store which is required to download 10.7 Lion is part of the 10.6.6 update.
      If you wait to long and they no longer have any in stock you will have to buy it from eBay or Apple resellers that still have stock. But you will have to pay a premium since the DVDs are no longer being made. Snow Leopard DVDs are already over $100 on Amazon.
    http://www.ebay.com/sch/i.html?_nkw=10.6+snow+leopard&_sacat=0&_odkw=mac+os+10.6 &_osacat=0
    Once you are at 10.6.8 Lion is still available from Apple. You will have to call Apple Customer Care 1-800-692-7753 or 1-800-676-2775. to purchase it. Then within 3 days you will get an email with a code which you can use to download Lion from the App Store.  The price is $19.99.
    Lion will require at least 2gb of RAM but really needs 4gb to run smoothly.
    As for third party programs see this list for compatibility with 10.7 http://roaringapps.com/apps:table Also Lion doesn't run any Power PC programs. To see if you have any Power PC programs go to the Apple in the upper left corner and select About This Mac, then click on More Info. When System Profiler comes up select Applications under Software. Then look under Kind to see if any of your applications are listed as Power PC. Universal and Intel will run under Lion.
    Before Mac switched to Intel processors in 2006 they used Power PC processors from 1994 to 2005. Power PC 601 through 604, G3, G4 and G5. Applications written for the Power PC processors need the application called Rosetta to run on Intel processors. This was part of the Operating System in 10.4 and 10.5 but was an optional install in 10.6. With 10.7 Lion Apple dropped all support for Power PC applications.

  • Attempting to upload files using the zend _file_transfer system from cs5 training from the source. [was: Question for David Powers]

    I am attempting to upload files using the zend _file_transfer system from cs5 training from the source.
    On trying to upload to a remote server I am having trouble with the destination setting (C:/upload_test) in the example, please could you point me in the right direction for the an example of this setting for a remote file transfer
    Also do I have to construct a connection file to activate a Ftp file transfer?
    David Woolston

    >I am on windows platform
    Who is your host? When you checked your host path in your host control panel, what did it say?
    >i have assumed (may be incorrectly) that the purpose of the exercise was to upload to a remote site (ie my website)
    That is correct.
    >Of course that upload might take place on a computer that does not have DW installed (an internet cafe for example)
    That's irrelevant. DW is just the tool you are using to build your site. The site runs on your hosting accounts servers. This includes the php scripts you are working with.
    >I have uploaded all files necessary for the operation, when i click upload it returns no such directory exits.
    Do you have a url we can check? What destination are you specifying in zend code?
    >This made me suspect that I would need to construct a ftp file transfer connection file to satisfied username, password , connection address etc
    The exercise you are dealing with is using http file transfer. This has nothing to do with FTP. You do not need FTP for this, other than using it to move your source code from your local client to your server.

  • Can't find air video in system tray on my pc. Recently updated op system from xp to win7. already reinstalled itunes and synced ipad.

    Can't find air video in system tray on my pc. Recently updated op system from xp to win7. already reinstalled itunes and synced ipad.

    Carol L wrote:
    Hi Deggie....I did figure that out since I posted the original question, and I downloaded ther server again and tried it out, but it can't connect. Any ideas?
    -> http://www.inmethod.com/airvideo/troubleshooting.html
    -> http://inmethod.freshdesk.com/support/solutions

  • TS2943 Is it possible to update my system from 10.5.8 to 10.8 on my (2007?) Macbook?

    Is it possible to update my system from 10.5.8 to 10.8 on my (2007?) Macbook?  The Mountain Lion update page on the apple store says you must have 10.6 to update, but can I update to 10.6, then mountain lion?

    Not sure what your question has to do with an AirPort Extreme, AirPort Express or Time Capsule, which this area supports.
    You might get a faster and more informed answer if you post in the correct MacBook support area.
    MacBook

  • How to get information about the modules used in the RT system from host pc.

    hi all,
    i am trying to  read the modules of the RT tragets from my host pc without deploying the program.
    i have 2 or more than 2 rt systems from which i am trying to get the information about the modules used in that particular system.
    Regards,
    Santhosh M

    hi, you can use the sys_context function, like this:
    select sys_context('userenv','current_user'),
         sys_context('userenv','os_user'),
         sys_context('userenv','host'),
         sys_context('userenv','ip_address'),
         sys_context('userenv','instance'),
         sys_context('userenv','sessionid'),
         sys_context('userenv','terminal')
    from dual;
    Is this what you 're looking for?

  • Use and update purchased apps from one iTunes store account to another?

    I have two iTunes Store Accounts (Apple ID's) with the vast majority of purchases, music and apps, made on one account, but I've created a second account and wish to use it to sync with my iPhone.
    Will I be able to continue to use and update the apps on my iPhone purchased with the first account?
    Thanks.

    This sounds like the kinda thing Apple support might be able to help with. It's possible they might be able to merge the 2 accounts or switch user names around or something.
    Apps and Protected music files are locked to one account. I don't think there is any way you(personaly) can transfer and/or updated them on a different account.

  • CCX Script - Need to Be updated when Upgrading from 7X to 8X w/ SQL Integration

    Got a customer we're planning on upgrading from UCCX 7X to 8X. They are currently integrated with an external SQL DB. I understand I need to download the appropriate driver for 8X for SQL. The question I have though is whether the UCCX scripts themselves need to be updated as well or will the 7X scripts that have the typical DB read/get/write/release work when I do the migration?  

    They should work as-is but your only way to be sure is to test them. I would only anticipate an issue if you were doing complicated logic that CCX didn't support in the first place. Simple SELECT queries should continue to be fine.
    PS- Don't use the Microsoft driver, use this: http://jtds.sourceforge.net/

  • Which is the good event to use to update on system form

    Hello,
    I have a table linked to the business partner.
    I added on the Business Partner form a grid where the user can add/remove data.
    I want to update the table linked to the BP when the user click on the update button on the BP form but :
         - I don't wan to update my data if BO throw an error when Adding/Updating the BP
         - I want to be able to cancel BO update if the update of my data throw an error.
    Can I do this ? if yes on which event ? et_FORM_DATA_UPDATE ?  how can I cancel BO update ?
    I do get the BO information if the update was fine with  BusinessObjectInfo.ActionSuccess   but how/when can I cancel t updates if mine is not working ?
    I cannot use SP_transactionNotification... I have to use the DI..
    Thank you for your help
    Sébastien

    Sébastien,
    ca marche comme sur de roulette?
    You have to use 2-steps process (both inside FORM_DATA_UPDATE):
    1. your custom data verification (before = true; if verification is failed => bubble = false)
    2. your custom data commit (before = false; this event will not be generated if the verification failed)
    HTH

  • Need a script to update AD information from Excel file, however employee ID is use for identify the user in AD

    Please help me to get this done!....Thanks in Advance
    This is current script I use to update AD record but its taking user id to pick the user in AD, which is some time give error not update properly..
    # UpdateUsers.ps1
    # PowerShell program to update Active Directory users from the information in a
    # Microsoft Excel spreadsheet. Only single-valued string attributes supported.
    # Author: Richard Mueller
    # PowerShell Version 1.0
    # September 12, 2011
    Trap
        If ("$_".StartsWith("Cannot load COM type Excel.Application"))
            "Excel application not found, program aborted"
            Add-Content -Path $LogFile -Value "## Excel application not found"
            Add-Content -Path $LogFile -Value "   $_"
            Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
            Break
        If (("$_".StartsWith("Exception has been thrown")) -and ($Step -eq "4"))
            "Excel spreadsheet not found, program aborted"
            Add-Content -Path $LogFile -Value "## Excel spreadsheet not found: $ExcelPath"
            Add-Content -Path $LogFile -Value "   $_"
            Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
            Break
        If ("$_".StartsWith("The server is not operational"))
            "Domain Controller not found, program aborted"
            Add-Content -Path $LogFile -Value "## Domain Controller not found"
            Add-Content -Path $LogFile -Value "   $_"
            Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
            Break
        If ("$_".StartsWith("The directory service is unavailable"))
            "Active Directory not found, program aborted"
            Add-Content -Path $LogFile -Value "## Active Directory not found"
            Add-Content -Path $LogFile -Value "   $_"
            Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
            Break
        If ("$_".StartsWith("The specified domain"))
            "Domain not found, program aborted"
            Add-Content -Path $LogFile -Value "## Domain not found"
            Add-Content -Path $LogFile -Value "   $_"
            Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
            Break
        "Unexpected error: $_"
        Add-Content -Path $LogFile -Value "## Unexpected error: $_"
        Add-Content -Path $LogFile -Value "   Step: $Step"
        Break
    Function CleanUp
        Trap
            "Error during cleanup: $_"
            Add-Content -Path $LogFile -Value "## Error during cleanup: $_"
            $Script:Errors = $Script:Errors + 1
            Continue
        # Function to release Excel objects from memory.
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Columns)} While ($x -gt -1)
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Rows)} While ($x -gt -1)
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Range)} While ($x -gt -1)
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Sheet)} While ($x -gt -1)
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Worksheets)} While ($x -gt -1)
        $Workbook.Close($False)
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Workbook)} While ($x -gt -1)
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Workbooks)} While ($x -gt -1)
        $Excel.Quit()
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Excel)} While ($x -gt -1)
    # Specify paths to spreadsheet and log file.
    $Script:Errors = 0
    $Step = "1"
    $ExcelPath = "c:\scripts\UpdateUsers.xls"
    $LogFile = "c:\scripts\UpdateUsers.log"
    Write-Host "Please Standby..."
    # Add to the log file.
    $Step = "2"
    Add-Content -Path $LogFile -Value "------------------------------------------------" -ErrorAction Stop
    Add-Content -Path $LogFile -Value "UpdateUsers.ps1 Version 1.0 (September 12, 2011)"
    Add-Content -Path $LogFile -Value $("Started: " + (Get-Date).ToString())
    Add-Content -Path $LogFile -Value "Spreadsheet: $ExcelPath"
    Add-Content -Path $LogFile -Value "Log file: $LogFile"
    $Step = "3"
    # Open specified Excel spreadsheet.
    $Excel = New-Object -ComObject "Excel.Application"
    $Workbooks = $Excel.Workbooks
    $Step = "4"
    $Workbook = $Workbooks.Open($ExcelPath)
    $Worksheets = $Workbook.Worksheets
    $Sheet = $Worksheets.Item(1)
    $Range = $Sheet.UsedRange
    $Rows = $Range.Rows
    $Columns = $Range.Columns
    $Step = "5"
    # Hash table of attribute syntaxes.
    # The LDAP display names will be read from the spreadsheet.
    # The corresponding syntaxes will be read from the Schema container.
    $Attributes = @{}
    # Array of spreadsheet column headings.
    $Cols = @()
    $Step = "6"
    # Read attribute LDAP Display Names from the first row of the spreadsheet.
    $ID = 0
    For ($k = 1; $k -le $Columns.Count; $k = $k + 1)
        # Retrieve column heading, the lDAPDisplayName of an attribute.
        $Value = $Sheet.Cells.Item(1, $k).Text
        # Keep track of all column headings.
        $Cols += $Value
        # Skip duplicates in hash table.
        If ($Attributes.ContainsKey($Value) -eq $False)
            # Default is "NotFound", until found in the AD Schema.
            $Attributes.Add($Value, "NotFound")
        # Keep track of which column uniquely identifies users.
        If ($Value.ToLower() -eq "distinguishedname") {$ID = $k}
        If (($Value.ToLower() -eq "samaccountname") -and ($ID -eq 0)) {$ID = $k}
        # This script cannot be used to rename users.
        If ($value.ToLower() -eq "cn")
            Add-Content -Path $LogFile -Value "## This script cannot be used to rename users"
            Add-Content -Path $LogFile -Value "   Do not specify the cn attribute in the spreadsheet"
            Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
            CleanUp
            Return "Program aborted: cn attribute found in spreadsheet" `
                + "`nSee log file: $LogFile"
    $Step = "7"
    If ($ID -eq 0)
        Add-Content -Path $LogFile -Value "## No column found to identify users"
        Add-Content -Path $LogFile -Value "   One column must be distinguishedName or sAMAccountName"
        Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
        CleanUp
        Return "Program aborted: No column found in spreadsheet to identify users" `
            + "`nSee log file: $LogFile"
    # Create filter to query for attributes in the schema.
    $Attrs = $Attributes.Keys
    $Filter = "(&(objectCategory=AttributeSchema)(|"
    ForEach ($Attr In $Attrs)
        $Filter = $Filter + "(lDAPDisplayName=$Attr)"
    $Filter = $Filter + "))"
    $Step = "8"
    $RootDSE = [System.DirectoryServices.DirectoryEntry]([ADSI]"LDAP://RootDSE")
    $Domain = $RootDSE.Get("defaultNamingContext")
    $Schema = $RootDSE.Get("schemaNamingContext")
    $Step = "9"
    # Use the NameTranslate object.
    $objTrans = New-Object -comObject "NameTranslate"
    $objNT = $objTrans.GetType()
    # Initialize NameTranslate by locating the Global Catalog.
    $objNT.InvokeMember("Init", "InvokeMethod", $Null, $objTrans, (3, $Null))
    $Step = "10"
    # Retrieve NetBIOS name of the current domain.
    $objNT.InvokeMember("Set", "InvokeMethod", $Null, $objTrans, (1, "$Domain"))
    $NetBIOSDomain = $objNT.InvokeMember("Get", "InvokeMethod", $Null, $objTrans, 3)
    Add-Content -Path $LogFile -Value "NetBIOS name of domain: $NetBIOSDomain"
    $Step = "11"
    $Searcher = New-Object System.DirectoryServices.DirectorySearcher
    $Searcher.SearchRoot = [ADSI]"LDAP://$Schema"
    $Searcher.PageSize = 200
    $Searcher.SearchScope = "subtree"
    $Searcher.PropertiesToLoad.Add("lDAPDisplayName") > $Null
    $Searcher.PropertiesToLoad.Add("attributeSyntax") > $Null
    $Searcher.PropertiesToLoad.Add("isSingleValued") > $Null
    $Searcher.PropertiesToLoad.Add("systemFlags") > $Null
    # Filter on specified attributes.
    $Searcher.Filter = $Filter
    $Step = "12"
    # Query Active Directory.
    $Results = $Searcher.FindAll()
    # Enumerate recordset.
    ForEach ($Result In $Results)
        # Retrieve properties of attributes.
        $Name = $Result.Properties.Item("lDAPDisplayName")[0]
        $SysFlags = $Result.Properties.Item("systemFlags")[0]
        $SyntaxNum = $Result.Properties.Item("attributeSyntax")[0]
        $SingleValued = $Result.Properties.Item("isSingleValued")[0]
        # Only single-valued string attributes supported by this version of the program.
        Switch ($SyntaxNum)
            "2.5.5.12" {$Syntax = "String"}
            Default {$Syntax = "NotSupported"}
        If ($Name.ToLower() -eq "distinguishedname") {$Syntax = "DN"}
        If (($SysFlags -band 4) -ne 0)
            $Attributes[$Name] = "Constructed"
        Else
            If ($SingleValued -eq $True)
                $Attributes[$Name] = $Syntax
            Else
                $Attributes[$Name] = "NotSupported"
    $Step = "13"
    # Check if any attributes not found or have unsupported syntax.
    $Found = $True
    ForEach ($Attr In $Attrs)
        $Syntax = $Attributes[$Attr]
        If ($Syntax -eq "NotFound")
            Add-Content -Path $LogFile -Value "## Attribute $Attr not found in schema"
            "Attribute $Attr not found in schema"
            $Found = $False
        If ($Syntax -eq "NotSupported")
            Add-Content -Path $LogFile -Value "## Attribute $Attr has a syntax that is not supported"
            "Attribute $Attr has a syntax that is not supported"
            $Found = $False
        If ($Syntax -eq "Constructed")
            Add-Content -Path $LogFile -Value "## Attribute $Attr is operational, so is not supported"
            "Attribute $Attr is operational, so is not supported"
            $Found = $False
    $Step = "14"
    If ($Found -eq $False)
        Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
        CleanUp
        Return "Program aborted" `
            + "`nSee log file: $LogFile"
    # Read remaining rows of the spreadsheet, until the first blank value is found
    # in the column that identifies users.
    $Step = "15"
    $Script:Updated = 0
    $Script:Unchanged = 0
    $j = 2
    Do {
        # Retieve ID value for the user first.
        $Value = $Sheet.Cells.Item($J, $ID).Text
        $Found = $False
        $Step = "16"
        If ($Cols[$ID - 1] -eq "distinguishedname")
            # Any forward slash characters must be escaped.
            $DN = $Value.Replace("/", "\/")
            # Bind to the user object.
            # If user not found, $User.Name will be $Null.
            $User = [ADSI]"LDAP://$DN"
            If ($User.Name -ne $Null)
                $Found = $True
        $Step = "17"
        If ($Cols[$ID - 1] -eq "samaccountname")
            Trap
                Write-Host ""
                "Error translating name: $_"
                Add-Content -Path $LogFile -Value "## Error translating name $Value"
                Add-Content -Path $LogFile -Value "   Description: $_"
                $Script:Errors = $Script:Errors + 1
                Continue
            # Convert sAMAccountName to distinguishedName.
            $DN = ""
            $Step = "18"
            $objNT.InvokeMember("Set", "InvokeMethod", $Null, $objTrans, (3, "$NetBIOSDomain$Value"))
            $DN = $objNT.InvokeMember("Get", "InvokeMethod", $Null, $objTrans, 1)
            $Step = "19"
            If ($DN -ne "")
                $Step = "20"
                # Any forward slash characters must be escaped.
                $DN = $DN.Replace("/", "\/")
                # Bind to the user object.
                $User = [ADSI]"LDAP://$DN"
                $Found = $True
        If ($Found -eq $True)
            $Step = "21"
            # Read remaining values for this user.
            $Changed = $False
            For ($k = 1; $k -le $Columns.Count; $k = $k + 1)
                # Skip the identifying column.
                If ($k -ne $ID)
                    $Step = "22"
                    # Retrieve attribute name for this column from array.
                    $AttrName = $Cols[$k - 1]
                    # Retrieve attribute syntax from hash table.
                    $Syntax = $Attributes[$AttrName]
                    $Step = "23"
                    # Retrieve attribute value for this user.
                    $Value = $Sheet.Cells.Item($j, $k).Text
                    # Skip blank values.
                    If ($Value -ne "")
                        If ($Syntax -eq "String")
                            Trap
                                If ("$_".StartsWith("The directory property cannot be found"))
                                    Continue
                                Else
                                    Write-Host ""
                                    "Error retrieving value from Active Directory: $_"
                                    Add-Content -Path $LogFile -Value "## Error retrieving $AttrName for user $DN"
                                    Add-Content -Path $LogFile -Value "   Description: $_"
                                    $Script:Errors = $Script:Errors + 1
                                    Continue
                            $Step = "24"
                            # Single-valued string attribute.
                            # Retrieve existing value.
                            $OldValue = ""
                            $OldValue = $User.Get($AttrName)
                            # Check if existing value to be deleted.
                            If ($Value.ToLower() -eq ".delete")
                                If ($OldValue -ne "")
                                    If ($AttrName.ToLower -eq "samaccountname")
                                        Add-Content -Path $LogFile -Value `
                                            "## Mandatory attribute sAMAccountName cannot be cleared for user: $DN"
                                        $Script:Errors = $Script:Errors + 1
                                    Else
                                        Trap
                                            Write-Host ""
                                            "Error deleting value from Active Directory: $_"
                                            Add-Content -Path $LogFile -Value "## Error deleting $AttrName for user $DN"
                                            Add-Content -Path $LogFile -Value "   Description: $_"
                                            $Script:Errors = $Script:Errors + 1
                                            Continue
                                        $Step = "25"
                                        # Make the attribute value "not set".
                                        $User.PutEx(1, $AttrName, 0)
                                        $Changed = $True
                            Else
                                $Step = "26"
                                # Check if new value from spreadsheet different.
                                If ($Value -ne $OldValue)
                                    Trap
                                        Write-Host ""
                                        "Error assigning value from Active Directory: $_"
                                        Add-Content -Path $LogFile -Value "## Error assigning $AttrName for user $DN"
                                        Add-Content -Path $LogFile -Value "   Description: $_"
                                        $Script:Errors = $Script:Errors + 1
                                        Continue
                                    # Assign the new value to the attribute.
                                    $User.Put($AttrName, $Value)
                                    $Changed = $True
                        Else
                            # Unexpected error.
                            Add-Content -Path $LogFile -Value `
                                "## Unexpected syntax: $Syntax for attribute $AttrName for user $DN"
                            $Script:Errors = $Script:Errors + 1
            If ($Changed -eq $True)
                Trap
                    Write-Host ""
                    "Error saving to Active Directory: $_"
                    Add-Content -Path $LogFile -Value "## Error saving to AD for user $DN"
                    Add-Content -Path $LogFile -Value "   Description: $_"
                    $Script:Errors = $Script:Errors + 1
                    $Script:Updated = $Script:Updated - 1
                    Continue
                $User.SetInfo()
                Add-Content -Path $LogFile -Value "Update user: $DN"
                Write-Host "." -NoNewLine
                $Script:Updated = $Script:Updated + 1
            Else
                Add-Content -Path $LogFile -Value "User unchanged: $DN"
                Write-Host "." -NoNewLine
                $Script:Unchanged = $Script:Unchanged + 1
        Else
            Add-Content -Path $LogFile -Value "## User not found: $Value"
            Write-Host "." -NoNewLine
            $Script:Errors = $Script:Errors + 1
        $j = $J + 1
    } Until ($Sheet.Cells.Item($j, $ID).Text -eq "")
    $Step = "27"
    CleanUp
    Add-Content -Path $LogFile -Value $("Finished: " + (Get-Date).ToString())
    Add-Content -Path $LogFile -Value "Number of users updated: $Script:Updated"
    Add-Content -Path $LogFile -Value "Number of users unchanged: $Script:Unchanged"
    Add-Content -Path $LogFile -Value "Number of errors: $Script:Errors"
    Write-Host ""
    "Done"
    "Number of errors: $Script:Errors"
    "See log file: $LogFile"

    Actually scripts run fine with excel file, currently we are using user-id to pick to update AD. Now we want to update AD use employee id. You can say to identify the record in AD through employee ID instead of user-id. 
    I do not think you will get anyone here to fix that for you.  You need to find someone who knows PowerShell to help you or learn PowerShell your self.
    I would fix it for you but not for free.  It is too oddly designed and has too many dependencies.  Any small change is likely to break it.
    ¯\_(ツ)_/¯

  • Help! I am using OS X 10.5.8 How do I update my system?

    sorry for the ignorance.  I wanted to update my system from the 10.5.8 to the most recent OS Mountain Lion and could not figure out how to do it.  I had to find the MAC APPS STORE first since it is NOT in my dock.  So I downloaded the Mac OS X 10.6.6 update combo, and the error message says "This update version requires 10.6!  OK, i need a little help getting from 10.5.8 to 10.6.  Any words of wisdom? 
    To complicate things, I bought this computer in the states but I am currently living in Guatemala.  Not really a Apple Store around the corner.  Not to mention it is a big 27" imac desktop. 
    Thanks
    v s

    You will have to purchase the Snow Leopard DVD. See:
    Apple confirmed the removal of the software yesterday afternoon, and said that customers can still purchase a copy from its online store's telesales agents.[1-800-MY-APPLE (1-800-692-7753) or Customer Service and Sales Support at 1-800-676-2775.]
    Alternatively, there are third-party sources:
    Snow Leopard from Amazon.com
    Snow Leopard from eBay
    You can then use the 10.6.6 update you downloaded. Then you can sign into the App Store using your Apple ID to purchase and download Mountain Lion. Note that your computer must meet the system requirements:
    Snow Leopard General requirements
    Mac computer with an Intel processor
    1GB of memory
    5GB of available disk space
    DVD drive for installation
    Some features require a compatible Internet service provider; fees may apply.
    Some features require Apple’s MobileMe service; fees and terms apply.
    Apple - OS X Mountain Lion - Read the technical specifications.
    Macs that can be upgraded to OS X Mountain Lion
    iMac (Mid 2007 or newer)
    MacBook (Late 2008 Aluminum, or Early 2009 or newer)
    MacBook Pro (Mid/Late 2007 or newer)
    MacBook Air (Late 2008 or newer)
    Mac mini (Early 2009 or newer)
    Mac Pro (Early 2008 or newer)
    Xserve (Early 2009)

  • Moving a system from MSSQL 2000 to MSSQL 2000 IA64

    Hi
    We have a R/3 Enterprise 47x110 system running on MSSQL 2000/windows 32 bit. We want to change our hardware to 64 bit. According to platform availability matrix, we have to use mssql 2000 ia64/win2003 ia64 with this release. We want to know which procedure has to be used for moving a system from mssql 2000 32 bit to mssql 2000 ia64?

    Hello
    Migrating an SAP system from Windows SQL IA32 to Windows SQL IA64 is a fairly simple procedure.
    I have performed this migration myself several times.
    You need to ensure that your source system (IA32) has the required support pack levels for SQL 2005
    I recommend you review 905634, 151603 and 683447.
    I would strongly recommend that you move directly to SQL 2005 rather than SQL 2000.  SQL 2005 is fully supported and offers a lot of performance and administration features (such as snapshots).
    SQL Data files are compatible between SQL platforms. By this I mean if you do an sp_detach on an SQL IA32 system you can sp_attach them to an SQL IA64 system without any special action.  The files are also compatible between SQL versions, you can detach from SQL 2000 and attach to SQL 2005.  This is described in section III of 799058.
    In your case I would:
    1.  Make sure you support packs are up to date on source system
    2.  Make sure you are using the correct collation 600027
    3.  Install 4.7 on your IA64 host from the install CDs
    4.  Update your IA64 system kernel to the correct level
    5.  Detach the "empty" DB from the IA64 host
    6.  Shutdown your IA32 system, stop SQL, start SQL and then stop SQL
    7.  Copy the datafiles and log files to the IA64 system
    8.  Attach them to your IA64 SQL 2005 system
    9.  Run the SQL Tools utility
    10. Start up your 4.7 instance
    11. Check SM21, ST04, SICK and DB02
    12. Reschedule your backups and DBCC
    This procedure should work and should be quite simple to implement.  You can leave you IA32 system untouched, so if you experience any problems you have a fall back position (ie. just restart your IA32 system - nothing has changed on you IA32 system or its database).
    I recommend you obtain the official SAP SQL 2005 CD, it includes SP1 and has a useful script call SQL4SAP.VBS that sets a lot of options for you automatically.
    Check 879941 - you may need to adjust the torn page setting and auto_update_statistics_async settings or you will get red alerts in your CCMS tree.
    For other people out there who use Java systems (EP, XI etc) you <b>will almost certainly</b> have to update your JDBC drivers. See note 639702. 
    Hope this helps, let me know if you have any questions.
    Goodluck
    Message was edited by: Sam Badan

  • BDLS updating logical systems in CIF models?

    Hi
    The BDLS tool can be used to update logical system names in systems. As I understand this tool is often used when copying systems (Production system to Q system for instance).
    In a situation where you copy the productive system to the  Q system:
    Does anyone know if BDLS is capable of updating the logical systems in the generated CIF models that you get copied from the productive system? In this case you'd get a big chunk of models that point to the wrong logical name. If you could get the target system changed in the generated model then you could save a lot of time in generating and activating models.
    Any comments much appreciated
    Simon

    Hi,
    I am not too sure if this thread is followed. I was looking for some info where we had a similar issue recently when we did a production refersh to Quality and all our integration model variants are pointing to our production system.
    Our basis team has taken all the necessary steps like BDLS etc, but we had this issue. I dropped a message to SAP and they gave a report name RCIFVARIANTCHANGE to change the logical system name from old one to the new one for CIF variants.
    Thanks,
    Murali

  • Update iPhone system in an Apple store?

    This may be a stupid question and/or have been asked before, but I could not find such a thread.
    As has just been announced, the new iOS 4 will be available on the 21st of June. Unfortunately, I will start my holiday on the 20th and therefore away from my trusty MBP. I will be in Las Vegas on the 21st though, and I know where I can find the Apple store there. It seems to be possible to update the system from somebody else's computer, as long as I avoid synching anything.
    My question: Does anybody know if the nice people in the Apple store will allow complete strangers to walk in and grab an iPhone OS update? (I would ask nicely, of course.)

    Probably, but if something goes wrong with the update which requires restoring your iPhone with iTunes, you won't have any of your existing iTunes content including 3rd party apps available.
    I suggest waiting to install the update until your computer is available and if not, just be aware of the potential consequences in the event there is a problem.

  • Update USR table from Java Code outside OIM

    Hi,
    I want to update a particular field in the USR table using the update query specifically from the java code. I dont want use updateUser api.
    I have written the code which works fine for some userids. But for some user ids it gets the tcUtility object successfully but when trying to execute the update query, it throws the tcDatasetException with message as Data Access Error.
    Please let me know how can i achieve this.
    Also let me know the groups the userid should be member to execute a update query on OIM DB from external java code..
    TIA...

    You are performing an unsupported process. I suggest you correctly code a connection to OIM, and perform the update correctly.
    If you need to update the database directly, use jdbc java connection and run the update. You can do a google search for jdbc and java to find plenty of samples.
    -Kevin

Maybe you are looking for

  • How can I set trace on?  In the parameter config file

    I tried this trace traceoopts="trace_all" it didn't work. can you tell me how to set trace on in the configuration parameter file?

  • Export PDF in Captivate 5 and Publishing CP4 project in CP5

    When I publish flash (swf) videos in CP4, I always tick the "Export PDF" option to also get the PDF version - and then offer the PDFs for download as an alternative to watching online (or send them via e-mail). I have learned to live with the fact th

  • Question about analytic function

    I have a table (t1) that contains text (source_ip) and a corresponding number column (attack_count). I'm trying to group source_ip, sum attack_count per unique source ip, and then provide a percentage for unique source_ip attack count to the total su

  • Credit Balance Won't Update

    I can't pre-order Madonna's Confessions on a Dance Floor and get the new single because each time it say that my credit balance is out of date and to say "ok" to refresh but it still allows me to buy other music so I am confused! and frustrated! Anyo

  • Users Not able to log in

    I know that this has been beaten to a pulp, but having issues myself and have not been able to find an answer. Hard drive failure in my server, so re-installed and updated everything to 10.7.5 without any issues, 1000+ users recreated. Sharepoints se