Showing results for 
Search instead for 
Did you mean: 
McAfee Employee Greg_Steele
McAfee Employee
Report Inappropriate Content
Message 1 of 2

Pulling Data from Master Repository

Hey Eveyone,

I am new to the whole scripting thing with ePO and I am having a problem pulling the content of the current branch within the Master Repository. Is it possible to pull that information via the Web API?  If so, are there any of these export data type scripts available on this forum?

1 Reply

Re: Pulling Data from Master Repository

The web api call you are looking for is repository.export.

The below code can be used in Powershell. It will collect the credentials to be used and use the System.Net.WebClient object for the calls.

Note: This will create a file called rep.txt on your ePO server's file system.

$credentials = Get-Credential -Credential $null
$User = $credentials.GetNetworkCredential().UserName
$password = $credentials.GetNetworkCredential().Password
$domain = $credentials.GetNetworkCredential().Domain

$pc = "rep.txt"

[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
$url = "https://{servername}:8443/remote/repository.export?fileName=$pc"
$navigate = new-object System.Net.WebClient
$navigate.credentials = New-Object$user, $password, $domain)

More McAfee Tools to Help You

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community