I am working on a project that wants me to connect to corporate's SharePoint and download files using scripts. But they don't want to put username and password in the scripts or giving out credentials. How can I get access to sharepoint from the corporate's computer? I guess I can assume everything is logged in, so I don't need to enter passwords.
One thing that you can try using Power Shell is configure the Generic credentials from the Control Panel using a service account like this .
Then schedule your script to be run from this server and read the credentials like this .
- Install-Module -Name CredentialManager
- $managedCred = Get-StoredCredential
Let me know if any doubts with this one.