Monthly Archives: November 2017

VIDEO – PowerShell automated WebDeploy ZIP install

This video will demonstrate how to test, build, publish, and install WebDeploy ZIP packages.   The example walks through a simple WebAPI HTTP endpoint which echoes back the current date and time.   Fiddler is leveraged for HTTP testing.   Once tested succesful, we publish the project to ZIP for install on IIS hosted infrastructure.

PowerShell cmdlet Restore-WDPackage is used to extract ZIP content and create a permanent home for the API endpoint.

By automating with PowerShell we provide a fast consistent admin experience to ensure the API is always installed the same way for a reliable repeatable procedure.  Thanks for watching.

Cheers!  shades_smile

Video

Code

Add-PSSnapin WDeploySnapin3.0
$package = "C:\temp\Hello\deploy\Hello.zip"
Restore-WDPackage $package -Parameters @{"IIS Web Application Name"="API/Hello"}

Screenshot

image

References

Encryption: Customer Key for Office 365

I saw the below message in Message Center and wanted to share for others who want data at-rest encryption in Office 365.  Details below. 

“LockBox” with E5 license was a past feature for this same goal.   It’s not yet clear to me how the two are different, but it’s great to see new options for customers to encrypt their data.

Cheers! shades_smile

New feature: Customer Key for Office 365

MC124630

Published Date: Nov 09

Category: Stay Informed

How does this affect me?

On September 25th we announced general availability of Customer Key for Office 365. Customer Key enables organizations to provide and control their own encryption keys for their Office 365 data at-rest.  With Customer key, customers are in control of their keys and can exercise the ability to revoke the keys to make their data unreadable to the service and initiate the path towards data deletion. Customer Key is built on top of service encryption, so customers receive an added layer of protection on top of BitLocker, as well as a more granular level of control in Office 365.

What do I need to do to prepare for this change?

There is nothing you need to do to prepare for this change however there are steps in order for you to use this feature to get started go to our technical documentation go to https://aka.ms/customerkey. Please click Additional Information to learn more about this feature.

Additional information: https://support.office.com/article/Customer-Key-for-Office-365-FAQ-41ae293a-bd5c-4083-acd8-e1a2b4329da6

Direct link: https://portal.office.com/AdminPortal/home?switchtomodern=true#/MessageCenter?id=MC124630

(Disclaimer- You will need global admin group access to view Message center)

Diagram

Image result for o365 lockbox

References

Measure SQL tables with ROWCOUNTS and STORAGE

With custom SQL line of business databases it can be helpful to enumerate all tables and row counts for each.   The below TSQL will create a new VIEW named “RowCounts” for that purpose.   I’d suggest adding this to any custom SQL database for easy data quality checks and monitoring.

Cheers!   shades_smile

TSQL RowCount

CREATE VIEW RowCounts AS (
SELECT o.NAME,
  i.rowcnt 
FROM sysindexes AS i
INNER JOIN sysobjects AS o
ON i.id = o.id
WHERE i.indid < 2 AND OBJECTPROPERTY(o.id, 'IsMSShipped') = 0)

TSQL Storage

SELECT 
t.NAME AS TableName,
s.Name AS SchemaName,
p.rows AS RowCounts,
SUM(a.total_pages) * 8 AS TotalSpaceKB, 
CAST(ROUND(((SUM(a.total_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS TotalSpaceMB,
SUM(a.used_pages) * 8 AS UsedSpaceKB, 
CAST(ROUND(((SUM(a.used_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS UsedSpaceMB, 
(SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB,
CAST(ROUND(((SUM(a.total_pages) - SUM(a.used_pages)) * 8) / 1024.00, 2) AS NUMERIC(36, 2)) AS UnusedSpaceMB
FROM 
sys.tables t
INNER JOIN      
sys.indexes i ON t.OBJECT_ID = i.object_id
INNER JOIN 
sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
INNER JOIN 
sys.allocation_units a ON p.partition_id = a.container_id
LEFT OUTER JOIN 
sys.schemas s ON t.schema_id = s.schema_id
WHERE 
t.NAME NOT LIKE 'dt%' 
AND t.is_ms_shipped = 0
AND i.OBJECT_ID > 255 
GROUP BY 
t.Name, s.Name, p.Rows
ORDER BY 
t.Name

Screenshot

image

References

VIDEO – Angular CLI Routing with SharePoint

In this video I demonstrate how to create a new Angular 2 project with Routing and host in a SharePoint Document Library.   This technique enables rapid development with Angular CLI’s http://localhost:4200 live preview website and simple publish to /dist/ for hosting on SharePoint.

Cheers!  shades_smile

Video

Screenshots

image

image

image

Video Content

  1. Angular CLI Documentation
  2. ng -v
  3. ng new sproute –routing
  4. ng g c route1
  5. ng g c route2
  6. ng g c route3
  7. code .
    1. Visual Studio Code
    2. [index.html]  remove Base Href
    3. [app-routing.module.ts]  Import Components, populate Route map with {path; component}, and {useHash:true}
  8. ng serve
  9. ng build

References

What’s in that patch? Nov 2017

NOTE – PDF format updated to include both SharePoint 2013 and 2016 notes.

Ever wondered what fixes are inside of a given CU?   Please see attached PDF with full detail. I wanted a new format for easy reading.   Show management and make the business case for why downtime should be taken to apply CUs.  Also posted at http://sharepointupdates.com/

If you found this helpful, please leave a comment.    shades_smile_thumb_thumb_thumb_thumb[2]

Download

What’s in that patch – Nov 2017.PDF

PowerShell – Install Module (Verbose Debug)

By setting the system variable $debugPreference = “Continue” we are able to see file level detail when installing PowerShell modules.  This can be helpful to gain an understanding of the dependency and files contained with a module.   Cool trick I didn’t know about until today.

Cheers!  shades_smile

Code

$debugPreference = "Continue"
Install-Module SharePointPNPPowerShell2013 -Scope CurrentUser -AllowClobber
Get-Command |? {$_.Source -like '*SharePointPNP*'} | ft

Screenshots

image

image

image

Updated: Office 365 App launcher

Last week Microsoft released a new App Launcher GUI for first release Office 365 tenants.  The new GUI emphasizes most recently used apps and will be rolled out to all tenants by early 2018.

Screenshot and details below.  Cheers!  shades_smile

image

MC124492

Stay Informed

Published On : November 7, 2017

We’re updating the Office 365 app launcher. We’re beginning to roll out to first release organizations today. This message is associated with Office 365 Roadmap ID: 20465. The new Office 365 app launcher is a personalized and simple way to help your users open and switch between the apps they use most.

clip_image002

How does this affect me?

The apps your users see in the new app launcher are still based on the licenses you have assigned. However, the redesigned main view now emphasizes the most used applications across Office 365. It also highlights additional apps relevant to your users. For example, teachers and students may see education-specific apps. This rollout to First Release is in progress, and the roll out to the rest of the world is expected to complete early 2018. With the new app launcher, a user’s main view will include a default set of apps. While the new app launcher is in First Release, we will also pin any additional apps that user has opened in the last couple of days. When the app launcher rolls out beyond First Release, we will have more data to pin any additional apps that a user has opened within the last 30 days. After the first time your users see the new launcher, apps in the main view will stay the same, unless a user chooses to customize their apps or an administrator adds or removes licenses. If you have difficulty finding an app, click “All apps” and search through the alphabetized list of apps available.

What do I need to do to prepare for this change?

Please consider updating your user training, and notifying your helpdesk. Please click Additional information to view the Admin overview video and other resources.

Additional information

https://go.microsoft.com/fwlink/?linkid=856800

What happened to the Mail, Calendar, People and Tasks tiles?

Access to all Outlook modules is now consolidated in the main view of the app launcher with a single tile called Outlook that opens Mail. People, Calendar, and Tasks can be accessed through the menu in the lower-left corner of the Outlook app (beneath the folders), just like on the desktop. Direct access is also available with individual Calendar, People and Tasks tiles in the ALL apps view, and the tiles can be pinned to the main view of the app launcher, like other apps. Additionally, if a user clicked on Calendar, People, or Tasks directly in the previous 30 days*, we will automatically pin that tile to their main view. See Can I pin admin custom tiles to the main view of the launcher for my organization? for questions about the First Release experience for pinning apps outside of defaults.

TSQL – Set all databases SIMPLE recovery

Use the below TSQL script to set all databases to simple recovery mode.   Helpful for development environments and lab VMs to save on disk storage and backup space.

Cheers!  shades_smile

Code

USE MASTER
declare
@isql varchar(2000),
@dbname varchar(64)
declare c1 cursor for select name from master..sysdatabases where name not in ('master','model','msdb','tempdb','ReportServer','ReportServerTempDB')
open c1
fetch next from c1 into @dbname
While @@fetch_status <> -1
    begin
	
    select @isql = 'ALTER DATABASE @dbname SET RECOVERY SIMPLE'
    select @isql = replace(@isql,'@dbname',@dbname)
    print @isql
    exec(@isql)
    select @isql='USE @dbname; DBCC SHRINKFILE (N''@dbname_log'' , 0, TRUNCATEONLY)'
    select @isql = replace(@isql,'@dbname',@dbname)
    print @isql
    exec(@isql)
    fetch next from c1 into @dbname
    end
close c1
deallocate c1

How to Register for NEW SharePoint Admin Center

Open the link http://aka.ms/joinadminpreview to submit an opt-in request to Microsoft with Tenant URL and Contact email.

Learn more about the NEW SharePoint Admin Center at Introducing the new SharePoint Admin Center

Thank you to @wonderlaura for Power Hour which included this URL in audio. https://www.youtube.com/watch?v=UQBGaW-101A

image

image

Application for the SharePoint Admin Center early preview program

Important (10/18/2017): The current early preview program for the new SharePoint Admin Center that was presented at Ignite 2017 is now closed. You can still use this form to apply for future early preview opportunities. We will contact you via email and invite you to our private Yammer group when we start enrolling people again in the future.
Required

1. Tenant URL (Example: contoso.sharepoint.com)
This is the tenant you will want to receive the early SharePoint Admin Center preview on. Please provide one form entry per tenant.

Enter your answer

2. Contact email (Example: Bob.Smith@contoso.com)
This contact email will be invited to our private Yammer group once you’ve been accepted in the program. For multiple emails, please separate with “;”

Reduce SPPKG WebParts Features with Powershell

The below steps will reduce a SPPKG to only select Features and WebParts we want to keep.  Every SPPKG file is actually a ZIP with XML manifest and subfolder for each WebPart and Feature.  Extracting the SPPKG as ZIP allows us to review the internal content, enumerate all Features, and then select ones to keep in a final compressed ZIP file (SPPKG file).

If you want to upload only a few WebParts from a SPPKG package to Office 365’s App Catalog then check out the video below.

Cheers!   shades_smile

Video

Code

Screenshots

image

image

image

References

Return to Top ▲Return to Top ▲