Before if we have similar modules, or different version of the same module, we would need to have separate markdown files.
For example, let's say we have 4 modules:
- Lync Server 2010
- Lync Server 2013
- Skype for Business Server 2015
- Skype for Business Online
There is a simple cmdlet Get-Foo
which present in all of them, except Lync Server 2010.
Also, lets say that in Lync Server 2013 there is only one paramerer -Parameter1
on
this cmdlet.
But in Skype for Business Server 2015 and Skype for Business Online it also got a new parameter -Parameter2
.
Previously we would need to have 4 different module folder with a lot of duplicated markdown.
# Get-Foo
Great cmdlet
## PARAMETERS
### -Parameter1
# Get-Foo
Great cmdlet
## PARAMETERS
### -Parameter1
### -Parameter2
# Get-Foo
Great cmdlet
## PARAMETERS
### -Parameter1
### -Parameter2
Now we can combine all this duplicated markdown into a nice tight document.
```yaml
applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Online
```
# Get-Foo
Great cmdlet
## PARAMETERS
### -Parameter1
### -Parameter2
```yaml
applicable: Skype for Business Server 2015, Skype for Business Online
```
Note that we don't need to specify applicable
in the -Parameter1
metadata, because it exists in the all versions
of Get-Foo
Now to generate maml help for lets say Skype for Business Server 2015, we just pass this as a parameter to New-ExternalHelp
New-ExternalHelp -ApplicableTag 'Skype for Business Server 2015'
And we are getting the help scoped exactly to the right cmdlets and parameters!