# # PowerShell 2 # # Export documents from ServiceView # # # Setup ServiceView options # # # URL to connect to ServiceView # $serviceview_api = "http:///put_document.php" # # The value of the SECRET option set in the options setup section. # $serviceview_secret = "" # # Get a specific service only using its service code, blank for all services # $serviceview_service_code = "" # # The service property to contain the document # $serviceview_property_code = "" # # The content type of the document # $serviceview_content_type = "" # # The name for the document once uploaded # $serviceview_filename = "" # # Build the URL to post to # $url = "$($serviceview_api)?secret=$($serviceview_secret)&service_code=$($serviceview_service_code)&property_code=$($serviceview_property_code)&content_type=$($serviceview_content_type)&filename=$($serviceview_filename)" # # Create a web client object # $wc = new-object net.webclient # # Upload the file # $local_filename = "$($pwd)\TRIM7.1_ReleaseNotes.pdf"; $webpage = $wc.UploadFile($url, $local_filename) # # See what came back # $ret = [System.Text.Encoding]::ASCII.GetString($webpage) echo $ret