powershell add-content command not working
I'm trying to use the exec type with the powershell provider to add content to a windows file. The powershell command is as follows, and works fine from the command prompt. add-content -path c:\utils\test -value 'testing'
However, putting this in a module.. doesn't do anything. I get success message when running puppet agent --test, even though the file never gets created, and therefore no value inside. Even If I create the file manually, the puppet code with powershell doesn't update the file.. something wrong with what I'm doing? or with the powershell provider? Here's the success message...
add-content -path c:\utils\test -value 'testing' Notice: /Stage[main]/All_servers/Exec[test]/returns: executed successfully