# Applying code changes

**URL:** <https://community.icinga.com/t/applying-code-changes/14531>\
**Category:** Icinga for Windows\
**Created:** [January 31, 2025, 3:32pm UTC](https://community.icinga.com/t/applying-code-changes/14531 "2025-01-31T15:32:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adn77](https://community.icinga.com/user_avatar/community.icinga.com/adn77/32/7028_2.png) [@adn77](https://community.icinga.com/u/adn77)\
**Post date:** [January 31, 2025, 3:32pm UTC](https://community.icinga.com/t/applying-code-changes/14531/1 "2025-01-31T15:32:21Z")

</div>

Even with yesterday’s release we’re faced with errors in the Hyper-V plugin (possibly related to using storage spaces described here [Powershell Errors on Hyper-V Hosts running Windows Storage Spaces · Issue #75 · Icinga/icinga-powershell-hyperv · GitHub](https://github.com/Icinga/icinga-powershell-hyperv/issues/75))

It’s pretty easy to catch the error and debug further when editing the compiled module as the error refers to the line numbers there.

In order to contribute and prepare a PR, I am wondering how can I recreate the compiled version? I looked at the developer guide, would I have to use `Publish-IcingaForWindowsComponent`?

---

<div class="post-metadata">

**Author:** ![lorenz](https://community.icinga.com/user_avatar/community.icinga.com/lorenz/32/7666_2.png) [@lorenz](https://community.icinga.com/u/lorenz)\
**Post date:** [February 3, 2025, 11:03am UTC](https://community.icinga.com/t/applying-code-changes/14531/2 "2025-02-03T11:03:05Z")

</div>

Hi @adn77,  
I am not sure whether I do understand your question. There is no “real” compiled version, since Powershell is a interpreted language runtime.  
However you might be thinking to the “CodeCache” (all code files concatenated together to make loading faster, afaik), which you can regenerate with `Write-IcingaFrameworkCodeCache`.

---

<div class="post-metadata">

**Author:** ![adn77](https://community.icinga.com/user_avatar/community.icinga.com/adn77/32/7028_2.png) [@adn77](https://community.icinga.com/u/adn77)\
**Post date:** [February 5, 2025, 5:23am UTC](https://community.icinga.com/t/applying-code-changes/14531/3 "2025-02-05T05:23:56Z")

</div>

Hi @lorenz,  
thanks for your response, it helped me to get on the right track 🙂  
`Write-IcingaFrameworkCodeCache` works for the framework, I had been looking at “_compiling_” plugin code and found the answer in `Write-IcingaForWindowsComponentCompilationFile`. Turns out the shipped code contains a placeholder file in the `.\compiled` directory of the plugin module. This gets overwritten by a concatenated version of all psm1 files of the modul on first run.

In case somebody needs to do this, place your shell in the `.\compiled` directory (!) of the module and run:

```auto
Write-IcingaForWindowsComponentCompilationFile -CompiledFilePath .\compiled\icinga-powershell-hyperv.ifw_compilation.psm1

```

The name of the psm1 file has to match the already existing cache file.
