diff --git a/Programs/WebBrowserPassView.exe b/Programs/WebBrowserPassView.exe new file mode 100644 index 0000000..baea798 Binary files /dev/null and b/Programs/WebBrowserPassView.exe differ diff --git a/Programs/psget.zip b/Programs/psget.zip new file mode 100644 index 0000000..4de28da Binary files /dev/null and b/Programs/psget.zip differ diff --git a/READ ME.txt b/READ ME.txt new file mode 100644 index 0000000..abe806f --- /dev/null +++ b/READ ME.txt @@ -0,0 +1,24 @@ +This Script is designed to run in Syncro and to take Passwords saved in all browsers and import them into ITGlue. + +There are 2 global variables input through Syncro, $asset_name and $account_name which take the asset_name and account_name from Syncro respectively. + +All programs go to the Path "C:\TechTools\pw" for ease of access and cleanup. +Programs needed to run the Script: +WebBrowserPassView.exe +psget.zip + + +Windows Defender sometimes blocks the programs from running. If this happens the script will fail. When this happens just wait a minute or 2 then run again. Built into the script is a line of code that creates an exclution in Windows Defender to prevent it from stoping the script. +---------------------------------------------------------------------------------------------------------------------------- +The script should do 5 functions: +1. export the passwords from all browsers into a CSV file format +2. If the Company doesn't exist in ITGlue Inform the User to syncronize the Syncro Company to ITGlue +3. Import the CSV into the ITGlue using the API PowershellWrapper +4. Upload the CSV to the Asset on Syncro +5. Cleanup all the new programs and files added from running this script, with the exeption of the TechTools folder + +--------------------------------------------------------------------------------------------------------------------------- +Even though the script is designed to work with the SyncroMSP it can be adapted to run on any MSP or even straight on Powershell. +To do this you need to add in the global variables $asset_name and $account_name +Next you need to have the computer in question store the programs psget.zip and WebBrowserPassView.exe in the path "C:\TechTools\pw" +And with that it has been adapted to whatever form is needed. \ No newline at end of file diff --git a/Syncro ITGlue Intigration.ps1 b/Syncro ITGlue Intigration.ps1 new file mode 100644 index 0000000..f031bf6 --- /dev/null +++ b/Syncro ITGlue Intigration.ps1 @@ -0,0 +1,57 @@ +Import-Module $env:SyncroModule +## + +#Adds an exclusion to Windows Defender for Path C:\Techtools +Add-MpPreference -ExclusionPath "C:\Techtools" + +#Disables Windows Defender +$defenderOptions = Get-MpComputerStatus +$defenderOn = $defenderOptions.RealTimeProtectionEnabled + +if($defenderOn = $true){ +Set-MpPreference -DisableRealtimeMonitoring $true +} + +Start-Process -FilePath "C:\TechTools\pw\WebBrowserPassView.exe" -ArgumentList "/LoadPasswordsIE 1 /LoadPasswordsFirefox 1 /LoadPasswordsChrome 1 /LoadPasswordsOpera 1 /LoadPasswordsSafari 1 /scomma C:\TechTools\pw\WebBrowserPassView.csv" +Upload-File -Subdomain "supportit" -FilePath "C:\TechTools\pw\WebBrowserPassView.csv" + +Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force +Install-Module -Name ITGlueAPI -Force +Import-Module ITGlueAPI -DisableNameChecking +Add-ITGlueAPIKey -Api_Key ITG.64f6ed5ede23d9bfb823590c01d642fb.dFS-UVh2Nq-dlKFy5c8N1lg0CtEUDx2ai1FHOMbScPpoaeKrSGjmVqDE3qCWxEm3 + +Write-Host "Searching for $account_name in ITGlue" + +$results = Get-ITGlueOrganizations -filter_name $account_name + +$org_id = $results.data.id +#Add error check for if the orginization exists in Syncro. If not prompt user to syncronize the Syncro user to ITGlue and exit the script. + +if($org_id -eq $null){ + Write-Host "Company doesn't exist in ITGlue. Go to ITGlue and synchronize the Company from Syncro into ITGlue." + #Exit 2 +} +Write-Host "$org_id" + +$csv = Import-csv 'C:\TechTools\pw\WebBrowserPassView.csv' +$import_payload = @() +foreach($item in $csv) + { + $import_payload += @{'type' = 'passwords' + 'attributes' = @{'url' = $item.URL + 'name' = $item.'User Name' + ' ' + $item.URL + 'username' = $item.'User Name' + 'password' = $item.Password + 'notes' = 'Created at: ' + $item.'Created Time' + ' from asset: ' + $asset_name + }} + } + $import_payload +New-ITGluePasswords -organization_id $org_id -data $import_payload + +#Delete PW Directory +Remove-Item -Path 'C:\TechTools\pw' -recurse -force + +#Enables Windows Defender +if($defenderOn = $true){ +Set-MpPreference -DisableRealtimeMonitoring $false +} \ No newline at end of file