by

How to Fix: Verify that the critical User Profile Application and User Profile Proxy Application timer jobs are available and have not been mistakenly deleted

When provisioning a Project 2010 Server or a SharePoint 2010 server, if you are using the Service Pack 1 you will have an unpleasant surprise which is the User Profile Service misbehaving and potentially breaking your system. To fix that, the recommendation is to apply the August 2011 Cumulative Update.
However soon you will notice that every hour or so, your SharePoint Health Analyzer will start bombarding your screen with this error:
 
sharepoint-2010-review-problems-and-solutions
 
That is in fact an issue introduced with the August CU. It is a known issue and MS is working on that. Chances are there is nothing wrong with your UPS. That's very likely a false positive. They are just timer jobs which are being deleted without any intervention, but because a bug was introduced by the cumulative update package.
So to avoid that message keeps showing up and drawing your attention, you have to set SharePoint to automatically try to fix the issue. Follow these steps.
In the Monitoring section, in the Central Admin, click the link Review Rule Definitions
sharepoint-2010-monitoring-health-analyzer
A list of all the current job definitions will be listed by group. Browse the Configuration group and find the rule called "Verify that the critical User Profile Application and User Profile Proxy Application timer jobs are available and have not been mistakenly deleted"
 

health-analyzer-rule-definitions-configuration-sharepoint-2010
Click the rule and edit the item selecting the checkbox Repair Automatically, then save.


edit-health-analizer-rules-definition
Now, every time this message comes up SharePoint will try to fix the issue automatically creating the missing timer jobs

By

by

The New Microsoft Logo Done Using ONLY CSS

That’s pretty hard-core UI , the new Microsoft logo done entirely with CSS. No images, no convoluted HTML…just plain CSS.
logo {
    font: 60px "Segoe UI";
    color: #747273;
    line-height: 1.5em;
    padding-left: 1.7em;
}

logo:before {
    content: '\2006';
    position: absolute;
    height: 0.095em;
    left: 0;
    box-shadow: 0.35em 0.35em 0 0.25em #f8510c, 1.05em 0.35em 0 0.25em #7eba00, 0.35em 0.97em 0 0.25em #00a3f4, 1.05em 0.97em 0 0.25em #ffba00;     
}



If you create an html page with:

<logo>Microsoft</logo>


you will see this.ms


You can play around here for more results: http://jsfiddle.net/ 




superedge-css


Note that the logo increases/shrinks according to the length of the text


google-css


apple-css


( yeah, I know…doesn't look good on Apple Smile )


Go ahead and have fun!

By

by

Project Management: Duration, Scheduling, Resourcing

Before the project starts, a schedule is created. A schedule determines the macro view of the project, which is then broken down into smaller pieces of work. The person responsible to handle this dynamic is called Scheduler.
The scheduler with all these pieces then creates a work breakdown structure, aka. WBS, which is the wallet for the effort estimated for each task. Then we find the people, then allocate them and then we get moving.
This is not news, we've been doing this for centuries. Just look at the engineering projects. We've been building cathedrals, cities, bridges, castles for many years. We do have a huge experience and materials when the subject comes to manage engineering projects.
With so much experience and materials to build upon, we still find ourselves having an incredible hard time trying to answer one question : how many tasks should we have in a schedule and how long each task should be?

The Art of Estimation
Often we see project schedules that are just plain convoluted and project managers frustrated to isolate the issue with the tasks in the project schedule because they far too macro. Some projects lasts decades, like the construction of the LHCI; some projects are just a few days. But regardless of the length, how to handle a schedule with hundreds, thousands of items?
Different industries, require different project management strategies, that's one of the primary challenges of the project: Delivering on time, on budget. Let's have a look at an IT project. Here a few samples on how to approach the scheduling and task decision process:
IT projects: IT is a very new category of projects; unlike engineering projects the experience is being built fairly recently, which might explain why so many IT projects fail in comparison with older industries.
  • Phases: IT projects normally follow a very successful model, which is a design phase, a development/build phase, a quality assurance/testing phase, a documentation phase, and a deployment/release
  • Duration: The projects are measured in weeks or months; which makes the task to allocate work a bit easier: days or weeks.
  • Resourcing: Resource allocation comes down to a person/unit. If you drink the Agile-koolaid you should try to think about the resources and tasks using  short sprints. Maximum 2 weeks sprints.
Engineering/Construction Projects: This is what the humankind knows how to do it best. Big scale projects.
  • Phases: Just like regular planned projects but having an engineering phase at the beginning. This is a very peculiar group, because despite our vast historic experience, this moment always covers one or many aspects that has never been done/thought/designed before.
  • Duration:  Engineering projects are visualized in months, years...lasting at minimum weeks and at maximum months.
  • Resourcing: Expect to see thousands of tasks in this type of project. So the Scheduler here will have to manage the units person/skill level, rather than person/day. These allocations can become quite complex and often there is a needed to create smaller projects and group them into a program to ease the management and delivery aspect.
Which these concepts in mind we will discuss now how long should be a project.
Divide to Conquer
Let’s imagine an engineering plant location move project. The company bought new offices in another location and needs to phase-out the old offices while transitioning to the new one. First we need to identify the macro-objective, then after that experience show us that the breakdown in smaller pieces are a good approach. Not only because they are more visible to manage and to handle but also because their deliverables can potentially be closed down independent of each other.
pm
you determine the star and finish of the project. then you breakdown in smaller tasks (A, B, C, D, for example), then you try to group these tasks in logical phases (1, 2 and 3, in our case) and for each phase you try to break them in smaller micro tasks. How many micro tasks is up to the manager or responsible for the delivery but in my experience I try to avoid creating less than 5 tasks and more than 15. This is not a rule of guide, it is just the number I personally feel confortable and that has brought me most successes.
Additionally, every time a decision needs to be applied to a task try to get into the habit of asking yourself: can this task be broken down into smaller tasks? Is this going to impact the scope? the main reason for that is because generally some tasks look very simple in the schedule but effectively can become quite complex during the execution…for many reasons. You can’t foresee which ones will be but you can forecast their likelihood of happen.
And yet…
bear in mind that despite all our previous successes and our amazing management skills… some projects will fail, and sometimes nothing can stop that happening. For these cases the same old adage still applies: visibility, visibility, visibility. Make a deliverable visible as much as you can, use whatever powers you have to propagate this visibility. You cannot stop a project from failing, but you can fail gracefully (to use a term from IT management). As long as everyone is aware of how the project is going and we are doing the best we can of the situation everyone is accountable.
The plan is not important, but planning is important.

By

by

What is BYOD and Why Some Companies are Against It ?

BYOD (bring your own device) is one of the big topics being discussed now in the organizations. The main questions arise from:
  • is our organization mature/prepared enough to allow external devices coming into our ecosystem?
  • is our workforce trained and educated enough to understand their possibilities, actions and consequences?
  • is our overall culture and strategy aligned with the new world of BYOD?
These are extremely thoughtful questions and if governance around this topic is not done with due diligence, these policies can swiftly backfire.
What's the point in blocking Facebook, twitter etc. when clearly your employees likely have a smartphone in their pocket and will use these services anyway?
Having said that, I believe we need to understand the motivations and the cost x benefits that BYOD would bring to an organization.
For example, it is common practice that content created on company's computers are intellectual property not of the employee but the company itself; however what are the implications if the employee creates his material in a personally own laptop? who has the IP of the production? you see...that's already raising big questions and yet this is not even the tip of the iceberg. The lines between IP and behaviour are getting blurred by the minute.
and here's the raw truth. 67% of the people are already using it and the majority of people is in favour of bringing their own devices to work anyway.
byod

How did the BYOD thing started?

We live in a social world, and the technology reflected this in many ways, mimicking across the virtual world. Now we have Facebook, tweeter etc. So when people went to work, they felt the need to adjust their new virtual persona across the boundaries as well. People don't want to wait until 6PM to live their online personas, they want full experience, control. So, BYOD started from the employee/worker's perspective.
The next step was then to use the devices they felt more confortable with. Your company might have a preferred mobile device such as BlackBerry for business, HP for laptops, encrypted USB drives for data transfer. And more often than not, these are pushed via company policies. However, some workers did not like BlackBerry, they want to use iPhones, they prefer using a Samsung Series 9 instead of HP, and they prefer to keep their stuff in pocket hard disks. People were then using the company's recommended devices and side-by-side using their own preferred ones. Almost like a parallel reality.
And for a whole new generation which was born with a myriad of technological options, being able to choose their own hardware and software platforms makes them more satisfied. More satisfied workers likely makes more productive people. More productive people increases the chances of a project success. Project success makes companies happy. Win-Win for companies and workers.
Sounds like simple joining the dots. It isn't.
Research has shown more majority of organizations are against BYOD  , and in fact some organizations actually ban workers bringing their own devices to work. But don't blame the corporations for it, some of them have very good points to back their policies.
 
Look at this research and you can see that almost 60% of U.S. IT professionals view mobile devices owned by employees as posing the greatest risk their organization face . If you work in the healthcare or finance, this is even more real.
Mainly this happens because some industries are highly regulated by very strong code of practices when it comes to sensitive and privacy data such as company and customers. These industry regulators stand a very strong stance and it an organization is found breaching some of their obligations they can easily face fines and some cases even jail.
See now? the iceberg tip starts to show up and the conversation is not focused anymore just on gadgets but how a business is run and their obligations with the market, government and citizens.
Overall, all this is great. It opens up the canvas for discussion around the pros and cons of adopting BYOD.
Just accepting BYOD as the coolest thing ever at the workplace is not the smartest route. As in any project, all the risks and benefits need to be weighted.

By

by

How to Get AD Forest in PowerShell

Here’s another small PowerShell script useful for your administration. It returns the AD object for a specified forest; the forest in the current context is returned  if nothing is passed as parameter. This is also compatible with Office 365.
function Get-Active-Directory-Forest-Object ([string]$ForestName, [System.Management.Automation.PsCredential]$Credential)
{    
    #if forest is not specified, get current context forest
    If (!$ForestName)     
    {        $ForestName = [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().Name.ToString()    
    }        

    If ($Credential)     
    {        
        $credentialUser = $Credential.UserName.ToString()
        $credentialPassword = $Credential.GetNetworkCredential().Password.ToString()
        $adCtx = New-Object System.DirectoryServices.ActiveDirectory.DirectoryContext("forest", $ForestName, $credentialUser, $credentialPassword )
    }    
    Else     
    {        
        $adCtx = New-Object System.DirectoryServices.ActiveDirectory.DirectoryContext("forest", $ForestName)    
    }        

    $output = ([System.DirectoryServices.ActiveDirectory.Forest]::GetForest($adCtx))    

    Return $output
}



By

by

How to Change Currency from Windows Store in Surface, Windows RT

if you just received your Microsoft Surface RT, when going to the Windows 8 app store you should see the prices in your local currency. In my case I saw the prices in British Pounds…living in Australia it does not make much sense…so if you come across this, here’s how to fix:

 

at the Start Menu, type ‘location’. and select the option ‘Settings’ and ’Change location’

 

in the next screen, choose your correct location. In my case, my Surface was configured to ‘United Kingdom’, so I just changed to ‘Australia’

click OK and voila! all set. If you go to the Windows Store again you should see the prices adjusted to your correct currency.

By

by

How to Populate a ObjectDataSource from a Dataset

To use datasets for data manipulation and grid displaying is great in a SharePoint environment.  
The .NET framework offers many displaying controls for that task amongst them is the SPGridView. Grid views are excellent for presenting data because people like to see things organized in grids. it is almost natural to our eyes and project stakeholders love grids because they are like the heart and soul of a project management report.
If you are using SharePoint it is pretty straightforward to instantiate a SPGridView control and then use the datasource property to point to a dataset.
So let's say, you want to display all the team sites or site under a specific URL. you can populate a dataset with the rows and bind to the grid.

sharepoint-objectdatasource-spgridview-dataset-1
The only issue here is the network traffic. Every time you perform a postback you will force the dataset to be loaded and then the grid will just change the page displayed, but under the hood the whole dataset was there populated. If you have hundreds of sites and these are being accessed by multiple users it can potentially be using unnecessary bandwidth. ( note: There are strategies to place around this mechanism like using cache objects and persisting information in the viewstate, but we wont be discussing them here )
sharepoint-objectdatasource-spgridview-dataset-3 
 
Would not be great if we could have a out-of-the-box structure good enough to allow fetching the necessary records for a specific page?
For that we can use the ObjectDataSource control.

sharepoint-objectdatasource-spgridview-dataset-2
You can read a lot about the usages of the ObjectDataSource all over the net, but if you are like me a big fan of datasets and you have been dealign with datasets objects in many legacy applications, you want to just want to have an easy way to migrate your datasets to ObjectDataSources.
Unfortunately, the ObjectDataSource control does not have a property like objectDataSource.DataSource neither it has a LoadFromXml or Load(Dataset)...
So how do you do?
Here's how I find it: using reflection.

ObjectDataSources do not have a property to perform something like MyObjectDataSource.DataSource=MyDataSet, but it does have a constructor that allows you to parse classes and extract data methods.
So let's say you have a scenario like this in a webpart
        /// <summary>
        /// Called by the ASP.NET page framework to notify server controls that use
        /// composition-based implementation to create any child controls
        /// they contain in preparation for posting back or rendering.
        /// </summary>
        protected override void CreateChildControls()
        {
            base.CreateChildControls();
            Grid = new SPGridView
                           {
                               AutoGenerateColumns = false,
                               AllowSorting = true,
                               AllowPaging = true,
                               AllowFiltering = true,
                               PageSize = 10
                           };
 
            Grid.DataSource = MyDataSet.MyTable;
            Grid.DataBind();
        }

To convert this to an ObjectDataSource you then do this...
        /// <summary>
        /// Gets the data table for object source.
        /// </summary>
        /// <returns></returns>
        public DataSet GetDataTableForObjectSource()
        {
            // do whatever you want to do here and
            // return the table with the data
            return MyDataSet.MyTable;
        }
 
 
        /// <summary>
        /// Called by the ASP.NET page framework to notify server controls that use
        /// composition-based implementation to create any child controls
        /// they contain in preparation for posting back or rendering.
        /// </summary>
        protected override void CreateChildControls()
        {
            base.CreateChildControls();
 
            // in this constructor specify the type name, the class name and
            // the public method inside this class where the object datasource will retrieve the data
            // make it a signed assembly for security reasons.
            var edgeDataSource =
                new ObjectDataSource(
                    "MyNamespace.MyClass, MyNamespace.MyClasss, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ce8ab85a8f42a5e8",
                    "GetDataTableForObjectSource") {ID = "EdgeDataSource"};
 
            Grid = new SPGridView
                           {
                               AutoGenerateColumns = false,
                               AllowSorting = true,
                               AllowPaging = true,
                               AllowFiltering = true,
                               PageSize = 10
                           };
 
            // do not use DataSource property. MUST USE DataSourceID with the control name
            Grid.DataSourceID = "EdgeDataSource";
 
            // do this before the databind
            Controls.Add(edgeDataSource);
            Controls.Add(Grid);
 
            // bind the objects and execute the call
            //specified in the ObjectDataSource constructor
            Grid.DataBind();
        }
 
Cute trick!
So there you go. To migrate, load, or populate ObjectDataSources using DataSets, all you have to do is to wrap the data returned in a public class and pass the method information to the ObjectDataSource constructor. I hope this helps you guys out there using ObjectDataSources.
Now go coding. Happy paging, happy filtering, happy caching!

By

by

Duet Enterprise: Derived Key Token Cannot Derive Secret

In the process of connecting SAP and SharePoint, one of the steps is to ask the SAP Administrator to provide to provide a whole bunch of BDC models. These models will then be incorporated into the SharePoint BCS and then make the SAP tables available in the SharePoint site.
duet-enterprise-sharepoint-sap
Sounds simple, except for the fact that, more often that not even if you follow the steps to the letter, one might come across the following error message:
security configuration error: derived key token cannot derive key from the secret
This is caused mainly by SAP configuration (or lack of it), but do not put the blame on them...getting Duet to work sometimes it is a daunting task.
How to track that down?
Listen to the network: well, one of the things you can do it to see what's going on is using the good old network sniffing tools. I suggest to you the Network Monitor, but feel free to use what ever you want. By listening to the traffic flowing from SharePoint to SAP you will have a clue it the connection is established.
duet-enterprise-sharepoint-sap - 2
If you hear nothing, this lead to the conclusion that BCS might not be connecting at all. Check the SAP endpoints, find out how the HTTPS port is configured. Do not assume SAP is using the default HTTPS port number. The best way to find this out: open the endpoint URL with your favourite browser.
If you can browse, the issue is likely security. Check the security configuration of the Duet accounts involved. Check the SSO accounts.
If you can not browse, check if there are any firewall blocks between the SharePoint farm and the SAP gateway servers.
  duet-enterprise-sharepoint-sap - 3
if there are no devices or security rules blocking the network connection then we must go to the mythic land of the SAML.
You see…for Duet Enterprise to work , the endpoint requires that the SAML issuer configured in the SAP side must be correct. If it is not, this will result in a token issued incorrectly, which will then reflect in the BDC schemas exported from SAP, and since the schemas are going to be generated with different keys, the BCS models and calls to endpoint won't work. The fix is in the middleware, the SCL.
duet-enterprise-sharepoint-sap - 4
This used (maybe still is...) a very tricky thing because the only way to fix this is dealing with XML manually (I know...sorry for you in advance). On a positive note, I understand that in Duet Enterprise FP1 there is an automated tool, but I haven’t be able to work with FP1 yet.
If you don't have access to this XML tool to “spot the not-right”, I suggest you to try these steps:
duet-enterprise-sharepoint-sap - 5
  1. If you see the KeyType element, try to change to PublicKey. (check the WSDL endpoint exposed by the SAP)
  2. Remove all BCS definitions from SharePoint
  3. In SAP, regenerate all BDC definitions.
  4. Reimport them all into SharePoint
Every Duet Enterprise project I've seen was a success so far, however nobody said it is always easy.

By

by

Test Drive: Xbox SmartGlass on Windows 8

If you have installed the new Windows 8, you will notice there is an application called Xbox SmartGlass. SmartGlass at first seems just like a regular app that talks about movies etc., however it integrates completely with your Xbox experience. Here’s how to setup your SmartGlass.
11
In your Windows 8 Start menu, tap the Xbox SmartGlass application.
Untitled
Your Windows 8 device will try to connect to the Xbox console. Make sure you are connected to the internet and your Xbox Live account is on.
2 3
In a few seconds the two devices will start trying to “talk” to each other. Once the connection is established, your windows 8 notebook or tablet will be effectively part of your Xbox ecosystem. Like a remote control.
From your tablet, now you can access to the Xbox 360 Dashboard. If you have a 360 dashboard in your console you will notice that it is not quite exactly the same look of your Xbox, but it definitely has all the functions, just that they are adapted to the tabled.
4 5
Your tablet or notebook becomes truly a Xbox controller. Swipe your fingers across the screen and you see that your Xbox will respond to it. In a more detailed view, you can see how the surface of your tablet is configured as a SmartGlass controller. We even have access to the typical controller buttons.
7 9
Now one of the coolest things. If you have Xbox applications like Vevo, Foxtel on Xbox etc. You can control and watch movies from it. In this case I am playing the movie Gattaca.
but wait, there is more! Microsoft went one step ahead. Look that in your SmartGlass is able to retrieve and display detailed information regarding the movie. The device I am using is not a Windows 8 “official” tablet. but the expectation is that we will be able to find more information about the movie, characters, actors as we watch and even streaming the movie to the tablet…making the whole media experience superb! You can potentially leave your room and continue watching the movie in the tablet.
Another great feature is that SmartGlass is a “dockable” application, so you can continue using your Windows 8 environment for work, editing Office documents, browsing the internet and at the same time keep watching the movie in the left side of the screen.
10
All in all, Windows 8 is amazing so far and Xbox will definitely become more than just a gaming console. I can’t wait to get my hands in the first Microsoft Surface and try all these things. Have a look at the video demoing the Xbox SmartGlass

Cheers,

By

by

How To Count How Many Pages in SharePoint Site Using PowerShell

Some tasks you don't need to go ask the developers to create a feature for you. Don’t worry about them.
Again, here’s another script for the casual SharePoint Administrator, Developer or Project Manager that does not require much work or knowledge of SharePoint. How many pages a site has? Let’s go to the bits. You can use this little script below:

function count-items-by-site-by-list-type($URL, $BASETEMPLATE) 
{     
    $site = Get-SPSite $URL     
    $totalItems = 0     
    foreach($web in $site.AllWebs)     
    {         
        $lists = $web.Lists         
        for ($i=0; $i -le $lists.Count – 1; $i++)          
        {             
            $list = $lists[$i]             
            if ($list.BaseTemplate -eq $BASETEMPLATE)             
            {                 
                $totalItems = $totalItems + $list.Items.Count             
            }         
        }             
    }     
    $site.Dispose()     
    write-host $totalItems 
}




This script counts all the items for a given list type. So for example, if you want to count how many pages there are in the following http://www.myProjectSite.com you should do this:


count-items-by-site-by-list-type http://mySite/ "WebPageLibrary"


You can get any result; project items, total of tasks, total of persons, total of documents…anything. The possible values for the $BASETEMPLATE parameter can be found in this link.


What if I have pages not only in page libraries but across any library?


Then you can use this modified version. Remember this code will run a bit slower so I’ve put some visual clues as heartbeat indicators.



function count-pages($URL)
{    
    $site = Get-SPSite $URL    
    $totalPages = 0    
    foreach($web in $site.AllWebs)     
    {         
        write-host        
        write-host "Processing:" $web.Url        
        $lists = $web.Lists        
        write-host "(lists found ):" $lists.Count        
        write-host "-------------------"        
        for ($i=0; $i -le $lists.Count – 1; $i++)        
        {             
            try            
            {                
                $list = $lists[$i]                
                for ($j=0; $j -le $list.Items.Count – 1; $j++)                
                {                    
                    $item = $list.items[$j]                    
                    if ( $item.Url.ToLower().EndsWith(".aspx") )                    
                    {                        
                        $totalPages++                        
                        write-host -fore green -back green " " -nonewline                    
                    }                
                }            
            }            
            catch                
            {                
                write-host -fore red -back red " " -nonewline            
            }        
        }    
    }    
    $site.Dispose()    
    write-host    
    write-host "----------------------------------"    
    write-host "total pages found--->" $totalPages
}



Cheers,

By

by

How To: Fix relative broken links in SharePoint (using PowerShell)

Scenario: There is project website in the production environment. How can we replicate that same environment for a test/development environment?
One of the options would be to backup and restore the whole site via SharePoint granular backup. However if you have a domain name specific for test (something like http://myprojectTEST.com) then you have to adjust the links that will likely come broken.
sharepoint-broken-links-migration_thumb[2]
The PowerShell script below address this case. It works similar to a string replace; the difference here is that it works in the navigation links.
function fix-quicklaunch-links([string]$URL, [string]$oldString, [string]$newString) 
{ 
    $errorFileName = "c:\temp\fix-quicklaunch-links-ERROR.txt" 
    $successFileName = "c:\temp\fix-quicklaunch-links-SUCCESS.txt" 

    $site = Get-SPSite $URL 

    $totalWebs = $site.AllWebs.Count – 1
    foreach($web in $site.AllWebs) 
    { 
        Write-Host 
        Write-Host -fore white -back blue "Processing web: " $web.Url 
        $nav = $web.Navigation 
        $quicklaunch = $nav.QuickLaunch 

        $totalQuickLaunch = $nav.QuickLaunch.Count - 1 
        for ($i=0; $i -le $totalQuickLaunch; $i++) 
        { 
            $mainlink = $quicklaunch[$i] 
            $linkurl=$mainlink.Url 

            if ($linkurl.Contains($oldString)) 
            { 
                try 
                { 
                    $mainlink.Url = $linkurl.Replace($oldString, $newString) 
                    $mainlink.Update() 
                    write $linkurl | Out-File -filepath $successFileName -append 
                    write-host -fore green -back green "." -nonewline 
                } 
                catch 
                { 
                    write $linkurl $_.Exception.Message | Out-File -filepath $errorFileName -append 
                    write-host -fore red -back red "." -nonewline 
                } 
            } 
            $totalChildren = $mainlink.Children.Count - 1 

            for ($j=0; $j -le $totalChildren; $j++) 
            { 
                $child = $mainlink.Children[$j] 
                $childurl = $child.Url 

                if ($childurl.Contains($oldString)) 
                { 
                    try 
                    { 
                        $child.Url = $childurl.Replace($oldString, $newString) 
                        $child.Update() 
                        write $childurl | Out-File -filepath $successFileName -append 
                        write-host -fore green -back green "." -nonewline 
                    } 
                    catch 
                    { 
                        write $childurl $_.Exception.Message | Out-File -filepath $errorFileName -append 
                        write-host -fore red -back red "." -nonewline 
                    } 
                } 
            } 
        } 

        $web.Update() 
    } 

    $site.Dispose() 

    $finaldate = Get-Date 
    write-host 
    write-host -fore white -back blue "End of processing ("  $finaldate ")"
}
 





so if you are migrating from http://myprojectsite to http://myprojectsiteTEST you would call the function as:


fix-quicklaunch-links “http://myprojectsite” “http://myprojectsite/” “http://myprojectsiteTEST/”


The script will run across the site you specify in the parameters and it will traverse all the sub sites and navigation links under it. At the end it will generate 2 log files in the c:\temp folder with the errors and successes during the process.


I hope it helps someone with this issue.

Cheers,

By

by

How To Create Cascading Dropdowns SharePoint 2010

Scenario: You want to be able to add items to a list where the values of the “dropdown 1” are dependent on the selected “dropdown 2” value. As in the figure below.
1

Unfortunately that’s not an out of the box feature in SharePoint, however you can achieve that with a mix of jQuery and Content Management.
It is not complicated and if you follow these instructions, you don’t even need jQuery background to achieve it. The first step is to create 2 lists: one for the parent values (in our sample, Countries) and one for the children values (in our sample, cities)
In the countries list, leave the Title column to be the country name.
2
In the cities list, leave the Title column to be the city name; Additionally, create a new column called Country which will map to the same values you will enter in Title column of the country list. From now on, let’s refer to this list as a Relationship List.
3
Now, in the main form create 2 linked columns: One pointing to the Title column in the city list and the other pointing to the Cities column in the Cities list (the relationship list)
In our sample, the column linked to the countries list is called CountryLookup.The column linked to the cities will be called CityLookup. Below you see them and their definitions:
4
5
6
Now comes the part 2, when we will use the jQuery engine to power our solution. You will need to download the jQuery library and the SPServices library.
Place these files in a library which your site has access.
7
Now, in your main list we are going to modify the way the add new items to the list works. If you never done that, not a problem, you will see that’s very easy. In the list ribbon, choose the option to edit the Default New Form.
8
The form below will appear. Click add a web part link and place there a content editor web part.
9
In the content editor, add the code below. Do not add as text, make sure to add as HTML.

<script language="javascript" src="/js/jquery-1.8.0.min.js" type="text/javascript" />
<script language="javascript" src="/js/jquery.SPServices-0.7.1a.min.js" type="text/javascript" />    
<script language="javascript" type="text/javascript">     

    $(document).ready(
    function()   
    {             
        $().SPServices.SPCascadeDropdowns(           
        {             
            relationshipList: "Cities",  
            relationshipListParentColumn: "Country",  
            relationshipListChildColumn: "Title",                 
            parentColumn: "countrylookup",  
            childColumn: "citylookup",  
            debug: true
        });
    });
</script>




Save the form and that’s it. Try to add a new item to the list and you will see that when you select the country dropdown, the cities will be automatically updated to reflect only the cities that match the country.


Cheers,

By

by

How To: Annual Performance Indicators

I was trying to find some good metrics to use as annual review for people. I know, I know...annual review can be a drag sometimes but this is the process, this is the rule and we have to abide to it. After all, think about it: it is for our own improvement. If you are relatively new to the process. It can be difficult sometimes to find KPIs to measure people performances.
So my line of thought was to first identify potential in people, and the easier for me was by comparison. I sit down during the last EPL match interval over the weekend and wrote down a few points that might offer me some clue on how to achieve this. After I found the potential indicators, I then cross-check this with someone experienced and insightful. (in my case, I used my mother's advices)
A few things were left out, a few things she suggested to be included. What you read here is not a definitive list but just a few points to help my task to be more manageable..of course I am sharing this hoping that it also help others during their annual review process.
The Fascination Indicator
My mom, for instance, she's a great leader. Don't ask me why or how, but people just follow her. People are always sitting around her and listening when she speaks. Including people that happens to just have met her soon realize how leading role in conversations. I think one of the key things to measure in leaders is their ability to relate to our dreams/aspirations. Somehow, leaders can identify what makes us tick and drive that force ahead. The leader might not even believe in our dreams but knows that it is important for the dreamer and that positioning sends a powerful message. "I might not agree with you but you know what, I understand you and I can help you make that happen and at the same time aligning it to my things"
The "What are you doing?" Indicator
Great leaders and great managers share something in common: both know what they wanted to do. The difference is that leaders know how to get others to do things, by sending a message of importance. If people don't know the reasons why they do things and what they are doing, they wont wear the team's jersey.
ok...so if I elaborate a bit more on this I think we can say that leaders know how to tell people what to do, not how to do. ( Maybe great managers know the 'how to do'? )
The Innovation Indicator
Great leaders encourage people to think and to innovate, to be creative. Great leaders are also not necessarily the most skilful, to be honest most of the great leaders I've known are average technically but exceptional in 2 or 3 facets. To this point, I would like to think that excellence is required, not perfection. One can't be be perfect, but one can aim at that being excellent.
 
The Care Indicator ("our hopes and expectations, black holes and revelations")
We all know that, as individuals, we work very hard for the customer satisfaction. Most of us have already a great deal os successes and maybe a few failures in our belt (failures are important and I will write about this later on). Important question here is: Are you being taken care of? Are your strengths and weaknesses being recognized?
The Humble Indicator
That's a hot topic. Every now and then I come across people who says this is NOT an important aspect of life. If you think it is not, I completely understand your position...however this post is mine, so I am going to count it as a valid point :)
Try to think about the moments when all the glory and joy and smiles were shared with you as a team. Think about the winning moments. The humble people and successful people tend to share all their pie with everyone. not sure why, but I like to believe that no one can do anything alone ( again, another hard topic...but bear with me on this one, please ) and if everyone is happy in the final, everyone will want to have another victory like that.
The Character Indicator
Being honest, truthful, accountable. He was dependable. When he gave you his word, you always knew you could count on it. He didn't cheat. He didn't try to find the easy way out of a tough situation. He didn't waffle on his principles. He was not inflexible, but there simply were limits that he wouldn't cross.
The Motivation Indicator ( "Come with me if you want to live" )
We earthlings do things because we want to do them. I sometimes do things because I expect something else to happen, either be a good feedback for my annual review... or record a podcast with no experience at all..just because I want to have the experience. Whatever the reasons are, at the heart of it is motivation. Is the person you are thinking a motivator? does he makes you think about things you haven't considered and having a go at it?
The Likeability Indicator
Both managers and leaders share this same aspect, both are very likeable people. They must be. Teams depend on it. Selling ideas to the masses. People needs to be approachable and likeable in order to sell their pitch to others.
The Time Management Indicator
Another good point to note is the time management aspects. Time is the most valuable asset in our lives. People who genuinely cares about you spend quality time. Think about those monthly 1:1 meetings and how do you feel before the meeting and after the meeting.
The Gel indicator
To "gel with someone" is probably the #1 indicator of the likeability and leader relationship. When engaging in a conversation both of you speak at the same speed? Do you mirror gestures? when someone smiles, does he/she looks away from you or keep face contact?
I am open to discussion, to elaborate the points, to take in other suggestions. I see this as a collaborative exercise and I hope it can be helpful to you, reader, somehow.

Cheers,

By

by

Melhor cidade do mundo para morar

Todos os anos em Agosto/Setembro a revista Economist Intelligence Unit distribui o relatorio "World’s Most Liveable City”, as melhores cidades do mundo para morar. Em 2012, 140 cidades foram “entrevistadas” e mais uma vez Canada e Australia dominaram as 10 primeiras posicoes. Na verdade somente Viena conseguiu entrar na lista fora desses dois paises.
O preco do relatorio: quase $6000, obviamente nao vou pagar para escrever um post, mas consigo saber quais sao os macro-criterios para a eleicao:
  • Cidades de tamanho medio (entre 1-3 milhoes)
  • Cidades com baixa densidade populacional
  • Cidades localizadas em paises economicamente ricos.
A explicacao para somente incluir paises ricos e’ que significa que eles podem oferecer excelentes atividades familiares, de graca ou a baixo preco, sem afetar indices de criminalidade ou carga na insfraestrtura. Ou seja, dificilmente um pais da America Latina vai figurar bem nesse ranking. A nao ser que venhamos realmente a virar uma nacao economicamente rica. A cidade da America Latina mais bem colocada e’ Santiago, Chile (#63)
O Meu Ponto de Vista
NYC, Paris e Londres NAO estao na lista dos melhores lugares do mundo para viver…ou melhor, estao…mas la no meio/final da lista. Pergunte para qualquer pessoa que more em Sydney, Toronto etc e voce vai escutar que todos eles facilmente deixariam suas cidades para viver em NYC, Paris, Berlin etc.  Essas sao cidades verdadeiramente globais, com um universo de eventos todas as semanas e para todo tipo de publico. Entretanto estao rankeadas como “not-so-good to live”.
Pergunte ao The Economist porque e vao te dizer que elas tem indices de criminalidade mais alto, infraestrutura mais carregada etc.
Mas quem visita/mora nessas cidades nota que:
  • Sim, tem criminalidade mais alta, mas mesmo assim ainda e’ extremamente baixo comparado com o resto do planeta. (afinal de contas, estao comparando criminalidade com Vienna..).
  • Sim, tem metros e onibus mais lotados; mas mesmo assim ainda sao muito melhores do que a grande maioria do mundo. Os services funcionam, na hora, e 24 horas por dia.

Essas cidades de baixo ranking, sao extremamente desejadas no mundo todo (mas nao de acordo com a revista Economist) e pelo menos eu moraria facilmente nelas mesmo com esses “problemas”. Outro fator e’ que eu por exemplo nao conheco ninguem que tenha migrado para paises como o Canada e tenha ficado la por mais de 5 anos. ( a nao ser que tenha casado com Canadense, migrado com familia extendida etc )
Porque o Ranking Nao Reflete isso?
Obviamente tem algo faltando nessa equacao. Essa lista rankeia as cidades mas aparentemente nao leva em consideracao o nivel de felicidade social em viver perto de centros onde “acontecem” coisas.
Este e’ um post em construcao. Vou refletir um pouco mais nesse topico e atualizarei aqui acordo com que as ideias me ocorrem.
Talvez o indice nao serve para capturar a qualidade de vida urbana para alguem que e’ realmante morador da cidade e sim do visitante ocasional ou temporario. Eu sempre falei que nao dou muita confianca para quem visita lugares a passeio e fala “tal lugar e’ assim, assim e assim. Adorei”… convenhamos, de passeio, quase todo lugar e’  otimo.
Ja quem mora no lugar, tem uma perspectiva diferente do que e’ um lugar agradavel. Variam de qualidade de ensino para os filhos, possibilidade de ir para lugares pedalando ao inves de dirigir, custo de aluguel…  esses sao fatores que nao importam muito para quem apenas visita uma cidade mas muitas vezes importantissimos para quem mora. O que me leva a crer por exemplo que o calculo do The Economist nao leva em consideracao alugueis ou educacao publica de qualidade.
 
Sendo assim, nao ‘e a toa que Canadas e Australia dominam o ranking. Sao lugares excelentes para visitar, especialmente durante primavera e verao. 
 
Uma sugestao seria incluir um indicador de “diversidade cultural” do lugar. Provavelmente esse ranking so conta densidade populacional.
Vi reportagem na TV que fala haver um indicador cultural mas e’ apenas a combinacao de outros indicadores indiretos como : clima, nivel de satisfacao com politicos locais, censura, liberdade religiosa etc e coletivamente esses 9 indicadores sao 20% dos pontos da cidade. Isso nao me parece um calculo correto. Novamente, muita enfase dada para a melhor cidade do mundo para turista.
 
Na mesma reportagem, mostrando as criticas com esse indice, um arquiteto Italiano sugeriu um indicador de ajuste espacial. Esse indicador classificaria coisas como: quantidade de espaco verde, atracoes naturais, interconnectividade e nivel de isolamento. Esse indicador de nivel de isolamento de uma cidade e’ otimo porque da a medida certa sobre decidir morar ou nao. De que vale a pena morar num lugar com otimas faculdades se nao existe nada perto de la? .
De acordo com esse novo calculo, Canada e Australia cairiam para fora (somente Sydney e Toronto ficariam) dos top 10; e cidades como Amsterdam, Paris, Berlim, Tokyo e Munique apareceriam. Essa sim representa algo mais perto do mundo real em que vivemos (e nao desses economistas…)
  
Ricos vs Pobres
  • A melhor cidade do mundo para morar em 2012: Melbourne
  • A pior cidade do mundo para morar em 2012: Dhaka
Pegando-se as top 50 e comparando com as bottom 50 o que ha de comum? cidades de paises ricos vc cidades de paises pobres. Indo mais alem, sao cidades de modo de vida Ocidental vs. vida Oriental. (Nota: Engana-se que Beijing e Tokyo sejam modo de vida Oriental, esses lugares ja sao ha anos culturas quase que Ocidentais). Compara-se vida confortavel, seguranca e acesso a bons servicos. Na verdade, as diferencas entre as top 50 sao tao pequenas q e’ ate injusto dizer q Melbourne e’ o melhor lugar para morar, de tao parecidas que essas cidades sao as vezes.
Modelando a Percepcao Humana
Uma maxima entre consultores e’ que “Percepcao e’ realidade”. E nao e’ a percepcao no sentido de aparentar uma coisa e ser outra; e sim no sentido de projetar, conscientemente, uma imagem daquilo que se almeja com as atitudes, e “assets” que representam a imagem nessa linguagem.
E concedo que isso e’ algo muito dificil de modelar. Gente que mora no bairro X almeja morar no bairro Y da mesma cidade, por exemplo, porque o bairro Y projeta a percepcao de melhor vida la, mesmo ambos sendo parte de uma cidade classificada como nao-tao-boa-de-morar.
Quando vemos na TV cidades que o mundo quer morar, nao vemos imagens com carros circulando, e sim gente em parques, pedalando, tomando cafe em bares na calcada… Cidades como Paris projetam claramente esse sucesso porque tem uma “vida de rua” extremamente variada.  NYC tambem, mas veja so… a cara de New York sao os taxis amarelos e gente andando na rua (o que me faz pensar que New York e’ quase um caso a parte, a capital do mundo…pensamento a elaborar).
Um morador de Vancouver me disse que entende a boa colocacao da cidade no ranking e concorda com uma resalva: “Se voce tiver dinheiro para morar em Vancouver… “. As familias trabalhadoras nao moram em Vancouver e sim em suburbios ao redor da cidade.  Novamente, o ranking refletindo o ponto de vista do turista, ao inves do genuino morador.
O Melhor Lugar do Mundo para morar e’ ….
Aquele que voce se sente bem e e’ bem recebido e da pra viver em paz. Para minha mae e’ Fortaleza, pra minha sogra e’ Canoa Quebrada, pro meu vizinho e’ Phnom Phen.
Ja fazem mais de 15 anos que sai do Brasil. Quando eu era mais novo, obviamente era mais atrevido e falava facilmente que qualquer lugar no primeiro mundo era melhor que o Brasil. O tempo vem implacavel e nos faz engulir as proprias palavras. E a gente repete para os mais jovens emigrantes que saem do Brasil e vao para o exterior…mas geralmente eles nao ligam a minima. E’ natural, eu tambem fui assim Smile faz parte do apredizado.
Uma pergunta que escuto bastante e': "Edge, tu acha q serei mais feliz na Australia do que seria se vivesse no Brasil?" antes eu responderia com Sim ou Nao, hoje nao sei essa resposta entao eu conto essa historia do noviço que perguntou ao Abade:
- "O que eu devo fazer para agradar a Deus?"
- Jovem...Abraao aceitava os estranhos, e Deus ficou contente. Elias detestava estranhos, e Deus ficou contente. o Rei David tinha orgulho do que fazia, e Deus ficou contente. O publicano diante do altar tinha imensa vergonha do que fazia, e Deus ficou contente. João Batista foi para o deserto, e Deus ficou contente. Jonas foi para a maior metropolo, Ninive, e Deus ficou contente.
Ignore os economistas. Caminhe a estrada de seus sonhos, e amanha nao, mas no futuro se todos seguirem seus sonhos, o mundo fica melhor.

Cheers,

By

by

How to Activate Windows 8 Enterprise RTM

If you have installed windows 8 enterprise RTM, despite the fact you used a valid serial number you might not be able to connect to the Microsoft activation services. This will cause your device to display in the bottom right corner the message “activate your windows 8 copy”. Here’s another way to activate your Win8.
Call the command prompt and run as “administrator”
activate-windows-8-enterprise
in the command prompt call the SLMGR utility with your serial key
Captwure
The operation might take a few seconds and when is complete you will see the message below and your windows 8 enterprise copy will be activated.
activate-windows-8-enterprise-3

Update: Yet Another Method.(tip from Glen Maroney)
Another way to do this is also calling SLUI 3 from the command prompt.
slui-3
And from there paste your serial key and click activate.
slui3-2

Cheers,

By