Ruby syntax error

Hi All,

Iam beginner in chef
Wrote a chef cookbook for Symantec installation while upload my cookbook gives Cookbook file has a ruby syntax error:
Iam not sure cookbook is right to password the windows powershell commands
NFS mount is happening
Help me to complete this
My cookbook

execute “directory symantec” do
command “mkdir c:\symantec”
end

execute “map drive” do
command “net use z: \9.1.1.2\var\nfs\general”
end

execute “Copy source” do
command “PowerShell Copy-Item -Recurse “Z:\symantec\Sep_client_12.1_English\Sep-client” -Destination “C:\symantec””
end

execute “Execute the install” do
command “PowerShell Start-Process -FilePath “C:\symantec\Sep-client\Setup.exe” -ArgumentList “/S /v/qn””
end

execute “Remove the directory” do
command “rmdir /S /Q C:\symantec”
end

Hey @venkatraj

First of all, I suggest your read more about chef documentation, especially it’s directory resource : https://docs.chef.io/resource_directory.html

Next, please format your code using the preformated text.

Finally, to answer your question, it seems to me you’ve got some extra quote here
command “PowerShell Copy-Item -Recurse “Z:\symantec\Sep_client_12.1_English\Sep-client” -Destination “C:\symantec””

You can use rubocop to help you find errors in your code.

Hi
Iam trying as per the chef doc : https://docs.chef.io/resource_mount.html

Iam unable to mount the remote linux drive in command line iam able to : net use z: \9.1.1.1\var\nfs\general

===========================================
directory ‘C:symantec’ do
action :create
recursive true
rights :full_control, “dstadmin”, :applies_to_children => true
end

mount ‘G:’ do
action :mount
device ‘\\9.1.1.1\var\nfs\general’
end