Alejo

Author


Ubuntu 11.04 is simply a failure…


.
Why is Ubuntu 11.04 so buggy? I am experiencing various severe bugs daily!
The following sample log is disappointing:


After a few days I just stopped logging.. I hope they get fixed soon… or I’ll be looking for a new OS (possibly Ubuntu 10.10?).

Check it out:DIY is the way

Alejo

Tagged with: 11.04failureSimplyUbuntu 

how to set resolution of my Lenovo laptop?


.

i recently installed window xp sp-2 on my Lenovo laptop but even after adjusting resolution of my laptop to 1024 X 768 pixels my icons and text is not showed in right manner. All the icons and every message box along with text has larger size than usual which looks very awkward. Pls tell me how to get rid of this problem?

Best answer:

Answer by Oswin
Hi all,
I am running Lenny on an IBM Thinkpad X60 with a docking station, which
is attached to a 19″ Lenovo L191 screen. I have an Intel Mobile 945GM
graphics card and I’m by the “intel” driver. The native resolution of
my laptop screen is 1024×768, while the native resolution of my LCD
screen is 1280×1024.

My problem is that the resolution on my external LCD screen is is always
detected at 1024×768?
The monitor is always detected by the book (1280×1024) when I use Etch.

I can get xorg to switch the resolution to 1280×1024 by running this
command “xrandr –productivity VGA –auto” after I login. But then I need to
logout and back in again so the fonts look right.

Can someone help me fix this or is it a problem with xorg not detecting
my monitor correctly?

Here’s a snip of my xorg.conf if it will help:

—————————-Snip—————————

Section “Device”
Identifier “Intel Corporation Mobile 945GM/GMS, 943/940GML
Express Integrated Graphics Controller”
Driver “intel”
BusID “PCI:0:2:0″
EndSection

Section “Monitor”
Identifier “Generic Monitor”
Option “DPMS”
HorizSync 30-65
VertRefresh 50-75
EndSection

Section “Screen”
Identifier “Defaulting Screen”
Device “Intel Corporation Mobile 945GM/GMS, 943/940GML
Express Integrated Graphics Controller”
Monitor “Generic Monitor”
DefaultDepth 24
EndSection

Add your own answer in the comments!

Alejo

Tagged with: laptopLenovoresolution 

.

TECHNICIAN APPRENTICESHIP SCHEME (TAS)-LEVEL 4
Agricultural Technician
Aircraft Maintenance Technician
Building Services Engineering Technician
Computer Engineering Technician
Computer Network & ICT Support Technician
Construction Technician
Electrical and Electronics Engineering Technician
Industrial Electronics Technician
Jeweler/Silversmith
Laboratory Technologist
Mechanical Engineering Technician
Motor Vehicle Engineering Technician
Refrigeration and Air Conditioning Technician
Software Developer
Stone Heritage Technician (Mastru)
Telecommunications Technician

EXTENDED SKILLS TRAINING SCHEME (ESTS)

Beauty Psychoanalyst
Commis Chef-
Commis Waiter
Electrical Installer
Hairdresser
Mechanical Fitter
Motor Vehicle Mechanic
Painter and Decorator
Plasterer
Plumber
Printer
Restaurant/Bar Operations
Stone Heritage Craftsperson (Sewwej)
Stone Mason
Tile Layer
Vehicle Body repairer / Spray Painter
Welder and Fabricator
Woodworker

Best answer:

Answer by espbaum
if your talking about the Malta NY I know of then it’s simple. Any Job is a excellent job. I would be pleased with any job I may possibly get right now. It’s a matter of what you want to do and what you like to do. It’s a rough choice sometimes, but we all like to work. That’s what makes us different. It’s a personal choice.

Excellent Luck

Know better? Leave your own answer in the comments!

Alejo

Tagged with: apprenticemaltaprograms 

How can I repair my Laptop screen?


.

I picked up my laptop by the top half and it must dislocated some wiring or something,.. now the viewing screen messed up/barely viewable. How can I self repair this? Thanks.

Best answer:

Answer by Miagi99
if it is really dark then the inverter cable must be loose and you can gently tap the back side and see if it fixes it if not then you will have top open LCD panel and reconnect the cable.

What do you reflect? Answer not more than!

Alejo

 

.

It’s been a while since my last real SharePoint 2010 scripting post but we’re getting close to RTM so I figured I need to buckle down and play some catch up and get some long overdue posts published. So, continuing my series of posts on scripting the various services and service applications within SharePoint 2010 I chose that I would share something that I know a lot of people have been struggling with recently – scripting the SharePoint Foundation Search Service.

This one threw me for a bit of a loop because all the other services and service applications can be configured nearly exclusively by PowerShell cmdlets – this one even if has to be configured nearly exclusively by the object model. We basically have four cmdlets available to help with the configuration and unfortunately they’re not much help at all:

  • Get-SPSearchService – Income back an object representing the actual service
  • Get-SPSearchServiceInstance – Income an object representing a service configuration for the service
  • Set-SPSearchService – Updates a few select properties associated with the service
  • Set-SPSearchServiceInstance – Updates the ProxyType for the service

The main failing with these cmdlets is that you can’t set the services process identity, the database name and server or failover server, and you can’t trigger the provisioning of the service instances which is required for the service to be considered fully “started”. All of these things I can do through Central Admin but there’s no way to do it by any provided cmdlets – so how do we solve the problem? By getting our hands dirty and writing a boat load of code against the object model.

So let’s get started. As before we’ll use an XML file to drive the setup process:

As you can see the configuration file is pretty simple. We define two accounts that we’ll use, one for the process identity of the service and the other for the crawl account. There’s a few simple attributes for the database and some miscellaneous configurations and a list of all the servers in which the service should be started on.

Okay, let’s start digging into the actual speech. The first thing I do is load the XML file to a variable, $svcConfig, which I use throughout the function:

Line 1 loads the file into a System.Xml.XmlDocument typed variable and then I grab the <FoundationSearchService /> element and set that to the $svcConfig variable. Next I need to determine if the speech should continue on this server by checking the <Servers /> element to see if there’s a match for the current machine:

So at this top we know that we’re on a target machine so the first thing we want to do is use the Start-SPServiceInstance to start the Foundation Search Service:

The trick with this is that if we’re not by SharePoint Foundation then once the service is initially started it renames itself to “SharePoint Foundation Help Search” so I had to place a provision to look for one name or the other to allow this speech to be run multiple times and from multiple machines. Now that the service is started lets set a few variables that we’ll use throughout the rest of the speech:

We’ll use the $searchSvc and $searchSvcInstance variables extensively. Note that we’ll also need to repeat lines one and two at least a couple of times to avoid update conflicts as a result of timer jobs modifying those objects.

The next step will be to set the process identity for the service. We’ll go ahead and also get the crawl account information while we’re at it to avoid prompting for passwords in more than one location:

This is where things start to get fascinating. I use the Get-Credential cmdlet to return back the credentials of the user to use for the service but once I have that there’s no parameter on any cmdlet that will allow me to set the credential so I have to do it by the object model. I use the $searchSvc variable from earlier and edit the object returned by the ProcessIdentity property (after confirming that the value needs to be changed).

Once we have the process set we can go ahead and set the other simple properties on the service – fortunately the cmdlet Set-SPSearchService can really help us out with this one:

Alright, that was the simple stuff – now we have to deal with the database. The first step is to see if there’s already a database defined for the service and if it matches what we want. This is vital as we want to be able to run the speech more than once so we don’t want to just blindly delete and re-erect the database. The first bit of code builds a connection string by the SqlConnectionStringBuilder object (note that in PowerShell you have to use the PSBase property to access the properties on this object) and then compares that to what is now set. If a match is not found then the existing database is deleted and the search service updated:

At this top if the $searchDb variable is null then we want to go ahead and make a new search database:

I first make a new SPSearchDatabase object by calling the static Make() method and passing in the SqlConnectionStringBuilder object that was previously made. I then call the Provision() method to really make the database on the SQL server instance. Once it’s made we can associate the database with the service by setting the SearchDatabase property on the $searchSvcInstance variable. If an error occurs then I attempt to delete the database from SQL Server if it’s not yet associated with the service.

Now that we have our database provisioned we can go ahead and set the failover server:

Most of the logic here is just in determining whether or not to set the failover server. Basically you just call the AddFailoverServiceInstance() method of the SearchDatabase property (SPSearchDatabase) and then update the service instance.

We’re nearly there – we’ve set all the properties we can now we need to complete the provisioning process:

If the service instance is not now marked as Online (again, accounting for multiple runs) and the service instance we’re working with is for the current machine then we call the Provision() method on the service instance. If an error occurs provisioning the service then I try to set the status back to its previous value.

Only two steps left; First we need to make a timer job to trigger the search service instance to be provisioned on the other servers in the farm:

And finally, we need to set the ProxyType for the service instances so I loop through the <Server /> elements and call the Set-SPSearchServiceInstance cmdlet, providing the ProxyType attribute as defined in the XML:

Phew – we’re done! Let’s place it all together now – here’s the complete speech:

function Start-FoundationSearch([string]$settingsFile = "Configurations.xml") {    [xml]$config = Get-Make pleased $settingsFile    $svcConfig = $config.Services.FoundationSearchService

    #See if we want to start the svc on the current server.    $install = (($svcConfig.Servers.Server | where {$_.Name -eq $env:computername}) -ne $null)if (!$install) {         Write-Host "Machine not specified in Servers element, service will not be started on this server."return    }

    #Start the service instance    $svc = Get-SPServiceInstance | where {$_.TypeName -eq "SharePoint Foundation Search" -and $_.Parent.Name -eq $env:ComputerName}if ($svc -eq $null) {        $svc = Get-SPServiceInstance | where {$_.TypeName -eq "SharePoint Foundation Help Search" -and $_.Parent.Name -eq $env:ComputerName}    }    Start-SPServiceInstance -Identity $svc

    #Get the service and service instance    $searchSvc = Get-SPSearchService    $searchSvcInstance = Get-SPSearchServiceInstance -Local

    $dbServer = $svcConfig.DatabaseServer    $failoverDbServer = $svcConfig.FailoverDatabaseServer

    #Get the service account details    Write-Host "Provide the username and password for the search crawl account..."    $crawlAccount = Get-Credential $svcConfig.CrawlAccount.Name    Write-Host "Provide the username and password for the search service account..."      $searchSvcAccount = Get-Credential $svcConfig.SvcAccount.Name

    #Get or Make a managed account for the search service account.    $searchSvcManagedAccount = (Get-SPManagedAccount -Identity $svcConfig.SvcAccount.Name -ErrorVariable err -ErrorAction SilentlyContinue)if ($err) {        $searchSvcManagedAccount = New-SPManagedAccount -Credential $searchSvcAccount    }

    #Set the account details if different than what is current.    $processIdentity = $searchSvc.ProcessIdentityif ($processIdentity.ManagedAccount.Username -ne $searchSvcManagedAccount.Username) {        $processIdentity = $searchSvc.ProcessIdentity        $processIdentity.CurrentIdentityType = "SpecificUser"        $processIdentity.ManagedAccount = $searchSvcManagedAccount        Write-Host "Updating the service process identity..."        $processIdentity.Update()        $searchSvc.Update()    }    

    #It doesn't hurt if this runs more than once so we don't bother checking before running.    Write-Host "Updating the search service properties..."    $searchSvc | Set-SPSearchService `        -CrawlAccount $crawlAccount.Username `        -CrawlPassword $crawlAccount.Password `        -AddStartAddressForNonNTZone $svcConfig.AddStartAddressForNonNTZone `        -MaxBackupDuration $svcConfig.MaxBackupDuration `        -PerformanceLevel $svcConfig.PerformanceLevel `        -ErrorVariable err `        -ErrorAction SilentlyContinueif ($err) {throw $err    }

    #Build the connection string to the new database.    [System.Data.SqlClient.SqlConnectionStringBuilder]$builder1 = New-Object System.Data.SqlClient.SqlConnectionStringBuilder    $builder1.psbase.DataSource = $dbServer    $builder1.psbase.InitialCatalog = $svcConfig.DatabaseName    $builder1.psbase.IntegratedSecurity = $right    Write-Host "Proposed database connection: {$builder1}"

    [Microsoft.SharePoint.Search.Administration.SPSearchDatabase]$searchDb = $searchSvcInstance.SearchDatabase    $dbMatch = $fakeif ($searchDb -ne $null) {#A database is already set - if it's the one we expect then keep it, otherwise we want to delete it.        [System.Data.SqlClient.SqlConnectionStringBuilder]$builder2 = New-Object System.Data.SqlClient.SqlConnectionStringBuilder($searchDb.DatabaseConnectionString)        Write-Host "Existing database connection: {$builder2}"if ($builder2.ConnectionString.StartsWith($builder1.ConnectionString, [StringComparison]::OrdinalIgnoreCase)) {            $dbMatch = $right        }if (!$dbMatch -and $searchDb.DatabaseConnectionString.Equals($builder1.ConnectionString, [StringComparison]::OrdinalIgnoreCase)) {            $dbMatch = $right        }if (!$dbMatch) {#The database does not match the configuration provided so delete it.            Write-Host "The specified database details do not match existing details. Clearing existing."            $searchSvcInstance.SearchDatabase = $null            $searchSvcInstance.Update()            Write-Host "Deleting {$($searchDb.DatabaseConnectionString)}..."            $searchDb.Delete()            Write-Host "Finished deleting search DB."            $searchDb = $null        } else {            Write-Host "Existing Database details match provided details ($($builder2))"        }    }

    #If we don't have a DB go ahead and make one.if ($searchDb -eq $null) {        $dbCreated = $fake        try        {            Write-Host "Making new search database {$builder1}..."            $searchDb = [Microsoft.SharePoint.Search.Administration.SPSearchDatabase]::Make($builder1)            Write-Host "Provisioning new search database..."            $searchDb.Provision()            Write-Host "Provisioning search database complete."            $dbCreated = $right

            #Re-get the service to avoid update conflicts            $searchSvc = Get-SPSearchService            $searchSvcInstance = Get-SPSearchServiceInstance -Local

            Write-Host "Associating new database with search service instance..."            $searchSvcInstance.SearchDatabase = $searchDb            Write-Host "Updating search service instance..."            $searchSvcInstance.Update()

            #Re-get the service to avoid update conflicts            $searchSvc = Get-SPSearchService            $searchSvcInstance = Get-SPSearchServiceInstance -Local        }        catch        {if ($searchDb -ne $null -and $dbCreated) {                Write-Warning "An error occurred updating the search service instance, deleting search database..."                try                {#Clean up                    $searchDb.Delete()                }                catch                {                    Write-Warning "Unable to delete search database."                    Write-Error $_                }            }throw $_        }            }

    #Set the database failover serverif (![string]::IsNullOrEmpty($failoverDbServer)) {if (($searchDb.FailoverServiceInstance -eq $null) -or `            ![string]::Equals($searchDb.FailoverServiceInstance.NormalizedDataSource, $failoverDbServer, [StringComparison]::OrdinalIgnoreCase))        {            try            {                Write-Host "Adding failover database instance..."                $searchSvcInstance.SearchDatabase.AddFailoverServiceInstance($failoverDbServer)                Write-Host "Updating search service instance..."                $searchSvcInstance.Update()            }            catch            {                Write-Warning "Unable to set failover database server. $_"            }        }    }

    $status = $searchSvcInstance.Status#Provision the service instance on the current serverif ($status -ne [Microsoft.SharePoint.Administration.SPObjectStatus]::Online) {if ([Microsoft.SharePoint.Administration.SPServer]::Local -eq $searchSvcInstance.Server) {            try            {                Write-Host "Provisioning search service instance..."                $searchSvcInstance.Provision()            }            catch            {                Write-Warning "The call to SPSearchServiceInstance.Provision (server '$($searchSvcInstance.Server.Name)') failed. Setting back to previous status '$status'. $($_.Exception)"if ($status -ne $searchSvcInstance.Status) {                    try                    {                        $searchSvcInstance.Status = $status                        $searchSvcInstance.Update()                    }                    catch                    {                        Write-Warning "Failed to restore previous status on the SPSearchServiceInstance (server '$($searchSvcInstance.Server.Name)'). $($_.Exception)"                    }                }throw $_            }        }    }

    #Re-get the service to avoid update conflicts    $searchSvc = Get-SPSearchService

    #Make the timer job to update the instances for the other servers.foreach ($serviceInstance in $searchSvc.Instances) {if ($serviceInstance -is [Microsoft.SharePoint.Search.Administration.SPSearchServiceInstance] `            -and $serviceInstance -ne $searchSvcInstance `            -and $serviceInstance.Status -eq [Microsoft.SharePoint.Administration.SPObjectStatus]::Online) {            $classification = $serviceInstance.Farm.GetObject("job-service-instance-$($serviceInstance.Id.ToString())", $serviceInstance.Farm.TimerService.Id, [Microsoft.SharePoint.Administration.SPServiceInstanceJobDefinition])if ($classification -ne $null) {                Write-Host  "A provisioning job for the SPSearchServiceInstance on server '$($serviceInstance.Server.Name)' already exists; skipping."            } else {                Write-Host "Making provisioning job for the SPSearchServiceInstance on server '$($serviceInstance.Server.Name)'..."                $job = New-Object Microsoft.SharePoint.Administration.SPServiceInstanceJobDefinition($serviceInstance, $right)                $job.Update($right)            }        }    }

    #Set the proxy type for all the service instances.    $svcConfig.Servers.Server | ForEach-Object {        $server = $_        $instance = Get-SPSearchServiceInstance | where {$_.Server.Name -eq $server.Name}if ($instance -ne $null `            -and $server.ProxyType.ToLowerInvariant() -ne $instance.ProxyType.ToLowerInvariant) {            Write-Host "Setting proxy type for $($instance.Server.Name) to $($server.ProxyType)..."            $instance | Set-SPSearchServiceInstance -ProxyType $server.ProxyType           }    }}

One thing you should note is that I’m not setting the schedule for the service. This is because the timer job class that I’d need to use to set the schedule is marked internal thus making it impossible for me to set the schedule without by proposition.

As you can see we’re in a bit of a conundrum with SharePoint 2010 – scripting your installations is considered to be a best practice and you should strive to do so whenever possible but the level of complexity involved with scripting such simple things has made it prohibitively complex for the average administrator to do.

I recognized this issue the very first day I started working with SharePoint 2010 and to solve the problem I’ve been working on a product for ShareSquared called SharePoint Composer which will allow administrators, architects, and developers to visually design their SharePoint configurations and then build out the entire Farm by the model they make in the design tool. This tool will allow you to enforce your corporate standards by clearly documenting every configuration and building the farm based on those configurations in a single-click, automated way – all without having to know any PowerShell at all! Keep a watch here for more information about SharePoint Composer.

Note - I’ve not had a chance to test this in a multi-server farm so if anyone can give me some feedback about their experiences with it I’d momentously appreciate it.

Check it out:SharePoint Automation

Alejo

Tagged with: 2010FoundationPowershellsearchserviceSharePointstarting 

Answers Rating

  • joel j: on 10 February 2010 at the Mobile World Congress Steve Ballmer and Joe Belfiore shared...  Thumb up 0
  • Winston: But giving it to different vendors is the whole point of Windows Phone. Choice! If MS does it...  Thumb up 0
  • Not: Delete Kaspersky and install AVG. It’s completely free and works. As the other poster...  Thumb up 0
  • Jonathan: well you can get rid of the virus first for free by downloading the Kaspersky removal tool....  Thumb up 0
  • elmo: Different operating system. i used both before but really can’t find any different on...  Thumb up 0
© 2010 Computersplace.net