# Install Windows Identity Extensions with ansible/Chocolatey

**URL:** <https://forum.ansible.com/t/install-windows-identity-extensions-with-ansible-chocolatey/30585>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [June 17, 2019, 7:23pm UTC](https://forum.ansible.com/t/install-windows-identity-extensions-with-ansible-chocolatey/30585 "2019-06-17T19:23:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yue](https://avatars.discourse-cdn.com/v4/letter/y/bbe5ce/32.png) [@Yue](https://forum.ansible.com/u/Yue)\
**Post date:** [June 17, 2019, 7:23pm UTC](https://forum.ansible.com/t/install-windows-identity-extensions-with-ansible-chocolatey/30585/1 "2019-06-17T19:23:05Z")

</div>

Hello

I hit a problem when trying to install Windows Identity Extensions with ansible/chocolatey. (ansible 2.8.1)

I created an package for Windows Identity extensions:

The .nuspec

\<?xml version="1.0"?\>

MicrosoftIdentityExtensions\_x64

1.0

MicrosoftIdentityExtensions\_x64

Name

Microsoft

false

Windows Identity Extensions

#Windows Identity Extensions 

MicrosoftIdentityExtensions\_x64

tools/chocolateyInstall.ps1:

$packageArgs = @{

packageName = ‘MicrosoftIdentityExtensions-64.msi’

fileType = ‘msi’

url = ‘[https://download.microsoft.com/download/0/1/D/01D06854-CA0C-46F1-ADBA-EBF86010DCC6/rtm/MicrosoftIdentityExtensions-64.msi](https://download.microsoft.com/download/0/1/D/01D06854-CA0C-46F1-ADBA-EBF86010DCC6/rtm/MicrosoftIdentityExtensions-64.msi)’

checksum = ‘775AF844A832FB3B7A478B89880B7F09FAAC4772A029E7D55681A7E7EBB2270F’

checksumType = ‘sha256’

silentArgs = ‘/quiet IACCEPTSQLNCLILICENSETERMS=YES’

validExitCodes = @(0)

softwareName = ‘Windows Identity Extensions’

}

Install-ChocolateyPackage @packageArgs

When use ansible/chocolatey to install this package:

- name: Install Windows Identity Extensions

win\_chocolatey:

name: MicrosoftIdentityExtensions\_x64

source: http://local\_repository/

state: present

The exit code 0 which indicated the successful installation of the package, however, It only copied the target file(s) to target location, the package is **NOT** showing up in control panel on target server.

When call choco command locally to install this package:

choco install -s “http://local\_repository/” MicrosoftIdentityExtensions\_x64 -y

the exit code is 0 and package is installed successfully .

Please help to debug

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [June 17, 2019, 8:44pm UTC](https://forum.ansible.com/t/install-windows-identity-extensions-with-ansible-chocolatey/30585/2 "2019-06-17T20:44:44Z")

</div>

If the package is returning 0 but not actually installing itself you need to find out why, the usual case is that you are running over WinRM which does change the behaviour slightly. Unfortunately Chocolatey is mostly a black box in Ansible, all the module does is calls ‘choco install …’. What I would do is;

- Use ‘win\_command: choco install -s “http://local\_repository/” MicrosoftIdentityExtensions\_x64 -y"’ to see if that works
- Modify your package so the call to msiexec outputs the log file [1]
- Try and install it manually with win\_command
- ‘win\_command: msiexec /i C:\path\to\MicrosoftIdentityExtensions\_x64.msi’- Check for any Chocolatey logs to see if has anything that could indicate why it didn’t install
- Use become [2] on your win\_chocolatey step and see if that works

[1] - [https://www.advancedinstaller.com/user-guide/qa-log.html](https://www.advancedinstaller.com/user-guide/qa-log.html)  
[2] - [https://docs.ansible.com/ansible/latest/user\_guide/become.html#become-and-windows](https://docs.ansible.com/ansible/latest/user_guide/become.html#become-and-windows)

Thanks

Jordan

---

<div class="post-metadata">

**Author:** ![Yue](https://avatars.discourse-cdn.com/v4/letter/y/bbe5ce/32.png) [@Yue](https://forum.ansible.com/u/Yue)\
**Post date:** [June 18, 2019, 6:38pm UTC](https://forum.ansible.com/t/install-windows-identity-extensions-with-ansible-chocolatey/30585/3 "2019-06-18T18:38:14Z")

</div>

Hi Jordan,

Thank you for point me to the right direction, I have compared msi output file, found that

msiexec /i C:\path\to\MicrosoftIdentityExtensions\_x64.msi only do the installation for current user , msiexec /i ALLUSERS=“1” C:\path\to\MicrosoftIdentityExtensions\_x64.msi do the installation for all users.
