Delete Azure AD

I had created an AD directory named alextestad in my Azure subscription in order to do some experiments, after that i tried to delete this temp AD, but i received

After some struggle i found how to do.
First must be added an Global admin user to this AD, in my case I added a user named “tobedeleted”

Clicking on create you get a temporary password:

At this point using another browser in a new Private window point to and login with the new account:

And immediately is requested to change the password:

At this point by clicking the button the login is done, obviously there is no subscription

but is not important.
At this point we need to install 2 things on our pc (found info here):
Microsoft Online Services Sign-In Assistant for IT Professionals RTW
Azure Active Directory Module for Windows PowerShell (64 bit)
Done this in the Azure Powershell we can launch

$objCred = get-credential

This causes the request of login where we use the credentials of the new user:

and then

connect-msolservice -credential $objCred

done this , we can launch in Powershell

Get-MsolServicePrincipal | Select DisplayName

This instructions lists all the applications Service Principals in AD, in my case

Now we can delete all not required apps in AD tenant

Get-MsolServicePrincipal | Remove-MsolServicePrincipal

where I got some errors but it seems no problem

Reissuing Get-MsolServicePrincipal | Select DisplayName in my case we had

Now in Azure portal is needed to delete the temp user, with the DELETE button at the end of this page

Done this, finally no errors while trying to delete the AD:

Categories: Azure

WordPress post from Word 2016

It was some times that i was posting on my blog directly, not from Microsoft Word.
I don’t remember when, but trying to post something from Word, using the Blog template, I got “Word cannot register your account”.
Tipically when you try to post from Word it is required to log in, the address was http://<yourwordpressblog>//xmlrpc.php and then the WordPress user and password.
After some attemps, i realized that WordPress is now using https: so the address to which post is https://<yourwordpressblog>//xmlrpc.php

Categories: Uncategorized

Apollo 11 source code

Here on GitHub.
It is also a time machine this code, remembering facts happened in the ’60s: read the initial comments in Luminary099/BURN_BABY_BURN–MASTER_IGNITION_ROUTINE.agc

Categories: Uncategorized

SQL Server 2016 Developer available

Categories: SQL Server

CRM 2016 installation

I was needing to prepare a CRM 2016 developer virtual machine, and i followed the instructions in this slideshare: but while installing SQL 2014 i got some alerts about the fact that SQL 2014 should not be installed on a domain controller, and after that no way to install CRM 2016: the setup was not finished and hanged.
So i tried to install SQL 2014 before the promotion of the server to a domain: this time the CRM setup, after the promotion to domain, was finished and the CRM site is working.

Categories: CRM

Windows 10 taskbar problems

Last July i updated my Windows 8.1 to 10, occasionally i noticed that on the taskbar was not present the alimentation icon; when was happening this problem Win 10 was not responding and i resolved the thing with a brute shutdown.
My installation is very slow to start, and i tried some operations; as a last resort yesterday i tried a registry defragmentation but this time the taskbar was dead: clicking on the start menu nothing, i was able to right clic the taskbar and change the properties.
From the other hand , the icons on desktop were working.
Before inserting the Windows 10 DVD and format, i tried to launch from Task Manager (fortunately i was able to right-clic the taskbar) an cmd console (Run New Task) with administrative privileges, and at the prompt:

sfc /scannow

Then i tried to reinstall all using PowerShell , launching powershell and inside the powershell prompt with the command:

Get-AppXPackage -AllUsers | Foreach{Add-AppxPackage -DisableDevelopmentMode -register "$($_.InstallLocation)\AppXManifest.xml"}

Some complains about the fact that some installed software was more recent than the registry version, but my taskbar is now working.
Ok, still slow to start…but my new notebook should be ready this week.

Categories: Uncategorized

String or binary data would be truncated

Doing an INSERT INTO a SQL Server 2014 table from a complex join with UNION i got this error.
There were many fields, very difficult to understand at a first sight where was the problem.
Fortunately in SQL Management Studio right clicking the database with Tasks->Import data i inserted the SQL with UNION in the Data Source, and the destination table in the Destination.
The curious thing: in SQL Management Studio the INSERT INTO failed and no records imported, the same operation in the SQL Server Import and Export Wizard instead succeed but with warnings, which are useful to understand which fields causes truncation:
01-03-2016 14-49-13

Categories: SQL Server, SSIS

Windows 10 Mobile update crash

On my Lumia 925, originally sold with Windows 8.1, i installed the official Windows 10: at a certain point i made an hard reset and the phone automatically downloaded Windows 10.
The hard reset was done when i was not able to install updates on the Windows 10 preview (from Windows Insider); now there were an update for the official Windows 10 ending for 107, if i remember well, but the phone was not able to complete the install.
I noticed that continuously tapping on the screen, in order to avoid the phone standby, the procedure was able to end, but after the reboot the screen showed 2 gears and then a big sad smile , as this ->     : – (
No way to reset hard or soft, at every reboot the gears and then after a few seconds the dreaded smile: i was already thinking to buy a new phone.
But i discovered the Windows Device Recovery Tool, that after the downloading of 1,65 gb installed a working Windows 8.1 on my phone; and then using the Windows Phone Developer Registration 8.1 (installed with Windows Phone SDK 8.1) i re-registered the device in order to publish on it my apps developed with Visual Studio 2013.
Thanks to Google sync i lost nothing of interest, but anyway i will be suspicious about updating the 925 to Windows 10..

Categories: Vs2013, WinPhone

Cannot resolve the collation conflict

Making an UNION between two SQL Server 2014 views i got the error

Cannot resolve the collation conflict between “SQL_Latin1_General_CP1_CI_AS” and “Latin1_General_CI_AS”

There are many fields, a problem.. fortunately there is an easy solution with

SELECT, col.collation_name
sys.columns col
object_id = OBJECT_ID('<yourview>')

With this query we get something as (fields name hidden for privacy):
01-03-2016 16-10-38
I tried with the first view and then with the another view in UNION, here is immediately visible which are the problematic fields (the few ones with another collation, in this case “Latin1_General_CI_AS”) .
Then for these fields we can add the collation, as in this case where there is also an CASE WHEN:

   'Not specified' COLLATE SQL_Latin1_General_CP1_CI_AS
END AS category

and the error is solved.

Categories: SQL Server

Get every new post delivered to your Inbox.