- How much oxygen and hydrogen are in the soil of Mars?
- Why is hydrazine used in arcjet thrusters?
- How does Accion System's TILE propulsion module compare to an equivalently sized Hall effect or an Ion thruster?
- Particles changing color based on camera position?
- Blender .STL exports are too small when imported in Sli3er
- Version 2.8 or 2.79 to start learning Blender?
- Looking for advice on realizing Blender scanner type project, maybe using sensors in Game Engine?
- Whether every router in a AS must have its RouterID?
- What does “pacing his study” mean in this context?
- “We do me old” What does it mean?
- What is it called when someone says “I guess I expected too much from you”
- Difference was killed and killed
- Magento 2 Add New Integration error
- Magento 2 How to make changes to Bundle product edit detail page?
- How to specific pass fields in custom rest api for get product Information
- Magento2.1 Consumer is not authorized to access %resources
- Set Category wise Discount in Magento2
- Import product CSV to magento
- Future Lucy's right hand?
- Nanatsu no Taizai: Whats the first song at the beginning of episode 1 OVA
Running PowerShell in SIF using the Command Task
I am trying to build out some simple PowerShell tasks into SIF tasks, and I am really hitting a wall with the simplest stuff. My estimation is that a Command task is for exe and console apps and not PowerShell commands. Example below.
My JSON configuration file dsc.json
"Description": "DSC Install Path."
Correct. Try running Get-Help Invoke-CommandTask to see the documentation and guidance on the built in command task.
You can import arbitrary powershell functions by registering them in a custom module.
Create a psm1 file
In the psm1, use Register-SitecoreInstallExtension to register the function as a task
Add the psm1 in the modules section of your config
This will enable you to register existing or custom functions into the scope of your install.
E.g. Register-SitecoreInstallExtension -Command Start-DSConfiguration -As StartDSC -Type Task
Will enable you to use the task type StartDSC in your config.
In SIF V2, this will be even easier as a new feature simplifies custom function registration.
If you really need or want to put raw powershell in your config, check out SIX2018-08-11 20:12:44