Debug.Write is usually used in the debug mode while you are debugging a project.
Trace.Write is usually used in the release mode to produce some trace logs.
Debug.Write is usually used in the debug mode while you are debugging a project.
Trace.Write is usually used in the release mode to produce some trace logs.
Back in November this year, the SQL Server Engineering Team released the latest version (6.6.4.0) of the SQL Server and Replication management packs. In addition to health monitoring capabilities, this management pack includes new and enhanced summary dashboards for SQL Server 2008 and 2012, and a datacenter dashboard template to allow users to create custom dashboards with the same visualization capabilities for other components or applications monitored by their Operations Manager environment.
The datacenter dashboard template and the new summary dashboards are based on a new standalone WPF/Silverlight application component defined in the SQL Server Visualization Library management pack from version 6.6.0.0 onwards. Since version 6.6.2.0, the components used to define the previous versions of the SQL Server summary dashboards (multi widget/component) have been deprecated and removed from the main SQL Server Visualization Library management pack. Therefore, importing any versions of this library management pack from 6.6.2.0 onwards into an Operations Manager management group would remove all the legacy components. Hence, custom dashboard created referencing the legacy components would be affected and would either show up as blank tiles or lose certain functionalities after say, version 6.6.4.0 of the SQL Server Visualization Library was imported.
THANKFULLY, the SQL Server Engineering Team has recently released a standalone and independent version of the visualization library for the community. This visualization library consist of all legacy components previously used to define the summary dashboards for SQL Server 2008 and 2012 up till version 6.5.4.0.
The file name of the visualization library with legacy components is: Microsoft.Legacy.SQLServer.Visualization.Library.mpb, version6.6.0.1, and it will soon be available for download at the TechNet Gallery.
This legacy library management pack is independent from the current versions of the SQL Server Visualization management pack and can be imported or removed separately, without being affected by any updates or changes to the current versions going forward.
This is great news as this legacy visualization library consists of individual components that allow more granularity and control as these components can be referenced in other custom dashboard to provide further insights and richness in context with monitored objects and monitoring data.
I have some examples on my blog that demonstrates these capabilities using an XML authoring or a template approach.
The following is an example of some custom widgets created based on the performance tile and monitor state tile components defined in the Microsoft Legacy SQL Server Visualization Library management pack:
Note that I will be doing some simple modifications to some of the sample summary dashboards and templates created previously for this blog to now reference the Microsoft.Legacy.SQLServer.Visualization.Library. An update will be provided in my next blog post.
Thanks again to the SQL Server Engineering Team for releasing this SQL Server Visualization Library with the Legacy Components and allowing me to share it with the community.
Happy holidays to all !
Below are the related courses for Azure Certification
For 70-532 use Developing Microsoft Azure Solutions http://www.microsoftvirtualacademy.com/training-courses/developing-microsoft-azure-solutions
For 70-533 use Establish Microsoft Azure IaaS Technical Fundamentalshttp://www.microsoftvirtualacademy.com/training-courses/establish-microsoft-azure-iaas-technical-fundamentals
For 70-534 use Architecting Microsoft Azure Solutions http://www.microsoftvirtualacademy.com/training-courses/architecting-microsoft-azure-solutions
Namoskar!!!
みなさん、こんにちは。
前回に引き続き、Dynamics CRM 2016 SDK の新機能として、正式版と
なった Web API について紹介します。
今回は現時点での Web API の制限について紹介します。
概要
Web API は今回のリリースで正式版となりましたが、まだ一部機能に
制限があります。以下に主な制限の内容を紹介します。
ナビゲーションプロパティ値でのフィルターが行えない
参照フィールドのように特定できる関連の値であっても現時点では
ナビゲーションプロパティの値を利用したフィルターは行えません。
例えば以下の例では、取引先責任者の名前 ’Renee' で取引先企業の
レコードのフィルターをしますが、失敗して501 エラーが返されます。
GET [Organization URI]/api/data/v8.0/accounts?$select=name&$filter=primarycontactid/firstname eq 'Renee' HTTP/1.1 Accept: application/json OData-MaxVersion: 4.0 OData-Version: 4.0
一部の組織サービス要求に対応する Function か Action がない
以下の組織サービスに対応する Function や Action がまだ存在しません。
BookRequest
CalculateRollupFieldRequest
CheckIncomingEmailRequest
FindParentResourceGroupRequest
GetQuantityDecimalRequest
IncrementKnowledgeArticleViewCountRequest
InitializeFromRequest
IsValidStateTransitionRequest
QualifyLeadRequest
QueryMultipleSchedulesRequest
ReactivateEntityKeyRequest
RemoveItemCampaignActivityRequest
RemoveItemCampaignRequest
RemoveMemberListRequest
RescheduleRequest
RetrieveByResourcesServiceRequest
RetrieveDuplicatesRequest
RetrieveFilteredFormsRequest
RetrieveLocLabelsRequest
RetrievePrincipalAccessRequest
RetrieveRecordWallRequest
SearchByBodyKbArticleRequest
SearchByKeywordsKbArticleRequest
SearchByTitleKbArticleRequest
ValidateRecurrenceRuleRequest
$expand クエリにおける $select クエリが無視される
2 つ以上のナビゲーションプロパティをクエリした際、最後のナビゲーション
プロパティで $select を利用しないと、1 つ目のナビゲーションプロパティは
すべての列を返します。
例えば以下のクエリは取引先企業の名前、関連する担当者の名前、関連する
営業案件の名前だけを返します。
GET [Organization URI]/api/data/v8.0/accounts(D05B5D26-2F99-E511-80DB-C4346BC51068)?$select=name&$expand=contact_customer_accounts($select=fullname),opportunity_customer_accounts($select=name)
しかし最後の select を省略すると、関連する取引先担当者の列も fullname
だけではなく、すべてが返されます。
GET [Organization URI]/api/data/v8.0/accounts(D05B5D26-2F99-E511-80DB-C4346BC51068)?$select=name&$expand=contact_customer_accounts($select=fullname),opportunity_customer_accounts
公開前のメタデータが取得できない
Web API を利用してメタデータを取得することができますが、公開済みの
メタデータのみ取得可能です。メタデータの操作については次回以降で
紹介します。
ナビゲーションプロパティの値がない場合、Null が返されない
OData 4.0 の仕様では、ナビゲーションプロパティの値が存在しない場合
Null が返されるべきですが、現状は項目が返されません。
ActivityPointer をリンクした FetchXML の制限
ActivityPointer をリンクエンティティとして指定した FetchXML を利用
した場合、リンクエンティティ側のフィールド値が返りません。
例えば以下の FetchXML を利用した場合、subject フィールドの値は
返りません。
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true"><entity name="account"><attribute name="name" /><link-entity name="activitypointer" from="regardingobjectid" to="accountid" link-type="inner"><attribute name="subject" /></link-entity></entity></fetch>
まとめ
Web API で開発する場合に、現時点でいくつか制限があることを知っておく必要が
あります。期待した動作をしない場合にはそれが制限であるか、まず SDK をご確認ください。
- 中村 憲一郎
※本情報の内容(添付文書、リンク先などを含む)は、作成日時点でのものであり、予告なく変更される場合があります
皆さん、こんにちは。A寿です。
突然ですが、皆さんは、約 2 時間川下りしたことはありますか?・・・このお話にご興味のある方は本文の最後の【閑話】までどうぞ。
さて、今回は、Windows Filtering Platform Sample を Windows 10 にインストールしてみたいと思います。
具体的な手順として、以下の流れで進めます。
(1) サンプルの入手
(2) Visual Studio 2015 でソリューションファイルを開く
(3) 構成とプラットフォームを編集
(4) ユーザーモードアプリケーション、ライブラリ、サービスのランタイムライブラリを設定
(5) サンプルインストールスクリプトの再起動の設定を編集
(6) ソリューションのビルド
(7) ビルドで生成されたモジュールの確認とテスト署名
(8) ターゲット PC の準備
(9) ドライバとサービスのインストール
(10) ユーザーモードアプリケーションの実行
(11) TraceView でのログ採取
それでは、以下、各手順の詳細を説明していきます。
前提として、開発用 PC として Windows 10 x64 (build 10586)、テスト用ターゲット PC として Windows 10 x86 (build 10586) を使用します。
(1) サンプルの入手
GitHub の以下のサイトから、ページ右側にある [Download ZIP] ボタンをクリックし、サンプル全体を Windows-driver-samples-master.zip としてダウンロードします。
https://github.com/Microsoft/Windows-driver-samples/
この zip ファイルを展開します。
\Windows-driver-samples-master\network\trans\WFPSampler フォルダが、今回ご説明する Windows Filtering Platform Sample に該当します。
(2) Visual Studio 2015 でソリューションファイルを開く
今回は Visual Studio 2015 を使用します。Visual Studio 2015 のインストール方法については、JS さんの以下の記事をご参考にしてください。
Windows 10 でサンプル ドライバーをビルドするまで
http://blogs.msdn.com/b/jpwdkblog/archive/2015/08/21/windows-10.aspx
Visual Studio 2015 を開き、[ファイル]→[開く]→[プロジェクト/ソリューション] をクリックします。
上記 WFPSampler フォルダにある WFPSampler.sln を開きます。
[WFPSampler に対するセキュリティ警告] のダイアログが出たら、今後の表示をスキップしたいので、[ソリューション内のすべてのプロジェクトに対して確認メッセージを表示する] のチェックボックスを OFF にして OK を押します。
以下の 5 つのプロジェクトがあることを右側の [ソリューション エクスプローラー] で確認できます。(以下の図をご参照ください。)
- Exe ノード下に WFPSampler ユーザーモードアプリケーションプロジェクト
- Lib ノード下に WFPSampler ユーザーモードライブラリプロジェクト
- Svc ノード下に WFPSamplerServiceユーザーモードサービスプロジェクト
- Sys ノード下に WFPSamplerCalloutDriver ドライバープロジェクト
- Syslib ノード下に WFPSampler カーネルモードライブラリプロジェクト
(3) 構成とプラットフォームを編集
[ソリューション エクスプローラー] で [ソリューション 'WFPSampler' (5 プロジェクト)] を右クリックして [構成マネージャー] をクリックします。
今回、例として、Windows 10 x86 をターゲット PC としているので、以下の設定を行います。
- [アクティブ ソリューション構成] は、Debug
- [アクティブ ソリューション プラットフォーム] は、Win32
- ビルドのチェックボックスはすべて ON
- 配置のチェックボックスはすべて OFF
(4) ユーザーモードアプリケーション、ライブラリ、サービスのランタイムライブラリを設定
[ソリューション エクスプローラー]で Exe ノード下の WFPSampler ユーザーモードアプリケーションプロジェクトを右クリックし、[プロパティ]をクリックします。
[WFPSampler プロパティページ] の左側のペインから、[構成プロパティ]→[C/C++]→[コード生成]をクリックします。
右側のペインで、[ランタイム ライブラリ] を [マルチスレッドデバッグ (/MTd)] に変更し、OKをクリックします。
Lib ノード下の WFPSampler ユーザーモードライブラリプロジェクト、Svc ノード下の WFPSamplerService ユーザーモードサービスプロジェクトでも同じ操作を実施します。
(5) サンプルインストールスクリプトの再起動の設定を編集
Visual Studio 2015 の [ファイル]→[開く]→[ファイル] で前述の WFPSampler フォルダ下の scripts フォルダの WfpSamplerInstall.cmd を開きます。
125行目を以下のように変更します。
変更前
RunDLL32.Exe syssetup,SetupInfObjectInstallAction DefaultInstall 131 %WinDir%\System32\Drivers\WFPSamplerCalloutDriver.Inf |
変更後
RunDLL32.Exe syssetup,SetupInfObjectInstallAction DefaultInstall 132 %WinDir%\System32\Drivers\WFPSamplerCalloutDriver.Inf |
変更点は 131 から 132 に変えているところだけです。
以下のドキュメントに記載している通り、以下の +3 から +4 に変わったことにより、再起動が必要な場合に、事前にユーザーに再起動してよいか確認してくれるようになります。
InstallHinfSection function
https://msdn.microsoft.com/en-us/library/windows/hardware/aa376957
128 Set the default path of the installation to the location of the INF. This is the typical setting.
+3 Reboot the computer if necessary without asking user for permission.
+4 If a reboot of the computer is necessary, ask the user for permission before rebooting.
113行目は、不要なため、以下のようにコメントアウトするか削除します。
変更前
goto :Cleanup |
変更後
::goto :Cleanup |
(6) ソリューションのビルド
Visual Studio 2015 の [ビルド]→[ソリューションのビルド] をクリックします。
(7) ビルドで生成されたモジュールの確認とテスト署名
エクスプローラを開き、5 つのプロジェクトそれぞれで生成されたファイルのうち、インストールやその確認に使用するファイルは以下の表の通りです。
プロジェクト | フォルダ | ファイル |
Sys ノード下の WFPSamplerCalloutDriver ドライバープロジェクト | \WFPSampler\sys\Debug\
| WFPSamplerCalloutDriver.cer WFPSamplerCalloutDriver.inf WFPSamplerCalloutDriver.sys WFPSamplerCalloutDriver.pdb |
\WFPSampler\sys\Debug\ WFPSamplerCalloutDriver
| WdfCoinstaller01011.dll wfpsamplercalloutdriver.cat WFPSamplerCalloutDriver.inf WFPSamplerCalloutDriver.sys WFPSamplerInstall.cmd ※.cat 以外は生成されたファイルがここにコピーされました。 | |
Exe ノード下の WFPSampler ユーザーモードアプリケーションプロジェクト | \WFPSampler\exe\Debug
| WFPSampler.exe WFPSampler.pdb
|
Lib ノード下の WFPSampler ユーザーモードライブラリプロジェクト | \WFPSampler\lib\Debug
| WFPSampler.lib WFPSampler.pdb
|
Svc ノード下の WFPSamplerService ユーザーモードサービスプロジェクト | \WFPSampler\svc\Debug
| WFPSamplerService.exe WFPSamplerService.pdb
|
Syslib ノード下の WFPSampler カーネルモードライブラリプロジェクト | \WFPSampler\syslib\Debug
| WFPSampler.lib WFPSampler.pdb
|
WFPSamplerCalloutDriver.sys ドライバーと、そのカタログファイル wfpsamplercalloutdriver.cat にはすでに Visual Studio 2015 の設定でテスト署名が行われております。
そこで使用された、WFPSamplerCalloutDriver ドライバープロジェクトの WFPSamplerCalloutDriver.cer の証明書と signtool.exe を使って、WFPSamplerService.exe サービスと WFPSampler.exe ユーザーモードアプリケーションに、以下の例のようにテスト署名を行います。
> signtool.exe sign /v /s my /n WDKTestCert /t http://timestamp.verisign.com/scripts/timestamp.dll WFPSamplerService.exe |
> signtool.exe sign /v /s my /n WDKTestCert /t http://timestamp.verisign.com/scripts/timestamp.dll WFPSampler.exe |
<補足>
- signtool.exe は、WDK 10 がインストールされたフォルダの \bin\<arch> (例: \Program Files (x86)\Windows Kits\10\bin\x86\) にあります。
- WFPSamplerCalloutDriver.cerは、certmgr.msc で確認すると [個人] 証明書ストアに入っています。そのため、signtool.exe の /s オプション (証明書ストアを指定) では、[個人] 証明書ストアを表す my を指定しています。
- WFPSamplerCalloutDriver.cer をエクスプローラでダブルクリックして開き、[詳細] タブで [サブジェクト名] を確認すると、WDKTestCert で始まっているので、/n オプション (証明書が持つサブジェクト名を指定) ではこれを指定しています。
- 署名を行わない場合、サービスのインストール時に「指定されたプログラムは実行できません。」(The system cannot execute the specified program.) というエラーメッセージが表示され、インストールに失敗します。
(8) ターゲット PC の準備
これで、WFPSampler のサンプルを動作させるために必要なモジュールの準備はすべてできましたので、これをターゲット PC にコピーします。
例として、C:\WFPSamplerSamplePackage, C:\Symbols, C:\Tools の 3 つのフォルダを作成し、以下のファイルをすべてコピーします。
コピー先のフォルダ (ターゲットPC) | コピー元のフォルダ (開発用 PC) | ファイル |
C:\WFPSamplerSamplePackage
| \WFPSampler\sys\Debug\ WFPSamplerCalloutDriver | WdfCoinstaller01011.dll wfpsamplercalloutdriver.cat WFPSamplerCalloutDriver.inf WFPSamplerCalloutDriver.sys WFPSamplerInstall.cmd |
\WFPSampler\exe\Debug | WFPSampler.exe | |
\WFPSampler\svc\Debug | WFPSamplerService.exe | |
C:\Symbols | \WFPSampler\sys\Debug | WFPSamplerCalloutDriver.pdb |
\WFPSampler\exe\Debug | WFPSampler.pdb | |
\WFPSampler\svc\Debug | WFPSamplerService.pdb | |
C:\Tools
| C:\Program Files (x86)\ Windows Kits\10\Tools\x86\ | TraceView.exe |
ターゲット PC で管理者権限でコマンドプロンプトを起動し、以下のコマンドを実行します。
> bcdedit /set testsigning on |
OS を再起動します。
(9) ドライバとサービスのインストール
ターゲット PC で管理者権限でコマンドプロンプトを起動し、以下のコマンドを実行します。
> cd C:\WFPSamplerSamplePackage |
> WFPSamplerInstall.cmd C:\WFPSamplerSamplePackage |
成功すれば、以下のように表示されます。
Installing WFPSampler
Copying WFPSamplerCalloutDriver Bins to C:\Windows\System32\Drivers\ c:\WFPSamplerSamplePackage\wfpsamplercalloutdriver.cat c:\WFPSamplerSamplePackage\WFPSamplerCalloutDriver.inf c:\WFPSamplerSamplePackage\WFPSamplerCalloutDriver.sys 3 個のファイルをコピーしました。
Copying WFPSampler application binaries to C:\Windows\System32\ 1 個のファイルをコピーしました。 1 個のファイルをコピーしました。
Registering the WFPSampler Service INFO: ServiceInstall() [status: 0] Microsoft Windows Filtering Platform (WFP) Sample Policy Service サービスを開始します. Microsoft Windows Filtering Platform (WFP) Sample Policy Service サービスは正常に開始されました。
Registering the WFPSampler Callout Driver |
OS の再起動を要求するダイアログが表示されますので、再起動します。
OS 再起動後、サービスとドライバーの起動状況は、例えば、以下のように確認できます。
- ドライバーについては、[システム情報] ([Windows] ボタン +R で [ファイル名を指定して実行] に msinfo32.exe を入力して実行) から、[ソフトウェア環境]→[システムドライバー] で [wfpsamplercallouts] の [開始] が「はい」になっていることで確認できます。
- サービスについては、[サービス] ([Windows] ボタン +R で [ファイル名を指定して実行] に services.msc を入力して実行) から、[Microsoft Windows Filtering Platform (WFP) Sample Policy Service] の [状態] が「実行中」になっていることで確認できます。
(10) ユーザーモードアプリケーションの実行
今回は、例として、受け取った IP v4 パケットを全てフィルタするレイヤ (FWPM_LAYER_INBOUND_IPPACKET_V4) を、動的に有効にするオプションを指定して、WFPSampler.exe を実行してみます。
コマンドプロンプトから、以下を実行します。
> cd C:\WFPSamplerSamplePackage |
> WFPSampler.exe -s BASIC_PACKET_EXAMINATION -l FWPM_LAYER_INBOUND_IPPACKET_V4 -v |
問題なければ、以下が表示されます。
INFO: BasicPacketExaminationScenarioExecute : RpcInvokeScenarioBasicPacketExamination() [status: 0] |
(11) TraceView でのログ採取
C:\Tools にある TraceView.exe を管理者権限で起動します。
メニューの [File]→[Create New Log Session]→[Add Provider]→[PDB] をクリックし、C:\Symbols に置いた WFPSamplerCalloutDriver.pdb を選択します。
以下のように、[LogSession0] として表示されている行の、[Level] にある [SET] をクリックし、[Level] を展開して [Information] に変更します。
これにより、以下のように、ドライバーが出力するログが下のペインに出力されます。
上記がご参考になれば幸いです。
ではまた。
――――――――――――――――
【閑話】突然ですが、皆さんは、約 2 時間川下りしたことはありますか?
数年前のゴールデンウィークに、関西の南の方で、川下りをしました。特に、急流というわけでもなく、広い川幅を、木製の舟で、船頭さんが竿を川に挿しながら、ゆったりと進んでいくものでした。乗り込む際は、オレンジ色の救命胴衣を着ける以外に、笠をかぶるので、頭だけ、日本古来っぽいいい雰囲気でした。また、川を下っている際には、緑に囲まれているので、非常に癒されました。ただ、天気に恵まれていたので、比較的軽装で乗り込んだものの、約 2 時間も川を下っていると、川の上を吹き抜ける風に、どんどん体温が奪われ、寒くなってきました。寒くなってくると、当然の生理現象として、だんだん、トイレが近くなってまいります。約半分くらいのところで、陸にあがることはできたのですが、トイレはありませんでした。そのまま休憩が終わり、再度舟に乗り込み、残り半分を耐えました。なんとか我慢しきって、ゴールにたどり着いても、まだトイレはありません。なんといっても単なる普通の川で、何の公共施設もないため、今度は送迎車に乗り込むよう促されます。乗客が比較的多く、十人くらい乗る舟が3艘くらい出ていたので、同じようになっている人たちは結構いました。車が、目的地である、とある神社にたどり着くと、どの車から降りた人が優先でトイレに行ってください、と指示されるのですが、正直、誰も聞いてはいませんでした。皆がトイレに殺到し、我先に用を足すのでした。皆さんも、川下りをする際には、所要時間や体温調節にはお気を付けください。
As we know, to apply an update it actually includes a lot of operations.
To ensure that operations are atomic, consistent, isolated, and durable (ACID), we have introduced a concept called Transaction.
Transactions are intend to group operations on resources and ensure that the operations either succeed or fail as a single unit.
TxR here stands for the Transactional Registry. It allows applications to perform registry operations in a transacted manner.
Let’s take a look at the following example:
We need to apply a KB update for a specific service:
1. The update will modify registry hive: component, which is used for Windows Modules Installer architecture.
2. The update will possibly modify registry hive: HKLM\SYSTEM\CurrentControlSet\Services, which is used for the specific service itself.
3. The update will possibly modify other registry area which is per that specific service design.
In the aforementioned example, any problem of the 3 registry modifications should trigger an update failure as well as a status roll back.
To ensure the registry modification ACID, we will group the 3 actions into a transaction and make it a single action unit.
The TxR is used for this kind of registry transactions.
If in some cases the TxR was corrupted and we need to rebuild it, we can
1. Boot into WinPE.
2. Delete all the entries from the folder <Server OS drive>:\Windows\System32\config\txr
3. Run the following commands from <Server OS drive>:\Windows\System32\config\txr :
attrib -s -h *
del *.blf
del *.regtrans-ms
4. Reboot the server to normal OS environment.
5. Run the following command as administrator.
fsutil resource setautoreset true c:\
[原文发表地址] VS 2015 Update 1 and TFS 2015 Update 1 are available
[原文发表时间] 2015-11-30
今天我们发布了VS2015 Update 1的最终版本和 Team Foundation Server 2015 Update 1.
这里是发行版本的说明:
在上一个发行版本和最终发行版本上只有很少的一些变化,仅仅是修复了一些bug,如果要查看这次update所有的新的东西的发布版说明,那就有很多了。
你可以直接安装这个update(VS和TFS)的预发行版本, 它将更新您的安装。对于TFS, 你也可以在本地升级以前的不同版本(VS 2013 2012 2010) ,VS将会兼容安装以前的版本.
请感受这些提升与改进, 要以使用者的心态来告诉我们你们的想法. 近来我们将Team Foundation Server和Team Services分成了各自独立的目录,可以让您更便捷的提出意见。
我们现在已经把工作的重心放在了update2上, 希望在新的一年开始时能够看到更多有关update2的信息.
Brian
Azure VM のストレージ課金って少し特殊ですが、ちゃんとまとまったサイトがないなぁと思ったのでここに記載しておきます。(もしあったら、そっち見てください)
まず前提としてAzure VMのストレージとして使えるのは以下の4種類です。
Standard Storage
Premium Storageはちょっとだけ値段がお高いので、Standard Storageで・・・という話はありますが価格の見積もり方が少し特殊です。一般的なストレージは確保した容量分課金が発生するのに対して、Standard Storageは利用量(ページBLOBの割り当て済みサイズ)に応じた課金になります。(このあたりはMS佐々木さんのセミナーやブログでも言及されています。)
では実際に試してみましょう。
私の環境でWindows Server 2012 R2 (クイックフォーマットしたディスク1本、フルフォーマット1本)とついでにCentOSベースのOpenLogicを立ち上げました。佐々木さん作成のツールでページBLOBの利用量を確認してみます。(※すべて初期状態です)
Windows Server
11608906752/136367309312 10.8/127 (8.5% used) vmclassicdns-vmclassic-2015-12-26.vhd (※OSディスク)
31618560/10737418752 0.0/10 (0.3% used) disk1.vhd (※クイックフォーマット)
10734236672/10737418752 10.0/10 (100.0% used) disk2.vhd (※フルフォーマット)
OpenLogic
2931819008/32212255232 2.7/30 (9.1% used) cent-classicdns-cent-classic-2015-12-28.vhd(※OSディスク)
このような結果でした。
OSディスク自体が確保した容量に対する利用量が9%程度と、かなり安く使える感覚です。また、節約のため、ちょこちょこディスクを追加していくのではなく、クイックフォーマットで大きめの容量を確保して運用することも可能だと思います。ストレージアカウント単位であればAzureの管理サービスから容量を監視してアラートをあげることもできます。
あとバックアップに関してですが例えばBLOBのスナップショットとAzure Backupを利用する方法があります。(他にもあるので例えばにしてます)
BLOBのスナップショット
詳細はこちらに記載されています。Premium StorageとStandard Storage両方で使えるスナップショット機能で、BLOBストレージの料金が発生します。
Premiumには次の制限事項があります。
ちなみにスナップショットをサクッと試せるストアアプリが公開されています。その名もAzure Blob Explorer。
ただ、スナップショットをとった際も、ディスクと同様に確保される容量だけが表示され、実際の利用量、料金の計算ができません。
また、スナップショットは
https://hogehoge.blob.core.windows.net/vhds/vmclassicdns-vmclassic-2015-12-26.vhd?snapshot=2015-12-28T07:16:01.0084652Z
とうかたちで、通常のBLOBと異なりベースになるデータ(ここではvhd)のURLにタイムスタンプを追加するかたちで作成、管理されます。ポータルにも表示されません。
そこでアカウント、コンテナ単位でスナップショット込みのBLOBストレージの利用量を計算するツールが提供されているので、これを使おうと思ったら・・・・
Get Billable Size of Windows Azure Blobs (w/Snapshots) in a Container or Account
古い!ですがご安心を。既にアップデートしている人がいました。
https://gist.github.com/sjkp/f7c708ab9166ad4846a3
Storageアカウントを指定してコマンドを実行すると
CalculatedBlobCost.ps1 -StorageAccountName "hogehoge"
詳細: Container 'vhds' with 12 blobs has a size of 90621.57MB.
Total size calculated for 2 containers is 88.50GB
Storageアカウント全体で88.50GBという合計の利用量が表示されました。ここから実際のコストを算出できますね。ちなみにコマンドの実行完了後にブラウザが自動的に立ち上がって料金計算もしてくれる親切仕様になっています。では、10GBフルフォーマットしたDisk2のスナップショットをとると、どのようにかわるでしょうか?
実行した結果がこちらです。そのまま10GB分増えていますね。
詳細: Container 'vhds' with 13 blobs has a size of 100858.74MB.
Total size calculated for 2 containers is 98.49GB.
VMが使うページBLOBでは(利用している容量を)フルでバックアップをとるかたちになるようです。2回スナップショットをとるとさらに10GB増えます。なお、クイックフォーマットされたDisk1のスナップショットをとると0.02GBほど増えました。
「スナップショットの課金方法について」にも課金方法が記載されているので参考にしてください。ページではなくブロックBLOBはシナリオ別に課金方法が細かくのっています。
Azure Backup
また、バックアップという観点ではAzure Backupが便利です。こいつは「アプリケーションレベルで整合性を維持しながらオンラインバックアップ」がとれるのが特徴です。ただし、Windowsの場合だけで、Linuxは「ファイルシステムレベルでの整合性が確保される」となります。
また現時点(2015/12/28)では、制限事項として以下の2つがあります。(なる早で対応する方針)
※Windows に AgentをインストールするタイプのものならOK
さてさて、私は一足早く最終出社日です。本年はと��てもお世話になりました。来年もまたよろしくお願いいたします。
年末年始の通常サポート窓口は、下記の期間休業となります。
2015 年 12 月 29 日 (火) 17:30 - 2016 年 1 月 5 日 (火) 9:00
窓口休業予定のお知らせ
http://support2.microsoft.com/gp/contactus81?Audience=Commercial>
翌年の通常サポート開始日は、2016 年 1 月 5 日 (火) 9:00からとなります。
ご迷惑をおかけするかと存じますが、何卒ご理解ご了承の程よろしくお願いいたします。また、24 時間サポートのご契約をお持ちのお客様につきましては、上記休業期間中もサーバーダウンなどの緊急度の高い案件 (深刻度 A) に関して対応をさせていただきます。
今年も大変お世話になりました。来年も弊社製品並びにサポートサービスをご愛顧くださいますようお願い申し上げます。
ありがとうございました。
※ 上記画像のテンプレートダウンロードはこちらから!→ https://www.microsoft.com/ja-jp/office/pipc/template/result.aspx?id=13866
Microsoft SQL Server サポートサービス担当チーム一同
こんばんは。Japan Lync Support Team です。
Lync VDI 2013 Plug-in は、VDI 環境で Lync / Skype for Business を利用するためにシンクライアント (端末) 側にインストールするプラグインになります。
Lync VDI 2013 Plug-in を利用する場合、利用するシンクライアントにおいて Lync 2013 / Skype for Business 2015 クライアントと共存してのインストールは推奨されません。
そのため、Lync VDI 2013 Plug-in を使用する際には Lync 2013 / Skype for Business 2015 クライアントは、インストールしないか、あらかじめ終了しておく必要があります。
しかし、Lync 以外の Microsoft Officeアプリケーション を利用するためにシンクライアント (端末) 側にも Office 2013 をインストールする必要がある場合もあるかと思われます。
今回は、特に Office 2013 with SP1 (※)と Lync VDI 2013 Plug-in の共存環境に関する注意事項をお伝えします。
※ SP1 適用済みのメディアをインストールした Office 2013
Office 2013 with SP1 環境への Lync VDI 2013 Plug-in 展開
Title: Lync 2013 VDI Plug-in が Runtime Error を伴って異常終了する
URL: http://blogs.msdn.com/b/lync_support_team_blog_japan/archive/2015/06/22/lync-2013-vdi-plug-in-runtime-error.aspx
概要 :
Lync VDI 2013 Plug-in は Office 2013 (Lync 2013 / Skype for Business 2015) と一部共通のコンポーネントを持つため、
Office 2013 (Lync 2013 / Skype for Business 2015) と Lync VDI 2013 Plug-in の更新プログラムの適用状況に差異がある場合に、
内部コンポーネントのバージョン不一致により Remote Desktop クライアントや他社製の VDI クライアントが異常終了する、という問題になります。
この問題は、Lync VDI 2013 Plug-in にも Office 2013 SP1 を適用し、Office 2013 (Lync 2013) および Lync VDI 2013 Plug-in の両方に最新の更新プログラムを適用いただくことで解消されます。
しかし、Office 2013 with SP1 をインストールした環境では、以下のメッセージが表示され Office 2013 SP1の再インストールを実施することができません。その結果、上述の既知の問題を解消することができない状態になってしまいます。
このようなエラーが発生する場合には、以下の手順で Office 2013 SP1 適用済みの Lync VDI 2013Plug-in を展開することで、対処する必要があります。
Office 2013 SP1 適用済み Lync VDI 2013 Plug-in をインストールする手順
1. Lync VDI 2013 Plug-in をダウンロードして、任意のフォルダー (ここでは C:\Temp) に保存します。
2. コマンド プ���ンプトを起動し、以下のコマンドを実行して Lync VDI 2013 Plug-in のファイルを任意のフォルダー (ここでは C:\Temp\VdiSetup) 展開します。
cd C:\Temp
mkdir VdiSetup
lyncvdi.exe /extract:"C:\Temp\VdiSetup"
3. Office 2013 SP1 (KB2817430) をダウンロードし、任意のフォルダー (ここでは C:\Temp) に保存します。
Title: Description of Microsoft Office 2013 Service Pack 1 (SP1)
URL: https://support.microsoft.com/en-us/kb/2817430
4. コマンド プロンプトを起動し、以下のコマンドを実行して任意のフォルダー (ここでは C:\Temp\Office2013Sp1) に Office 2013 SP1 のファイルを展開します。
cd C:\Temp
mkdir Office2013Sp1
<ダウンロードした実行ファイル (.exe) のパス> /extract:"C:\Temp\Office2013Sp1"
例: proplussp2013-kb2817430-fullfile-x86-ja-jp.exe /extract:Office2013Sp1
5. 手順 4 で展開したファイル (.msp, .xml) を手順 2 で展開したファイルの中の "updates" フォルダー (C:\Temp\VdiSetup\updates) にコピーします。
6. 手順 2 で展開したファイルの中の "Setup.exe" を実行して、Lync VDI 2013 Plug-in と Office 2013 SP1 をインストールします。
※ この時点でコントロール パネルの [プログラムと機能] で表示されるバージョンは、"15.0.4569.1506" に更新されます。
※ 他の端末にも展開する場合には、C:\Temp\VdiSetup フォルダーをコピーして、ネットワーク共有やローカルに配置したうえで Setup.exe を実行してください。
7. さらに、Lync 2013 (Skype for Business 2015) の最新の更新プログラムを適用してください。
なお、すでに Office 2013 with SP1 環境に Lync VDI 2013 Plug-in をインストールし、問題が発生している環境がある場合は、Lync VDI 2013 Plug-in を一度アンインストールし、上記手順で Office 2013 SP1 適用済みの Lync VDI 2013 Plug-in をインストールしてください。
Office 2013 with SP1 の見分け方
もしも、ご利用の環境が Office 2013 with SP1 であるかわからない場合には、コントロール パネルの [プログラムと機能] から以下の内容を確認してください。
① Office 2013 に Office 2013 SP1 をインストールした場合
・[プログラムと機能] : バージョンが "15.0.4569.1506" (Office 2013 SP1 バージョン)
・[プログラムと機能] - [インストールされた更新プログラム] : Office 2013 SP1 (KB2817430) が表示される
② Office 2013 with SP1 (Office 2013 SP1 適用済みの Office 2013) のメディアでインストールした場合
・[プログラムと機能] : バージョンが "15.0.4569.1506" (Office 2013 SP1 バージョン)
・[プログラムと機能] - [インストールされた更新プログラム] : Office 2013 SP1 (KB2817430) が表示されない
Office 2013 SP1 は適用されていますか?
Office 2013 SP1 は Office 2013 および Lync VDI 2013 Plug-in の両方の更新を含んでいます。
加えて、最新の Lync 2013 (Skype for Business 2015) 更新プログラムは、Office 2013 SP1 が適用されていることを前提としています。
その結果、上述の "Remote Desktop クライアントや他社製の VDI クライアントが Runtime Error を伴って異常終了する" という問題のお問い合わせを受けるケースが増えています。
(補足)
例えば「Office 2013 は SP1 適用済み、Lync 2013 VDI Plug-in は Office 2013 SP1 未適用」といった環境で最新の Lync 2013 (Skype for Business 2015) の更新プログラムを適用した場合、
Office 2013 SP1 適用済みのモジュールのみが更新され、Lync VDI 2013 Plug-in のみに含まれるモジュール (Office 2013 SP1 未適用) が更新されないといった状況が発生します。
その結果、Lync VDI 2013 Pug-in の内部的なバージョンの不一致により Remote Desktop クライアントや他社製の VDI クライアントが Runtime Error を伴って異常終了するケースが発生します。
したがいまして、Office 2013 および Lync VDI 2013 Plug-in の両方が Office 2013 SP1 にて更新されていることをご確認のうえ、最新の更新プログラム適用を実施し、運用いただくようお願いいたします。
なお、Office 2013 および Lync VDI 2013 Plug-in の両方に Office 2013 SP1 が適用されていることは、コントロール パネルの [プログラムと機能] で表示されるバージョンから確認可能です。
① Office 2013 および Lync VDI 2013 Plug-in の両方に Office 2013 SP1 が適用されている場合
Office 2013 : 15.0.4569.1506 (Office 2013 SP1 バージョン)
Lync VDI 2013 Plug-in : 15.0.4569.1506 (Office 2013 SP1 バージョン)
② Office 2013 のみに Office 2013 SP1 が適用されている場合
Office 2013 : 15.0.4569.1506 (Office 2013 SP1 バージョン)
Lync VDI 2013 Plug-in : 15.0.4420.1017 (Office 2013 SP1 未適用のバージョン)
Lync VDI 2013 Plug-in は、基本的には Office 2013 のインストールされないシンクライアント環境での利用を前提としているため、共存環境では更新プログラムの適用状況に注意を払う必要がある事にご留意ください。
そのため、共存環境で運用されている場合は、一度既存のインストール環境をご確認くださいますようお願いいたします。
I rewrote my calendar program. The first version was written in F-BASIC in 1986. I sometimes rewrote this program in Small Basic.
Today I'd like to introduce the latest version of my calendar program (MTW971-0).
The older versions had character user interface. But the newest one has graphical user interface. Enter year and month then push [Text] to show the calendar. You can omit month for 12 months.
And [HTML] button is special feature of this calendar. This feature generates HTML for Small Basic Blog: Authoring Schedule. Actually, I update the article with this tool.
That's really fun for me to create such kind of useful tools in Small Basic.
Small Basic is a practical programming language.
Save 50%! Buy here.
This offer expires Sunday, January 3 at 7:00 AM GMT.
Through Active Directory and Active Directory Domain Services (AD DS) virtually all domain controller management can be performed with Windows PowerShell, whether in the cloud, on-premises, or a hybrid environment. This book will focus exclusively on Windows Server 2012 and later versions of Windows Server and Active Directory. The Windows PowerShell and Windows Management Framework (WMF) version used will be version 5.0, which is compatible with WMF version 4.0. Learn more.
Each week, on Sunday at 12:01 AM PST / 7:01 AM GMT, a new eBook is offered for a one-week period. Check back each week for a new deal.
The products offered as our eBook Deal of the Week are not eligible for any other discounts. The Deal of the Week promotional price cannot be combined with other offers.
Machine learning uses computers to run predictive models that learn from existing data in order to forecast future behaviors, outcomes, and trends. Azure Machine Learning (AML) is a powerful cloud-based predictive analytics service that makes it possible to quickly create and deploy predictive analytics models as analytics solutions. Predictive analytics uses various statistical techniques - in this case, machine learning - to analyze collected or current data for patterns or trends in order to forecast future events. As the name implies, Azure Machine Learning Service eliminates the infrastructure, management, software installation etc. related issues and lets the user focus on the development of his/her AML models and publish them as ready to use scalable web services.
AML service have the capability to run both custom R and Python scripts along with several preinstalled Python, R software libraries. With Free and Standard service tiers, it is possible to create an AML workspace and start using the service immediately. Please note that the free tier doesn't cover all available features and designed for developers to have them general overview about the service. To start using any tier of this service you need a Microsoft account and then following the https://studio.azureml.net/Home address you can activate your free subscription. For testing the whole AML features, you need a Microsoft Azure account.
Machine Learning Studio
Machine Learning Studio (MLS) is a browser-based tool used to develop predictive models by dragging, dropping, and connecting predefined or custom modules / scripts. Once you created a free AML service account you can start using MLS directly from https://studio.azureml.net. Or If you have an Azure subscription, want to test the full features of AML, then you first create an Azure Storage where you will store your AML data, custom scripts, saved models etc. and a machine learning workspace that will be a base to the MLS for developing your custom solutions.
Follow the below pictorial guide to create an AML workspace. As highlighted on the image, you can select any existing azure storage account from the listbox. Your custom data uploaded to be used in experiments, the experiment results, python notebooks etc. all will be stored in this storage area.
Once you have created an ML workspace, you can access the Machine Learning Studio web page, browser based tool for creating predictive analytics models.
Below image is a screenshot of the landing page of AML studio. Description of the numerated regions are as:
For creating a new experiment, click on the Experiments tab and then click on the button named NEW on the bottom left corner of the window. If you haven't done yet, you should definitely click on the "Experiment Tutorial" tile to see step by step animated tutorial about creating a new experiment.
If you already experienced the "experiment tutorial" then click on the "Blank Experiment" to create a new experiment that we will be using to show some of the AML features on it.
In the future ML posts we will be creating new AML experiments based on this guide.
We’re pleased to announce the availability of a Barnes & Noble Exclusive Edition of Microsoft Office 2016 Step by Step (ISBN 9780735699236), by Joan Lambert and Curtis Frye.
This Barnes & Noble Exclusive Edition includes four bonus chapters!
• Create professional diagrams in documents
• Solve business intelligence problems with Power Pivot and Power Query
• Present tabular data on slides
• Create attractive and efficient messages
Purchase from Barnes & Noble!
The quick way to get started with Microsoft Office 2016!
This is learning made easy. Get more done quickly with Microsoft Word, Excel, PowerPoint, and Outlook. Jump in wherever you need answers—brisk lessons and colorful screenshots show you exactly what to do, step by step.
• Covers Word, Excel, PowerPoint and Outlook
• Format documents for visual impact
• Build powerful workbooks for analysis and reporting
• Prepare highly effective presentations
• Organize your email, scheduling, and contacts
About the authors
Curtis Frye is the author of more than 30 books, including Microsoft Excel 2013 Step by Step for Microsoft Press and Brilliant Excel VBA Programming for Pearson, UK. He has also created and recorded more than three dozen courses for lynda.com, including Excel for Mac 2016 Essential Training and Excel 2013: PivotTables in Depth. In addition to his work as a writer, Curt is a popular conference speaker and performer, both as a solo presenter and as part of the Portland, Oregon ComedySportz improvisational comedy troupe. He lives in Portland with his wife and three cats.
Joan Lambert is the author or coauthor of more than three dozen books about Windows and Office and three generations of Microsoft Office Specialist certification study guides. She has worked closely with Microsoft technologies since 1986, and in the training and certification industry since 1997. As President and CEO of Online Training Solutions, Inc. (OTSI), Joan guides the translation of technical information and requirements into useful, relevant, and measurable resources for people who are seeking certification of their computer skills or who simply want to get things done efficiently.
Windows 10 IoT is relatively new, and it is based on the Windows Universal platform. That said, it makes normal developer things we do slightly “different” as this uses different APIs and libraries than we are used to. For example, on a normal .net system we can use the QueueClient in azure; on a Universal app we can use Queue but that does not work on Win10 IoT.
So how do we get data to the Raspberry PI (RPI)? Enter WebAPI! One of my favorite technologies!
At the end of the day, you probably need more data/server site functionality anyway.
Currently I am using a timer to call my Azure hosted WebAPI to send data down to my RPI.
m_dtTimer = new DispatcherTimer();
m_dtTimer.Interval = TimeSpan.FromMilliseconds(5000);
m_dtTimer.Tick += TimerEvent;
m_dtTimer.Start();
Then in the Timer call use the HttpClient
private void TimerEvent(object o, object e)
{
MakeWebRequest();
}
public async void MakeWebRequest()
{
HttpClient http = new System.Net.Http.HttpClient();
HttpResponseMessage hrResponse = await http.GetAsync("http://yoursite.azurewebsites.net/api/yourapi");
string strProgram = await hrResponse.Content.ReadAsStringAsync();
//Do coo stuff
On the WebAPI side, for this example I am just returning some data from the Azure Message Bus (Queue) on the Get() method. Here is that code:
/*
Microsoft provides programming examples for illustration only, without
warranty either expressed or implied, including, but not limited to, the
implied warranties of merchantability and/or fitness for a particular
purpose.
This sample assumes that you are familiar with the programming language
being demonstrated and the tools used to create and debug procedures.
Microsoft support professionals can help explain the functionality of a
particular procedure, but they will not modify these examples to provide
added functionality or construct procedures to meet your specific needs.
If you have limited programming experience, you may want to contact a
Microsoft Certified Partner or the Microsoft fee-based consulting line
at (800) 936-5200.
*/
Background:
I had the privilege assisting a customer with some sync issues. We have a custom OU that we have customer security for user accounts that leave the company. We had some users that left the company. They were disabled, hidden from the GAL and moved the to the "bDelete" OU. They let the syncs and crawls run over night and in the morning they discovered that the user accounts were still showing up in search results. We looked in the User Profile Service Application and searched for the affected users. We still had user profiles for the user who left the company. These users also had an associated my site still. We performed a search in the user info table in the profile database and the user account was still present. The user wasn't removed from SharePoint. This turned our attention to the Syncs themselves. Looking in the miisclient.exe I noticed we haven't been successfully completing our syncs for a while now with the error "stopped-extension-dll-exception" with no details. As you can see this doesn't help us at all :(. Since the error seems to be with the FIM sync service and not SharePoint our attention turned now to the application event viewer for windows. At last some headway!!! In the application event logs for windows I saw this error:
Log Name: Application
Source: FIMSynchronizationService
Date: 7/10/2015 11:14:17 AM
Event ID: 6801
Task Category: (3)
Level: Error
Keywords: Classic
User: N/A
Computer: SP2010.Contoso.com
System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
at System.Net.WebClient.DownloadData(Uri address)
at Microsoft.Office.Server.UserProfiles.ManagementAgent.ProfileImportExportExtension.DownloadPictures(ProfileChangeData[] profiles)
at Microsoft.Office.Server.UserProfiles.ManagementAgent.ProfileImportExportExtension.Microsoft.MetadirectoryServices.IMAExtensibleFileImport.GenerateImportFile(String fileName, String connectTo, String user, String password, ConfigParameterCollection configParameters, Boolean fFullImport, TypeDescriptionCollection types, String& customData)
Forefront Identity Manager 4.0.2450.47
Cause:
During our Moss Import phase the FIM service is accessing the profile photo exactly as it's recorded… http://mysite.contoso.com/personal/User+Photos/Profile+Pictures/contoso_username_MThumb.jpg
Which means the FIM service will perform an HTTP GET command for each profile picture. This means a few things:
The Sync machine must have access to the My Site Host from a network perspective
The profile picture must be able to be displayed with a direct call via a browser
Combine this with the application event error and we have our issue for the failed Syncs. The question now is, we have thousands of users how do we determine which users are affected? The issue we have here is that the sync will fail as soon as it errors out on one profile photo. Even if it is successful for the first 1500 users as soon as it hits one bad profile picture the whole thing fails. Well we have a few options….
Resolution:
order by PictureURL
Scripts:
#RUN AT YOUR OWN RISK
# You need to specify the mysite URL and path for log file. You run it like so:
# .\CheckProfilePicturesV7.ps1 -url http://mysite -filepath c:\logs -full
# When it's done, it will automatically open the log file ex:"c:\logs\ProblemPicLog.txt" in Notepad (if it finds problems)
# If it finds any profiles with problem picture URLs, it will prompt you to decide if
# you want to automatically remove the picture for those profiles. Just answer Y or N.
#IF YOU ANSWER YES, OR Y, THERE WILL BE DATA LOSS TO THAT PROFILE AS THE PICTURE WILL BE REMOVED!!!!!!!!!!!!!!!
Param(
[Parameter(Mandatory=$True,Position=1)]
[string]$URL,
[Parameter(Mandatory=$True)]
[string]$filePath,
[Parameter(Mandatory=$False)]
[switch]$Full
)
$logfile = "$filePath\ProblemPicLog.txt"
[array]$problemProfiles = @()
[array]$problemProfileReport = @()
[array]$ProfilesWithPics = @()
$site = Get-SPSite $url
if ($site) {Write-Host "Successfully obtained site reference"}
else {Write-Host "Failed to obtain site reference. Check the URL you entered"}
$serviceContext = Get-SPServiceContext($site)
if ($serviceContext) {Write-Host "Successfully obtained service context"}
else {Write-Host "Failed to obtain service context"}
$upm = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($serviceContext)
if ($upm) {Write-Host "Successfully obtained user profile manager"}
else {Write-Host "Failed to obtain user profile manager. Make sure the site you entered is associated with a UPA"}
# Go get all the profiles with a picture set and store their login name and picture URL in an array
$numpics = 0
Write-Host "Working on grabbing the profiles. This may take a while if you have a large number of profiles with pictures..." -ForegroundColor green
$profiles = $upm.GetEnumerator()
foreach($user in $profiles)
{
if ($user["PictureURL"].Value)
{$numpics++
$pic = $user["PictureURL"].Value
$ProfilesWithPics += ,@($user.MultiloginAccounts, $pic)
}
}
Write-Host "There appears to be " $numpics " profiles with pictures set" -ForegroundColor green
Function Hit-AllProfilePictures-Quick
{
Write-Host "Doing a QUICK check for all mthumb and lthumbs using Object Model." -ForegroundColor green
Write-Host "Notes:"
Write-Host "This will only work when run from the mysite farm."
Write-Host "It only checks to see if there is a file with matching name in the picture library. It checks for both the medium and large thumbnails."
Write-Host "It does not account for networking / environmetnal issues. To check for that, run with the -Full parameter."
$date = Get-Date -Format U
"Started Quick picture check at " + $date + " (UTC time)" | out-file $logfile -append
"===============================================" | out-file $logfile -append
$progressCounter = 0
$countProblemProfiles = 0
# Get all picture file names into an array so we can more easily access them
[array]$PictureFileNames = @()
$msh = get-spweb $upm.MySiteHostUrl
$list = $msh.lists["User Photos"]
foreach($listitem in $list.items)
{
$PictureFileNames += $listitem.name
}
#Loop through the array and do the file name comparison
for ($a=0; $a -lt $ProfilesWithPics.length; $a++)
{ $progressCounter++
Write-Progress -Activity "Checking Picture Thumbnails" -status "Checking $progressCounter" -percentComplete ($progressCounter / $ProfilesWithPics.length*100)
$UName = $ProfilesWithPics[$a][0]
$PUrl = $ProfilesWithPics[$a][1]
"PictureURL for " + $UName + " = " + $PUrl | out-file $logfile -append
$mthumbURL = $PUrl
$lthumbURL = $mthumbURL.Replace("MThumb", "LThumb")
# Check the file name array that I got from the picture library to see if there is a file in there with the same name
"Checking for Medium thumbnail " + $mthumbURL | out-file $logfile -append
Try
{
$pieces = $mthumbURL.split("/")
$numberofpieces=$pieces.Count
$Fname=$pieces[$NumberOfPieces-1]
if($PictureFileNames -contains $FName)
{"Found " +$Fname +" in the picture library" | out-file $logfile -append}
else{"ERROR!!! for user: " + $UName + " --- could not find " +$FName +" in the picture library" | out-file $logfile -append
$problemProfiles += $UName
$problemProfileReport += $UName, $mthumbURL
$countProblemProfiles++
}
}
catch [Exception]
{"ERROR!!! for user: " + $UName + " --- " + $_.Exception.Message | out-file $logfile -append
" " | out-file $logfile -append
$problemProfiles += $UName
$problemProfileReport += $UName, $mthumbURL, $_.Exception, " "
$countProblemProfiles++
}
"Checking for Large thumbnail " + $lthumbURL | out-file $logfile -append
Try
{$pieces = $lthumbURL.split("/")
$numberofpieces=$pieces.Count
$Fname=$pieces[$NumberOfPieces-1]
if($PictureFileNames -contains $Fname)
{"Found " +$Fname +" in the picture library" | out-file $logfile -append}
else{ "ERROR!!! for user: " + $UName + " --- could not find " +$Fname +" in the picture library" | out-file $logfile -append
$problemProfiles += $UName
$problemProfileReport += $UName, $lthumbURL
$countProblemProfiles++
}
}
catch [Exception]
{"ERROR!!! for user: " + $UName + " --- " + $_.Exception.Message | out-file $logfile -append
" " | out-file $logfile -append
$problemProfiles += $UName
$problemProfileReport += $UName, $lthumbURL, $_.Exception, " "
$countProblemProfiles++
}
" " | out-file $logfile -append
}
if ($problemProfileReport)
{"In summary, these are your problem profiles: " | out-file $logfile -append
"----------------------------------------------" | out-file $logfile -append
ForEach ($profileReport in $problemProfileReport)
{$profileReport | out-file $logfile -append
}
Write-Host "Done. " $countProblemProfiles "missing thumbnails were identified. The log file you specified in" $logfile "should open in Notepad. Please review the results before proceeding. A summary of all the errors is at the bottom." -foregroundcolor red
Write-Host "Total number of profiles with pictures processed = " $progressCounter -foregroundcolor green
Start-Process notepad -WindowStyle normal -FilePath $logfile
[String]$YN = Read-Host "Do you want to remove the picture for the problem profiles that were identified? Y\N"
if($YN -ieq "y" -or $YN -ieq "yes" )
{write-host "You chose Yes" -foregroundcolor red
write-host "Removing problematic profile picture links..." -foregroundcolor red
Remove-ProblemPictures
}
else{write-host "You chose No" -foregroundcolor red
write-host "No pictures were automatically removed. You should manually verify the profile picture URLs for the identified problem profiles are correct. The Sync service needs to be able to access these with an HTTP GET." -foregroundcolor red
}
}
else
{Write-Host "Good News! There were no problem profiles detected" -foregroundcolor green
Write-Host "Total number of profiles with pictures processed = " $progressCounter -foregroundcolor green
Write-Host "You can have a look at the log file you specified in" $logfile -foregroundcolor green
}
}
Function Hit-AllProfilePictures-Full
{
Write-Host "Doing a FULL check for all Mthumbs and Lthumnbs by doing an HTTP GET request" -ForegroundColor green
Write-Host "Working on it..." -ForegroundColor green
$date = Get-Date -Format U
"Started Full picture check at " + $date + " (UTC time)" | out-file $logfile -append
"===============================================" | out-file $logfile -append
$progressCounter = 0
$countProblemProfiles = 0
#Loop through the array and do the file name comparison
for ($a=0; $a -lt $ProfilesWithPics.length; $a++)
{ $progressCounter++
Write-Progress -Activity "Checking Picture Thumbnails" -status "Checking $progressCounter" -percentComplete ($progressCounter / $ProfilesWithPics.length*100)
$UName = $ProfilesWithPics[$a][0]
$PUrl = $ProfilesWithPics[$a][1]
$mthumbURL = $PUrl
$lthumbURL = $mthumbURL.Replace("MThumb", "LThumb")
# Do a web request to the mthumb URL we found for the profile
"Hitting picture " + $mthumbURL | out-file $logfile -append
$date = Get-Date -Format U
$date + " (UTC time)" | out-file $logfile -append
Try
{ $request = [System.Net.WebRequest]::Create($mthumbURL)
$request.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
$request.proxy = [System.Net.WebRequest]::DefaultWebProxy
$request.ContentType = "application/x-www-form-urlencoded"
$request.Method = "GET"
"Response = " + $request.GetResponse().StatusCode | out-file $logfile -append
" " | out-file $logfile -append
}
catch [Exception]
{ "ERROR!!! for user: " + $UName + " --- " + $_.Exception.Message | out-file $logfile -append
" " | out-file $logfile -append
$problemProfiles += $UName
$problemProfileReport += $UName, $mthumbURL, $_.Exception, " "
$countProblemProfiles++
}
# Now do a web request to the Lthumb URL we found for the profile
"Hitting picture " + $LthumbURL | out-file $logfile -append
$date = Get-Date -Format U
$date + " (UTC time)" | out-file $logfile -append
Try
{ $request = [System.Net.WebRequest]::Create($LthumbURL)
$request.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
$request.proxy = [System.Net.WebRequest]::DefaultWebProxy
$request.ContentType = "application/x-www-form-urlencoded"
$request.Method = "GET"
"Response = " + $request.GetResponse().StatusCode | out-file $logfile -append
" " | out-file $logfile -append
}
catch [Exception]
{ "ERROR!!! for user: " + $UName + " --- " + $_.Exception.Message | out-file $logfile -append
" " | out-file $logfile -append
$problemProfiles += $UName
$problemProfileReport += $UName, $LthumbURL, $_.Exception, " "
$countProblemProfiles++
}
}
if ($problemProfileReport)
{"In summary, these are your problem profiles: " | out-file $logfile -append
"----------------------------------------------" | out-file $logfile -append
ForEach ($profileReport in $problemProfileReport)
{$profileReport | out-file $logfile -append
}
Write-Host "Done. " $countProblemProfiles "missing thumbnails were identified. The log file you specified in" $logfile "should open in Notepad. Please review the results before proceeding. A summary of all the errors is at the bottom." -foregroundcolor red
Write-Host "Total number of profiles with pictures processed = " $progressCounter -foregroundcolor green
Start-Process notepad -WindowStyle normal -FilePath $logfile
[String]$YN = Read-Host "Want to remove the picture for the problem profiles that were identified? Y\N"
if($YN -ieq "y" -or $YN -ieq "yes" )
{write-host "You chose Yes" -foregroundcolor red
write-host "Removing problematic profile picture links..." -foregroundcolor red
Remove-ProblemPictures
}
else{write-host "You chose No" -foregroundcolor red
write-host "No pictures were automatically removed. You should manually verify the profile picture URLs for the identified problem profiles are correct. The Sync service needs to be able to access these with an HTTP GET." -foregroundcolor red
}
}
else
{Write-Host "Good News! There were no problem profiles detected." -foregroundcolor green
Write-Host "Total number of profiles with pictures processed = " $progressCounter -foregroundcolor green
Write-Host "You can have a look at the log file you specified in" $logfile -foregroundcolor green
}
}
Function Remove-ProblemPictures()
{if ($problemprofiles)
{
ForEach ($problemprofile in $problemProfiles)
{write-host "Removing the picture link for profile: " $problemprofile
$userProfile = $upm.GetUserProfile($problemprofile)
$ProfilePictureUrl = ""
$userProfile["PictureURL"].Value = $ProfilePictureUrl
$userProfile.Commit()
}
Write-Host "Done. The broken picture links should be cleared up. You can wait few minutes (it takes a minute or two to remove the values from cache) and then try running this script again, or just run a Full Sync." -foregroundcolor green
}
Else{Write-Host "No problem picture links to remove!" -foregroundcolor red}
}
If($Full -eq $true)
{Hit-AllProfilePictures-Full($url)}
Else{Hit-AllProfilePictures-Quick($url)}
More Information:
All Scripts are provided as is. Use at your Own Risk
It is possible to run not only Python but also custom R scripts on Azure Machine Learning (AML) service. There exist several R versions and many optional R packages around. What about compatibility? Is AML possible to run the same R script that is already running on your local machine? Which R packages are installed on AML?
Following experiments will answer the above questions and we will develop our first AML experiment with a custom R script.
In our previous blog post, we mentioned about R and R Studio and also developed a simple R script that runs an ML model.
(quote from prev. post) You can get the free open source development environment and libraries from https://www.r-project.org. Moreover, a free IDE with GUI can be found at https://www.rstudio.com. There also exist hundreds of open source algorithms, software libraries under https://cran.r-project.org.
> version
output will be something like:
Here we run the R command named "version" which returns the R version related details and print them on the command window. version.string or minor/major values in the output window are the version of R environment installed on our machine. In our case local R version is: 3.1.0
Select all text inside "R Script" textbox and delete them. Now copy/paste the following custom R code inside the textbox.
v <- version property <- as.character(names(v)) value <- as.character(v) data.set <- as.data.frame(cbind(property, value)) maml.mapOutputPort("data.set"); |
data.set <- data.frame(installed.packages()) maml.mapOutputPort("data.set") |
TODO: In our upcoming post, we will mention about installing and running custom R packages. Developing own R learning model and using it in a native AML experiment.
Background:
Picture the requirement to have multiple UPAs and multiple UPSS running in a single farm. We don't need to talk about the whys, but we will talk about the how's, and a case I had the pleasure of working where the profiles weren't being removed after they were missing in a sync. We'll even talk a little about the my site cleanup timer job. Not a whole lot because there are a lot of good articles out there that already dig deep into this timer job.
Configuration:
Cause:
Our issue was in fact that the second UPA for the external domain had a dummy entry for the my site host URL. When we remove users from a sync for whatever reason these users are marked for deletion in the userprofile_full table in the profile database. There is a timer job that runs call "My Site Cleanup Timer Job". The purpose of this timer job is to Remove the users profile from the database and also remove the users associated my site. The problem with having a dummy my site host for the external domain's UPA is that when the timer job attempts to located the registered my site it can't find it due to it not existing and the job fails. Thus resulting in no user getting removed and no my site getting flagged for deletion.
Resolution:
We adjusted the my site host URL to point to the existing my site and everything started working as expected with the my site cleanup timer job.