Product, version and build: PowerShell Studio 2017 v5.4.145
32 or 64 bit version of product: 64
Operating system: 64
When copying this text from a text editor:
Configuration MyTestConfig
{
Node ('localhost')
{
File FolderTest1
{
Ensure = "Present"
DestinationPath = "D:\DscTest1"
Type = "Directory"
}
}
}
Powershell studio automatically changes the text 'Type' to 'Get-Content' even though it's within a DSC context.
(btw,I reported this issue on a different post last August, see viewtopic.php?f=12&t=11772&p=63539#p63539 )
Copy & paste DSC code changes 'Type' to Get-Content'
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Copy & paste DSC code changes 'Type' to Get-Content'
What platform do you have selected? Because when V2 is selected, it doesn't understand configurations and it will treat it as commands.
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Copy & paste DSC code changes 'Type' to Get-Content'
DSC / Configurations require PowerShell V4 or greater.
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Copy & paste DSC code changes 'Type' to Get-Content'
You can create a remote profile of another machine if you need to:
https://www.sapien.com/blog/2012/10/15/ ... es-part-1/
https://www.sapien.com/blog/2012/10/16/ ... es-part-2/
Or use the Cache Editor to create a new profile that uses V4 or V5. This way you get PrimalSense for V4 even if you have a different version installed locally.
https://www.sapien.com/blog/2018/01/02/ ... he-editor/
https://www.sapien.com/blog/2012/10/15/ ... es-part-1/
https://www.sapien.com/blog/2012/10/16/ ... es-part-2/
Or use the Cache Editor to create a new profile that uses V4 or V5. This way you get PrimalSense for V4 even if you have a different version installed locally.
https://www.sapien.com/blog/2018/01/02/ ... he-editor/
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.