Hello all!
I am EXTREMELY new to scripting in Powershell. I wrote the following super simple script to use as a user login script -
New-Item -ItemType directory -Path $Env:Appdata\sap\common
copy-Item -Path \\filestore\users\sapini\saplogon.ini -Destination $Env:Appdata\sap\common
It creates new directory in the users profile when they log in. It then copies an ini file to that new directory. What I need to be able to do is have the script check to see if that file already exists at that location and if it does exist not overwrite it. If it doesn't exist it should go ahead and copy it over. If there any kind of toggle I can put in there to accomplish this?
Thanks!