Quantcast
Channel: TechNet Blogs
Viewing all 17778 articles
Browse latest View live

How to fix the Telemetry Dashboard error message “Database connection failure. The database needs to be updated.” in Office 2013 SP1

$
0
0

If you’re using Telemetry Dashboard to monitor Office compatibility, you’ll have to update some Telemetry Dashboard components after you install Office 2013 SP1. If you don’t, you’ll see an error message when you try to connect Telemetry Dashboard to the telemetry database. You can learn how to update these components in Update Office Telemetry components for Office 2013 SP1.


Inspiring the Next Generation of Women in Technology

$
0
0
By Kari Sherrodd, senior manager, Citizenship and Public Affairs March 8 is International Women’s Day , a global day since the early 1900’s to mark the economic, political and social achievements of women. Microsoft is proud to celebrate International Women’s Day across our offices around the world. Microsoft News Center also shares the stories of five inspiring women from Microsoft, and how they hope to motivate and encourage more girls to explore careers in technology. As...(read more)

Microsoft Grants Three Nonprofits Cash, Software and Services for Technology Innovation

$
0
0
By James Rooney, senior manager, Technology for Good @jamesroo At its core, technology is empowering. Technology helps us explore outer space and discover medical breakthroughs. It brings educational tools to areas that lack resources and access, and helps us respond quickly to natural disasters across the globe. As we have seen firsthand as part of our ongoing Solutions for Good program, nonprofit organizations have deep knowledge of the issues they are trying to solve and they know how to apply...(read more)

Calculate your customer’s savings with Office 365

$
0
0

TimTetrickPhoto

Tim Tetrick

image

Microsoft partners can now use CloudReady Insight, an Office 365 cost-saving assessment tool from third-party provider Exoprise, to show their customers how much they can save with Office 365.

Help Office 2003 and Exchange Server 2003 users upgrade their systems

With support ending soon for Office 2003, Exchange Server 2003, and Windows XP, now is a good time for customers to move up to Office 365. We encourage you to reach out to your customers and help them understand the benefits of moving to Exchange and Office in the cloud.

Now you can use CloudReady Insight to help you answer some of the questions customers ask most.

1. How much could I save with Office 365?
2. Are my users ready for Office 365?

image

You can access additional materials, including a customer email template, on Microsoft’s Ready-to-Go Marketing site at Exoprise CloudReady Insight Assessment Link and Customer Email.

*The CloudReady Insight tool and associated services are provided by Exoprise, an independent third party, not by Microsoft. Inclusion of this link to Exoprise’s site does not imply Microsoft’s endorsement for Exoprise’ products or services. This offer is available for a limited time only, and use of the tool is completely voluntary on the part of the user and subject to additional terms and conditions from Exoprise. The tool is provided for informational purposes only and any results and data generated from the use of the tool are estimates only. Microsoft makes no warranties, express or implied, and disclaims all liabilities, with respect to the tool and the accuracy of any information generated as a result of its usage.

ConfigMgr 2012 – Application Supersedence behavior with Task Sequence deployments

$
0
0


Hi Folks, Today’s post is brought to you by my colleague Senthil. This explains about how ConfigMgr Application Supersedence works in ConfigMgr 2012 Application Model.

To know the basics of Application supersedence you can follow –

http://technet.microsoft.com/en-us/library/gg682071.aspx


Recently we came across some scenarios where the Application supersedence causes the installation of the superseding applications without having any deployments targeted to the machine.

Just wanted to share this with you so that it helps in better understanding when you run into such scenarios.

The naming convention for the two applications is ‘Application A’ and ‘Application B’

Scenario 1:

- Application A - Deployed to a system and it installed A successfully.

- Application A is part of a Task Sequence which has been deployed to All systems Collection as Available. (Only to PXE and Media)

- Deleted the Application A deployment targeted to the client.

- Added Application B.

- Application B supersedes Application A. 

 Result:

 We triggered policy update on the client and the client didn't install the Application B.

Scenario 2:

- Application A - Deployed to a system and it installed A successfully.

- Application A is part of a Task Sequence which has been deployed to All systems Collection as Available. (ConfigMgr clients, PXE and Media)

- Deleted the Application A deployment targeted to the client.

- Added Application B.

- Application B supersedes Application A. 

Result:

We triggered policy update on the client and the client didn't install the Application B.

 Scenario 3:

- Application A - Deployed to a system and it installed A successfully.

- Application A and Application B is part of a Task Sequence which has been deployed to All systems Collection as Available. (ConfigMgr Clients, PXE and Media)

- Deleted the Application A deployment targeted to the client.

- Added Application B.

- Application B supersedes Application A. 

Result:

We triggered policy update on the client and the client installed the Application B.

Senthilkumar Pandurangan

Support Escalation EngineerMicrosoft System Center Configuration Manager  

Hybrid Identity at TechEd North America, Houston May 12-15

$
0
0
Hi all Now that the TechEd sessions are live, here is a summary of the Hybrid Identity sessions and labs. Most are in the People-centric IT track where Identity lives, however there are some that have landed in other tracks for various reasons. All of my sessions: Adam Hall Breakout sessions FDN02 Enabling Enterprise Mobility with Windows Intune, Windows Azure, and Windows Server PCIT-B313 Hybrid Identity- Extending Active Directory to the Cloud PCIT-B314 Understanding Microsoft’s BYOD Strategy and...(read more)

Detailed guides for Windows Server 2012 R2 Private Cloud Storage (using SMB3 File Servers, Cluster Shared Volumes and Storage Spaces)

$
0
0

There is a new set of TechNet pages covering how to design and deploy a Private Cloud Storage solution using Windows Server 2012 R2 technologies.

This includes the detailed description of a complete rack-sized solution using Hyper-V Cluster, SMB3 Scale-Out File Server Clusters, Cluster Shared Volumes and Storage Spaces

 

1) Provide cost-effective storage for Hyper-V workloads by using Windows Server

The first page describes the solution in great details, including a set of diagrams covering a typical implementation with compute, storage and management layers.

It covers the elements used to build the solution: multiple JBOD enclosures, Storage Spaces, storage pools, storage tiering, file servers, failover clustering, cluster shared volumes, Scale-Out file server, continuously available file shares, Hyper-V, Virtual Machine Manager and Operations Manager.

It then outlines the steps to actually build the solution:

  • Design your solution and purchase certified hardware
  • Rack and cable all hardware
  • Update all firmware
  • Deploy Windows Server 2012 R2 on the management cluster
  • Install Hyper-V and create virtual machines for the management cluster
  • Deploy AD DS, DNS, and DHCP
  • Set up the file server cluster
  • Set up the management cluster and management virtual machines
  • Deploy the compute nodes and clusters
  • Set up your tenant networking
  • Deploy your tenant virtual machines

Finally, it points out additional resources related to the solution described.

You can find this first page at http://technet.microsoft.com/en-us/library/dn554251.aspx

 

2) Provide cost-effective storage for Hyper-V workloads by using Windows Server: planning and design guide

The second page is a planning and design guide for the solution described in item 1.

It covers in great detail the requirements for all three layers of the solution: the file server cluster, the management cluster and the compute cluster.

On the hardware front, it specifies the exact type and count of the components required. That includes servers, JBOD enclosures, physical disks (HDDs and SSDs), SAS HBAs and network interface cards.

On the software side, it describes the relevant configuration for the operating system, failover clustering, MPIO, storage pools, Storage spaces, partitions, volumes, cluster shared volumes and file shares.

It provides a surprising high level of detail including the number of cluster nodes for each cluster, the number of drives in each tier, and even suggested storage spaces configuration like resiliency and column count.

You can find this second page at http://technet.microsoft.com/en-us/library/dn554250.aspx

 

These pages were published on TechNet in January 2014 and updated in February 2014, in response to requests for additional details on this type of solution.

I hope it its the spots and provides you the right level of information. Let us know if there is any additional information that you would like covered in this area…

PowerShell Jobs Week: Jobs in the Enterprise

$
0
0

Summary: Richard Siddaway looks at how you can use Windows PowerShell jobs in your enterprise.

Honorary Scripting Guy, Richard Siddaway, here today filling in for my good friend, The Scripting Guy. This is the seventh, and last, post in a series that, hopefully, will shine the spotlight on Windows PowerShell jobs, remind people of their capabilities, and encourage their greater adoption. The full series comprises:

  1. Introduction to PowerShell Jobs
  2. WMI and CIM Jobs
  3. Remote Jobs
  4. Scheduled Jobs
  5. Jobs and Workflows
  6. Job Processes
  7. Jobs in the Enterprise (this post)

The focus on this series has been on Windows PowerShell jobs, including learning about the core job cmdlets, using the
–AsJob parameter, running jobs on remote machines, and figuring out how scheduled jobs work. Today we’ll wrap up the series by looking at how you can use jobs in your enterprise. These are the type of scenarios where a Windows PowerShell job is the ideal answer.

One of the big questions you need to be able to answer is why you should use a Windows PowerShell job to accomplish a given task. The following criteria can be used to determine if a job is a suitable way to tackle the issue:

  • Task is long running
  • Task runs on or against multiple machines simultaneously
  • Task is asynchronous
  • Task can run in parallel (simultaneously running the same tasks on a number of machines)
  • Number of simultaneous running tasks need to be controlled

If your task meets any of these criteria, it is suitable for running as a job. Of course, the task doesn’t have to be run as a job. You could achieve many of these tasks with scripts or workflows, but Windows PowerShell jobs are a viable answer.

A common task in the enterprise is creating or modifying a registry key across multiple machines. It’s so common that we usually include this task in at least one event in the Scripting Games. Working with the registry is a task for WMI. (You didn’t think I wouldn’t also bring it into this post, did you?)

All of the machines in my test environment are running Windows Server 2012 R2 or Windows Server 2012, so I can use the CIM cmdlets rather than the WMI cmdlets. In this example you’ll add a key and a value to the registry.

Adding the key involves these steps:

$hklm =  [uint32]2147483650

$key = "SOFTWARE\HSGjobDEMO"

Invoke-CimMethod –ClassName StdRegProv -MethodName CreateKey -Arguments @{hDefKey = $hklm; sSubKeyName = $key}

You need these extra steps to add a value:

$value = "AreYouThere"

$data = "Yes"

Invoke-CimMethod –ClassName StdRegProv -MethodName SetStringValue -Arguments @{hDefKey = $hklm; sValue = $data; sValueName = $value; sSubKeyName = $key}

I like the –Arguments parameter in the Invoke-CimMethod cmdlet. It’s a hash table of parameter names and values, which means that there isn’t any confusion about what you are trying to do. That raises the question, “How can we find the parameter names?”

That’s where Get-CimClass comes in handy:

$class = Get-CimClass -ClassName StdRegProv

$class.CimClassMethods

This enables you to discover the available methods. You can find the parameters for individual methods like this:

$class.CimClassMethods["CreateKey"].Parameters

$class.CimClassMethods["SetStringValue"].Parameters

Get-CimClass is an excellent tool for investigating WMI classes. If you haven’t tested it, I strongly recommend that you do so very soon.

Your task is to run this against a number of remote machines. We’re assuming that Windows PowerShell remoting is enabled throughout your environment. So what’s the best way to run this script against remote machines? You have two main choices:

  • Use Invoke-Command for its remoting capabilities together with the –AsJob parameter.
  • Use the –ComputerName parameter on Invoke-CimMethod. You will have to manage the computer names that are being passed to Invoke-CimMethod.

I prefer the first approach because it’s less work. Also Invoke-Command is designed to manage the remoting aspects. You will need to put your code into a script block:

$sb =

{

  $hklm = [uint32]2147483650

  $key = "SOFTWARE\HSGjobDEMO"

  Invoke-CimMethod –ClassName StdRegProv -MethodName CreateKey -Arguments @{hDefKey = $hklm; sSubKeyName = $key} 

  $value = "AreYouThere"

  $data = "Yes"

  Invoke-CimMethod –ClassName StdRegProv -MethodName SetStringValue -Arguments @{hDefKey = $hklm; sValue = $data; sValueName = $value; sSubKeyName = $key}

}

The next question you need to answer is where is your list of remote machines coming from? Are you going to supply a text file, use a list that you typed by hand, or expect your script to extract the names from Active Directory?

For this exercise, we’ll assume that you have the list of machines in a text file called computers.txt—one machine name per line. I like using text file-based lists because you can maintain a number of files with different sets of computer names, and you can reuse it to group your processing into batches.

You can then use Invoke-Command like this:

Invoke-Command -ScriptBlock $sb -ComputerName (Get-Content computers.txt) -AsJob

One job will be created per computer with a maximum of 32 jobs running simultaneously (remember the –ThrottleLimit parameter).

Note I’ve not tested if the remote machine is contactable, and I haven’t put any error checking into the script. This is deliberate to save space because in many production quality scripts the actual payload code that does the work is a small fraction of the overall script.

You can split jobs into two very broad groups:

  • Jobs that return data that you need to look at.
  • Jobs that only interest you as successful or failed.

This task actually falls into the first category because you need to look at the returned code from the WMI class methods to determine if the job succeeded. That could be a painful and tedious operation if you have to look at the results of hundreds of jobs.

You need to be able to easily filter where the processing failed. One way is to cause the job to fail if the WMI method doesn’t succeed. You can always tell when a WMI method fails because the return value is non-zero. If you get a non-zero return value, then throw an error, and the job will fail.

Try this test to see what happens when errors are thrown inside jobs:

$sb =

{

param ([boolean]$test)

if ($test) {get-process}

else {throw "wobbly"}

Start-Job -ScriptBlock $sb -ArgumentList $true

Start-Job -ScriptBlock $sb -ArgumentList $false

The first job will complete and the second will fail.

Your job now looks like this:

$sb =

{

  $hklm =  [uint32]2147483650

  $key = "SOFTWARE\HSGjobDEMO"

  $ret =Invoke-CimMethod –ClassName StdRegProv -MethodName CreateKey -Arguments @{hDefKey = $hklm; sSubKeyName = $key}

  if ($ret.ReturnValue -ne 0)

  {

    Throw "Create Key failed. ReturnValue: $($ret.ReturnValue)"

  } 

  $value = "AreYouThere"

  $data = "Yes"

  $ret =Invoke-CimMethod –ClassName StdRegProv -MethodName SetStringValue -Arguments @{hDefKey = $hklm; sValue = $data; sValueName = $value; sSubKeyName = $key}

  if ($ret.ReturnValue -ne 0)

  {

    Throw "Set Value failed. ReturnValue: $($ret.ReturnValue)"

  }

Invoke-Command -ScriptBlock $sb -ComputerName (Get-Content compuetrs.txt) -AsJob

With other non-WMI, actions, you can use Try/Catch blocks to achieve similar results. The important point is that you throw an error when something goes wrong.

Get-Job can easily filter on the state of the job:

Get-Job -State Failed

Get-Job -State Completed

If the job completed, that’s fine. If it didn’t (and hopefully, that’s the minority), you need to do some investigation.

As a final thought, in my workflow series, I showed you how to perform the same task by using workflows: PowerShell Workflows: Design Considerations. One of the great strengths of Windows PowerShell is that there are usually multiple viable ways to solve a task.

This isn’t the end of Windows PowerShell jobs as a topic. The Windows PowerShell eventing engine uses jobs when an action script block is defined. In Windows PowerShell 4.0, Desired State Configuration (DSC) will use jobs for certain tasks. Windows PowerShell jobs are here to stay, and I expect them to appear in more situations in the future.

That’s it for today and for the series. My hope is that you’ve discovered that Windows PowerShell jobs, in their variety of guises, are a powerful tool that can help you perform your long-running admin tasks in an efficient manner.

Bye for now. I’ll be back later in the year with another series that dives into the depths of another Windows PowerShell topic.

~Richard

Richard Siddaway is based out of the UK and spends his time automating anything, and everything, for Richard Siddaway is based out of the UK, and he spends his time automating anything and everything, for Kelway, Ltd. A six-year Windows PowerShell MVP, Richard is a prolific blogger, mainly about Windows PowerShell (Richard Siddaway's Blog: Of PowerShell and Other Things) and a frequent speaker at user groups and Windows PowerShell conferences. He has written a number of Windows PowerShell books: PowerShell in Practice; PowerShell and WMI, PowerShell in Depth (co-author); PowerShell Dive (co-editor), and he is currently finishing Learn Active Directory Management in a Month of Lunches, which features lots of Windows PowerShell. All of the books are available from Manning Publications.

Thanks for another great series, Richard.

I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at scripter@microsoft.com, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace.

Ed Wilson, Microsoft Scripting Guy 


Weltfrauentag: Für starke Frauen – auch in der IT

$
0
0

Für die Vereinten Nationen ist der 8. März der Internationale Tag für die Rechte der Frau und den Weltfrieden. Kurz: Weltfrauentag. Ziel des Tages ist es, mehr Gleichberechtigung zwischen Frauen und Männern zu schaffen – auch und gerade im Arbeitsleben. 

Alleine schon angesichts des Fachkräftemangels und knapper Talente verwundert und erschrickt es gleichermaßen, dass die Geschlechterdebatte überhaupt noch geführt werden muss. Microsoft jedenfalls kann und will es sich gar nicht leisten, auf weibliche Nachwuchskräfte zu verzichten. Gleiches Gehalt für Männer und Frauen in gleichen Positionen ist für uns daher völlig selbstverständlich – und auch vom TÜV zertifiziert.

Das Gehalt kann aber nur die Basis für mehr Gleichberechtigung sein. Wesentlicher Erfolgsfaktor sind für uns flexible Arbeitsmodelle. Jeder Mitarbeiter – egal ob Mann oder Frau – kann Arbeitszeit und Arbeitsort selbst bestimmen und somit Familie und Beruf besser vereinen. Unsere Mitarbeiter können jederzeit im Home Office arbeiten, um zum Beispiel auf kurzfristige Krankheitsfälle der eigenen Kinder zu reagieren. Und wer seine Kinder am Nachmittag zum Fußballtraining oder Reitunterricht bringen möchte, kann sich einfach abends noch einmal an den Schreibtisch setzen. Wichtig ist nur, dass am Ende die Arbeitsergebnisse stimmen. Durch diese individuellen Angebote ist der Anteil an weiblichen Mitarbeitern bei Microsoft auf inzwischen 25 Prozent gestiegen. In unserem Nachwuchsprogramm „MACH“ liegt der Frauenanteil sogar bei rund 50 Prozent. Wer denkt, IT sei reine Männersache, ist bei uns an der falschen Adresse.

Mit der Initiative „Women IT Network“ haben wir zudem ein Netzwerk geschaffen, das Frauen in der IT-Branche zusammenführt. Dort lernen sich Frauen, die bereits im Berufsleben stehen, und Studentinnen technischer Studiengänge kennen, tauschen sich zu Herausforderungen und Entwicklungs- sowie Karrieremöglichkeiten aus und erfahren alles über die Vereinbarkeit von Familie und Beruf bei Microsoft. 

Weitere Infos auch in der Pressemappe „Microsoft als Arbeitgeber“ und auf den Microsoft Social Media Kanälen: 

Pressemappe:http://www.microsoft.com/de-de/news/pressemappe.aspx?id=17  

Video “Modernes Arbeiten bei Microsoft Deutschland”: http://www.microsoft.com/de-de/news/video.aspx?id=335896   

Initiative „Women IT Network“:http://www.microsoft.com/de-de/corporate/women-it-network/default.aspx

Facebook: https://www.facebook.com/MicrosoftCareersDeutschland  

Twitter:https://twitter.com/MicrosoftPresse  

Blog der MACH Trainees:http://blogs.msdn.com/b/mach_germany/


Posted by Astrid Aupperle
Communications Manager Employer Branding

MEA Apps of the Month – March 2014

$
0
0

In this blog post series I will share MEA Applications of the month for Microsoft Windows 8 (W8) Devices, Windows Phone 8 (WP8) Devices and Xbox, these applications were selected by real application users, you will find a short description about each application as a why question this application was selected, then from where you can download it,

Oct 2013 Apps of the Month can be found here.

Nov 2013 Apps of the Month can be found here.

Jan 2014 Apps of the Month can be found here.

Feb 2014 Apps of the Month can be found here.

Applications selected as MEA Apps of Feb 2014 month are as follows:

GeoPhoto:

WP8

Why?

Ever wondered where you took all your great photos? Or want to know where one specific photo was shot? No problem with GeoPhoto!

This app allow you to view all your geotagged pictures on Nokia HERE maps and have a SkyDrive support (view your SkyDrive-pics on the map)

clip_image002

From Where to download?

WP8: http://www.windowsphone.com/en-us/store/app/geophoto/f10991b2-3e1a-4fb0-99bc-833338a33502

 

Daily Workouts:

W8, WP8

Why?

This is the ideal app for someone that needs a quick assisted workout, this is the app for you.

You can chose the length and type of the exercise, and follow the videos.

 

From Where to download?

WP8: http://www.windowsphone.com/en-us/store/app/daily-workouts/ff574527-1d9d-4ca5-85bb-d14183825fbe

 

MarketWatch:

W8, WP8

Why?

To track Microsoft stock performance & any other stocks,

The MarketWatch Windows phone app delivers real-time market data and quotes, breaking markets and business news and analysis, and investing advice throughout the day.

Features:

  -  Latest markets, finance and business news from MarketWatch

  -  Market data center updated in real time

  -  Detailed stock quote pages with key trading information and charts

  -  Speech recognition for hands-free listening: tell your Windows phone to read you the latest MarketWatch  headlines and stories, news on a company, or the latest quote for a stock

  -  Customizable Watchlist – track your stocks and see related MarketWatch stories

  -  Save and share articles

 

From Where to download?

WP8, W8: http://www.windowsphone.com/en-us/store/app/marketwatch/7ddf0001-00ec-4617-84ef-cdae92b65ab4

 

Greate British Chefs:

W8

Why?

Cooking is one of my favorite hobbies. Great cooking personifies a lot of what I inspire for; innovation, perfection and devotion. This app really brings together all the element for me to indulge in my favorite past time. It has great design layout, easy interface, great visuals. Its everything that W8 app should be…..

Features:

· 320 recipes sorted by chef, filter and theme

· Stunning HD photography

· Chef and restaurant profiles

· Over 100 instructional videos

· Informative articles delivered straight to the app

· Build up and share your shopping list by recipe or aisle

· Pin, print and Share your favorite recipes

· You can now "favourite" up to 250 recipes

clip_image001

From Where to download?

W8: http://apps.microsoft.com/webpdp/app/00276318-565e-43a1-96ed-2dbf0df2bb6e

 

Enjoy these great application and keep tuned for next month applications.

SharePoint Provider Hosted App Walkthrough: Part 2 Dig deep

$
0
0

Introduction

In the previous post here I showed how to write a new provider hosted App using a step by step process. In this post I will build up on that knowledge and show you the following:
  • How to customize your provider hosted app so that you get information from the SharePoint site. (Such as user email).
  • How to customize the look and feel of your provider hosted App so that it reflects the SharePoint theme so that the user does not feel a completely disconnected experience. Also how that can be selective so that if the same web site was viewed outside of SharePoint it is displayed as a normal web site.
  • How to link back to SharePoint and publish information back to the site including posting to the personal feeds.
  • How to host the provider hosted App on Azure web site and how to register this on your private tenant.
So let’s get started, shall we.

Getting Information from SharePoint

To allow the application developers to connect to the source SharePoint site, the request coming from the SharePoint site has a query parameter called “SPHostURl” this contains the source URL of the SharePoint site. So to retrieve information you need to use the client object model to connect to the SharePoint site. Now another problem is how to establish authorization and get the current user identity to be able to perform actions using the currently logged on user identity. To establish this you will already find in any new SharePoint provider hosted App a class called “TokenHelper” this will specifically help you to create the client context using the token. Now once you got the token you do not want to re-connect with the SharePoint site to retrieve the token with every request and hence the need of a token cache. I have included with this article a “TokenDictionary” class that would allow you specifically to cache your tokens.
Note: One thing extra to note while working with provider hosted apps is that you need to make sure you pass the “Request.QueryString” from every page to the next so that you do not lose your SharePoint context.
Now let’s see the code to get the user email address:
// Retrieve Email address from SharePoint
//
// Set up SharePoint Context
Uri sharePointUrl = MyApp.UrlHelper.GetSharePointUrl(Request.QueryString);
MyApp.OAuthTokenPair tokenPair = MyApp.TokenDictionary.GetOAuthTokenPairFromContextToken(null, sharePointUrl.Authority, Request.Url.Authority, Request.Cookies, Response.Cookies);
string accessToken = (tokenPair != null ? tokenPair.AccessToken : "");
 
// Get SharePoint client context
Microsoft.SharePoint.Client.ClientContext clientContext = MyApp.TokenHelper.GetClientContextWithAccessToken(sharePointUrl.ToString(), accessToken);
 
// Load Query
Microsoft.SharePoint.Client.Web web = clientContext.Web;
clientContext.Load(web.CurrentUser);
clientContext.ExecuteQuery();
 
// Work with the result
string userEmail = clientContext.Web.CurrentUser.Email;
 
Of course for this to work you will need to add a reference to the SharePoint client object model DLL “Microsoft.SharePoint.Client” and “Microsoft.SharePoint.Client.Runtime”, one good thing is that this is already done for you as part of a new SharePoint App project. J

Customizing the look and feel

Once you click on a provider hosted App you are routed to that app and hence you lose the look and feel of the original SharePoint site and the user really feels disconnected. So how to resolve this issue. You simply need to customize your app to look the same like the SharePoint site instead of looking something like this.
clip_image002
The code required to do this is placed in your site theme. If you are using HTML5 then it would be the “_SiteLayout.cshtml” file. You need to add the following line to the header section:
<scriptsrc="@Request.QueryString["SPHostUrl"]/_layouts/15/sp.ui.controls.js"type="text/javascript"></script>
This line will allow the site to get the SP script file from your original farm.
Now on the page DIV you need to add the SP chrome as below:
@*Configure the SharePoint Chrome Control*@
<divid="chrome_ctrl_container"data-ms-control="SP.UI.Controls.Navigation"data-ms-options='{
        "appHelpPageUrl" : "/?@Request.QueryString",
        "appIconUrl" : "/Content/Images/AppIcon_white_96x96.jpg",
        "appTitle" : "My Provider Hosted App",
        "settingsLinks" : [
            {
                "linkUrl" : "../?@Request.QueryString",
                "displayName" : "Settings"
            },
            {
                "linkUrl" : "../about.cshtml?@Request.QueryString",
                "displayName" : "Support"
            }
            ]
        }'>
</div>
This will allow the page to look as below:
clip_image004
Also we do not need to show this on site if you open the site from an external user. So simply we add the following code to our default.chtml file:
if (string.IsNullOrEmpty(Request.QueryString["SPHostURl"]))
{
    Response.Redirect("~/Default.Public.cshtml");
}
Also on the public default file we add the following to change the layout file to use the public file that does not contain the SharePoint chrome.
@{
    Layout = "~/_SiteLayout.Public.cshtml";
   
    Page.Title = "Home";
}

Publishing to the SharePoint User Feeds

Now we need to write information back to the SharEPoint site and usually this is simply done using the Client Object Model in the same way we have read. As an example here I will show you how to write to the user feed.
The first thing you need to do is to add a reference to the DLL “Microsoft.SharePoint.Client.UserProfiles”. Now you need to do the following:
// Get SharePoint client context
Microsoft.SharePoint.Client.ClientContext clientContext = Bakery.TokenHelper.GetClientContextWithAccessToken(sharePointUrl.ToString(), accessToken);
 
// Set up content for Newsfeed post
string filename = "/Images/Products/" + product.ImageName;
string linkTitle = product.Name;
string linkHref = Request.Url.AbsoluteUri;
string linkComments = "Join as for some " + product.Name + " at " + orderShipping + " %23MyApp";
 
// Post to feed using the client context established at page load.
MyApp.FeedHelper.PostLinkToFeed(Request.Url.GetLeftPart(UriPartial.Authority),
                                    filename, linkTitle, linkHref, linkComments,
                                    clientContext);
 
clientContext.Dispose();
Also please note that you need to add proper access for your app to be able to do this as follows.
clip_image006

Hosting the App on Azure Websites

Now for the last piece of the puzzle how to host your site on Azure Websites. So here are the steps.

1-     First you need to create a new Azure WebSite. So logon to https://manage.windowsazure.com and go to the websites and click create.
clip_image008

2-     Once the web site is created now download the publishing profile.
clip_image010

3-     Now go to your app and import this publishing profile and publish your app to azure.
clip_image012
clip_image014

4-     Click save to save the created profiles but do not publish yet as it will fail. Now open the file “backeryapp - Web Deploy.pubxml” using VS and edit it to insert the following lines

<PropertyGroup>
  <_Enable45Check>false</_Enable45Check>
</PropertyGroup>

5-     Now publish your site to azure and it should succeed
clip_image016

6-     Now you should be able to open your site and see the normal public page (not linked to SharePoint).

7-     Now open your “AppManifest.xml” file and make sure you change the URL or your app to the Azure URL (Note that the URL must be HTTPS based)
clip_image018

8-     Now do not deploy it to SharePoint yet as it will fail, you need to register your app to SharePoint (same as what VS is doing automatically for you) so go to your tenant and open the page https://<tenant>.sharepoint.com/_layouts/15/appregnew.aspx and click on the two generate buttons and fill the information as required:
clip_image020

9-     Now copy both the Client Id and the Client Secret and put them in your site web.config file replacing the values there. Republish your site to azure.

10-  Now click on Create on the application registration page
clip_image022

11-  Now publish the SharePoint App.
clip_image024
clip_image025

12-  Now go to your SharePoint tenant and upload the App package.
clip_image026
clip_image027
clip_image028
clip_image029

13-  Now test your app from the link below
clip_image030

You should now be routed to the Azure web site and your app would be able to work as expected and link back to your SharePoint tenant.
clip_image032
You can find the solution helper files here.


 

Jetzt anmelden zur Dell Expo Tour 2014

$
0
0
IT kompakt zum Anfassen: Von März bis November 2014 findet die Dell Expo Tour 2014 in verschiedenen deutschen Städten statt. Sie sind herzlich eingeladen, mit Dell einen Blick auf die Veränderungen im heutigen Geschäftsleben zu werfen. Sie lernen Lösungen und Wege kennen, die Ihnen helfen, mit den heutigen Herausforderungen erfolgreich umzugehen und Ihr Business zu stärken. Die Key-Themen der Dell Expo Tour 2014 sind: TRANSFORM: Virtualisierung, Konvergenz und Cloud - was sind passende Strukturen...(read more)

Tip of the Day: BranchCache part2

$
0
0

Today’s Tip…

Microsoft introduced BranchCache in Windows Server 2008 R2. The idea was that branch offices would only need to download data from the main office once. Then it would be cached at that branch. Subsequent requests for the same data would then be routed to the cached data once it was determined that the data was not stale. In the rest of this week’s tips, I’ll be forwarding information on some of the improvements made to BranchCache in Windows Server 2012 which focus on new tools and a simplified deployment model.

  • File division calculations are performed only one time and may be done offline. When a client computer that is running Windows 8 downloads content from a file server or web server that is running Windows Server 2012 and is using new disk deduplication technology, there is no need for BranchCache to calculate how to divide the content because the file server and web server have already made these calculations. Content information is calculated offline, well before a BranchCache client requests a file. This provides faster performance and more bandwidth savings because content information is ready for the first client that requests the content and calculations have already been performed.
  • Duplicate content is stored once and downloaded once. When identical content exists in a file – or across many files on the content server or hosted cache server – BranchCache stores only one instance of the content, which provides disk storage savings. In addition, client computers at office locations download only one instance of duplicate content, saving additional WAN bandwidth.
  • Small changes to large files produce bandwidth savings. BranchCache now divides files and web pages into smaller pieces. BranchCache uses a highly optimized file server chunking system to choose intelligent split points inside of files, providing the ability for client computers to download only the part of the file that is changed.
  • Cache Encryption. Cached data is now stored encrypted by default. This allows you to ensure data security without using drive encryption technologies.
  • Cache preloading. New tools are available that allow you to load cacheable content onto hosted cache servers before the content is requested by client computers. You can preload content from media, such as DVDs or hard disks, or you can transfer the content over the network to the hosted cache server.
  • BranchCache is now manageable with Windows PowerShell and Windows Management Instrumentation (WMI). This enables scripting and remote management of BranchCache content servers, hosted cache servers, and client computers.

Informační zdroje pro využití Windows 8.1 ve školství

$
0
0

Na stránkách Technetu se v sekci věnované Windows 8.1 objevilo několik velice zajímavých, inspirativních a užitečných příruček týkající se (nejen) využití systému Windows 8.1 v oblasti školství. Celkem se jedná o sedm anglicky psaných publikací, které se zabývají následujícími oblastmi. Pokud ve škole plánujete nasadit systém Windows 8.1 (či jiné zmiňované technologie) nebo jej už máte nasazen, doporučujeme jejich přečtení. 

Příprava nasazení systému Windows 8.1

Nasazení systému Windows 8.1

Aplikace Windows Store

Windows To Go

BYOD zařízení

Nasazení systému Windows RT 8.1

Virtual Desktop Architecture

【MVA 解説編】System Center と Windows Azure を使用したハイブリッド クラウドへの移行(01 監視、管理、および運用)

$
0
0
※ この投稿は Windows Azure Advent Calender に参加しています。 System Center は言うまでもなくマイクロソフトの運用管理製品です。最新版は System Center 2012 R2 です。 System Center を使用すると、オンプレミスのインフラストラクチャーに加えて、Windows Azure に展開したインフラストラクチャーやアプリケーションも管理、監視できます。 以下のコースウェアでは、System Center を使用して Windows Azure を含むハイブリッドクラウド環境を管理することを学習することができます。 System Center と Windows Azure を使用したハイブリッド クラウドへの移行ジャンプ スタート http://www.microsoftvirtualacademy.com/training-courses/38d1d8c0-240e-432b-994c-ab34e71088b6#?fbid=pJeqjxv8UId 各モジュールにはテストも用意されていますが、解説が無いので、このBLOGで各問の開設をしたいと思います...(read more)

PowerTip: Find More Information about Windows PowerShell Jobs

$
0
0

Summary: Learn how to discover more information about Windows PowerShell jobs.

Hey, Scripting Guy! Question How can I learn more about Windows PowerShell jobs?

Hey, Scripting Guy! Answer To find out more about any Windows PowerShell topic, research the Help files for each cmdlet:

Get-Help Start-Job –ShowWindow

To discover the job related cmdlets:

Get-Command *job

Not everything is job-related, but the PrintJob cmdlets can be easily filtered.
You’re looking for the cmdlets in these two modules: –PSScheduledJob and Microsoft.PowerShell.Core.

The last place to look is the _about files:

Get-Help about*job*

Windows Server Samurai Web Series

$
0
0

With a changing business landscape, the new Server Samurai Web series is designed to help your business succeed with the latest release of Windows Server 2012 R2. Take a deep dive into both technical content as well as best practices that will help you offer your customers the latest and greatest in Windows Server 2012 R2. Some topics include, What’s new in R2, Virtualizing with the latest Hyper-V, SMB disaster recovery solutions and more! Get readyandget ahead ... register today for your regular slice of Windows Server!

Enjoy MVA Course Of The Week

OneDrive for Everything in Your Life

$
0
0

OneDrive is now available worldwide! For existing SkyDrive customers, you are all set. Your files are already in the new OneDrive experience—all you have to do is head over to www.OneDrive.com and log in. For those of you just hearing about the service for the first time, OneDrive gives you one place for all of your files, including photos, videos, and documents, and it’s available on the devices you use every day.

Here are more opportunities:

Get OneDrive for your phone and keep your photos safe.  If you have a Windows Phone, of course it works with OneDrive, and your photos are safe.  But we bet you didn’t know that OneDrive can back up photos from your iPhone or Android phone too!  Just install the new OneDrive client, launch it, and it will ask you if you want to back up your photos. From then on, every photo you take is copied to OneDrive.  We’ll even give you 3 GB just for using the camera back-up feature, since we want to help make sure you never lose another photo.

Use OneDrive + Office for your personal documents and notes.  Just like SkyDrive, OneDrive works great with Office and makes storing and sharing documents a snap.  OneDrive is built in to Office as the default save location, so you can see the recent documents you were working on and pick up right where you left off, even if you switch devices. With real-time co-authoring in the free online version of Office in OneDrive, you can work on Word, Excel, and PowerPoint documents simultaneously with colleagues or family, see edits as they happen, and rest assured that you always have the latest version.  Install OneDrive on your PC or Mac, copy your docs to OneDrive, and use Office 2013.  From then on, every doc you write and every note you take is available across your PC, Mac, phone, and tablet. 

Bing for Schools and Bing Lesson Plans

$
0
0

Helen Gooch, a Microsoft Fellow and Master Trainer had a chance to interview Matt Wallaert, the visionary behind the Bing Lesson Plans and Bing for Schools.

Check out Helen’s blog post here on the Microsoft in Education blog site.

If you’ve not yet deployed Bing for Schools, you can find more information here.

Viewing all 17778 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>