CMD to PS formatting help. Netapp install.

Ask your Windows PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
Posts: 709
Joined: Wed Oct 08, 2014 6:02 am

Re: CMD to PS formatting help. Netapp install.

Post by dan.potter » Tue Sep 26, 2017 5:45 pm

Thanks, I was confused why I could set the here string to the clipboard and copy it into cmd and it would install without issue. I left a space at the end of each line thinking PS automatically eliminates the return. It happens with out-file too.

The dsc package resource is looking for a string for the args so I used the here string to populate the various variables and then used that in the resource. Keeping it all on one line of course.

Package [string] #ResourceName
Name = [string]
Path = [string]
ProductId = [string]
[ Arguments = $herestring ]