psappdeploytoolkit - module & cmdlet

Hello,

In order to test the “psappdeploytoolkit” cmdlet, one by one, i am looking for “psappdeploytoolkit” module.
Run the cmdlet without the “deploy-Application.ps1”.
Just like this :
“C:\PS>Set-ActiveSetup -Key ‘ProgramUserConfig’ -PurgeActiveSetupKey”
How can i use the “psappdeploytoolkit” cmdlet in the powershell console our Powershell ISE ?

Best Regards

This question should probably be replied on by the PSAppDeploymentToolkit team, but here’s my thoughts at least.

You would most likely have to modify the AppDeploymentToolkitMain.ps1 quite extensively as it isn’t written to be run as you intend to utilize it.

My suggestion would be to create your own PS module and re-write each function you’re interested in, as it’s own standalone cmdlet. Save it to any path in $env:PSModulePath or load it with Import-Module.

I am no licensing expert, but I’d advice you to make sure you’re not committing to any licensing violations (believe in this case it’s Microsoft Public License), if your intend to redistribute (seems like you aren’t though).

Cheers

<code>		[string]$moduleAppDeployToolkitMain = &quot;$scriptDirectory\_Include\AppDeployToolkit\AppDeployToolkitMain.ps1&quot;
		If (-not (Test-Path -Path $moduleAppDeployToolkitMain -PathType Leaf)) { Throw &#039;Le module n existe pas à l&#039;&#039;endroit spécifié: [$moduleAppDeployToolkitMain].&#039; }
		Set-StrictMode -off
			. $moduleAppDeployToolkitMain  
		Set-StrictMode -Version Latest</code>

And do what you want.

Rename :
AppDeployToolkitMain.ps1 to AppDeployToolkitMain.psm1

Run poweshell command :
Install-Module AppDeployToolkitMain.psm1

It si done.