Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Linking Azure with Sharepoint Library

$
0
0

Hi, All

I've been working a fair bit on a script that can log on to both Azure and Sharepoint (on office365), access the invoices for my subscriptions in Azure, download those that I don't have, and log off.

I've got this working, on the Azure side, and have a script that will download the invoices, assuming they're not already in existence.

Here's what I have:

Powershell
$User=([adsisearcher]"(samaccountname=$env:username)").FindOne().Properties.mail$Pass=ConvertTo-SecureString"MYPASSWORD"-AsPlainText-Force$AzCredentials=New-ObjectSystem.Management.Automation.PSCredential($user,$Pass)$O365Credentials=New-ObjectMicrosoft.SharePoint.Client.SharePointOnlineCredentials($User,$Pass)#Sharepoint Stuff$SiteURL="https://Library directory URL"$Context=New-ObjectMicrosoft.SharePoint.Client.ClientContext($SiteURL)#Log in...

Viewing all articles
Browse latest Browse all 15370

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>