Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.
Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.

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

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲