Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Powershell COM Object / Expand O365 Library Ribbon

$
0
0

Good Morning,

I am using Powershell to create and manipulate a IE Com object so that I can map a drive letter for O365.  It used to work and now it appears that I have to connect and open it in a Windows Explorer window first before I map the drive.  This is located in the OneDrive tab, under the Ribbon, where you select 'open with Explorer'.  I can perform all of the functions with Powershell (Enable the ribbon, click on the open with Explorer option), but I cannot seem to figure out the command to expand the Library tab drop down.  I will provide a snippet of a couple of the other commands as a reference.

-----------------------------------------------------------------

# Enable Ribbon

$ie.document.getElementById("O365_MainLink_Settings").click()
$ie.document.getElementById("O365_SubLink_SuiteMenu_ctl00_SiteActionsMenuMainData_ctl00_MenuItem_ShowRibbon").click()
# Select Library from Ribbon bar
$ie.document.getElementById("Ribbon.Library-title").click() --------------------- Does not work!
# Open File Explorer Window
$ie.document.getElementById("Ribbon.Library.Actions.OpenWithExplorer-Small").click()
$ie.document.getElementById("Ribbon.Library.Actions.OpenWithExplorer-Medium").click()

The object appears to be either Ribbon.Library-title or Ribbon.Library, but the .click() method doesn't work for either.

Any suggestions?


Viewing all articles
Browse latest Browse all 7589

Trending Articles



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