{"id":20046687,"url":"https://github.com/apteco/aptecopsmodules","last_synced_at":"2025-03-02T08:14:35.605Z","repository":{"id":62206092,"uuid":"558350353","full_name":"Apteco/AptecoPSModules","owner":"Apteco","description":"Apteco PowerShell Modules","archived":false,"fork":false,"pushed_at":"2025-01-22T10:07:13.000Z","size":743,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-01-22T11:19:54.408Z","etag":null,"topics":["apteco","powershell","powershell-module","powershell-script","windows"],"latest_commit_sha":null,"homepage":"https://www.powershellgallery.com/packages?q=Tags%3A%22Apteco%22","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Apteco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-27T11:28:06.000Z","updated_at":"2025-01-22T10:07:17.000Z","dependencies_parsed_at":"2023-09-22T14:16:44.818Z","dependency_job_id":"b4dc1fc7-ab99-4eba-95fa-e64a758c4bd3","html_url":"https://github.com/Apteco/AptecoPSModules","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apteco%2FAptecoPSModules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apteco%2FAptecoPSModules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apteco%2FAptecoPSModules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apteco%2FAptecoPSModules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Apteco","download_url":"https://codeload.github.com/Apteco/AptecoPSModules/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241476458,"owners_count":19968916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apteco","powershell","powershell-module","powershell-script","windows"],"created_at":"2024-11-13T11:28:36.982Z","updated_at":"2025-03-02T08:14:35.575Z","avatar_url":"https://github.com/Apteco.png","language":"PowerShell","readme":"[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/PlagueHO/PSAuth/blob/dev/LICENSE)\n\n# AptecoPSModules\n\nThe Apteco PowerShell Modules allow you to extend your current Apteco Marketing Stack with more customisation. For example here is fully featured Framework to create your own channels for Orbit and PeopleStage. Other modules in here are helpful in working with your data.\n\nAll modules are targeted to be published on [PowerShell Gallery](https://www.powershellgallery.com/packages?q=apteco). So Installation is much easier than copy\u0026paste.\n\nThose are the already published packages, but more are in the pipeline:\n\nName|Type|Repository/Version|Platform|Downloads|\n-|-|-|-|-\n[AptecoPSFramework](https://github.com/Apteco/AptecoPSFramework/)|Module|[![PowerShell Gallery Version (including pre-releases)](https://img.shields.io/powershellgallery/v/AptecoPSFramework)](https://www.powershellgallery.com/packages/AptecoPSFramework)|[![PowerShell Gallery Platform Support](https://img.shields.io/powershellgallery/p/AptecoPSFramework)](https://www.powershellgallery.com/packages/AptecoPSFramework)\u003cbr/\u003e[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.1-blue.svg)](https://github.com/PlagueHO/PSAuth)|[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/AptecoPSFramework)](https://www.powershellgallery.com/packages/AptecoPSFramework)\n[ConvertStrings](ConvertStrings/)|Module|[![PowerShell Gallery Version (including pre-releases)](https://img.shields.io/powershellgallery/v/ConvertStrings)](https://www.powershellgallery.com/packages/ConvertStrings)|[![PowerShell Gallery Platform Support](https://img.shields.io/powershellgallery/p/ConvertStrings)](https://www.powershellgallery.com/packages/ConvertStrings)\u003cbr/\u003e[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.1-blue.svg)](https://github.com/PlagueHO/PSAuth)|[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/ConvertStrings)](https://www.powershellgallery.com/packages/ConvertStrings)\n[ConvertUnixTimestamp](ConverUnixTimestamp/)|Module|[![PowerShell Gallery Version (including pre-releases)](https://img.shields.io/powershellgallery/v/ConvertUnixTimestamp)](https://www.powershellgallery.com/packages/ConvertUnixTimestamp)|[![PowerShell Gallery Platform Support](https://img.shields.io/powershellgallery/p/ConvertUnixTimestamp)](https://www.powershellgallery.com/packages/ConvertUnixTimestamp)\u003cbr/\u003e[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.1-blue.svg)](https://github.com/PlagueHO/PSAuth)|[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/ConvertUnixTimestamp)](https://www.powershellgallery.com/packages/ConvertUnixTimestamp)\n[EncryptCredential](EncryptCredential/)|Module|[![PowerShell Gallery Version (including pre-releases)](https://img.shields.io/powershellgallery/v/EncryptCredential)](https://www.powershellgallery.com/packages/EncryptCredential)|[![PowerShell Gallery Platform Support](https://img.shields.io/powershellgallery/p/EncryptCredential)](https://www.powershellgallery.com/packages/EncryptCredential)\u003cbr/\u003e[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.1-blue.svg)](https://github.com/PlagueHO/PSAuth)|[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/EncryptCredential)](https://www.powershellgallery.com/packages/EncryptCredential)\n[ExtendFunction](ExtendFunction/)|Module|[![PowerShell Gallery Version (including pre-releases)](https://img.shields.io/powershellgallery/v/ExtendFunction)](https://www.powershellgallery.com/packages/ExtendFunction)|[![PowerShell Gallery Platform Support](https://img.shields.io/powershellgallery/p/ExtendFunction)](https://www.powershellgallery.com/packages/ExtendFunction)\u003cbr/\u003e[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.1-blue.svg)](https://github.com/PlagueHO/PSAuth)|[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/ExtendFunction)](https://www.powershellgallery.com/packages/ExtendFunction)\n[InvokeWebRequestUTF8](InvokeWebRequestUTF8/)|Module|[![PowerShell Gallery Version (including pre-releases)](https://img.shields.io/powershellgallery/v/InvokeWebRequestUTF8)](https://www.powershellgallery.com/packages/InvokeWebRequestUTF8)|[![PowerShell Gallery Platform Support](https://img.shields.io/powershellgallery/p/InvokeWebRequestUTF8)](https://www.powershellgallery.com/packages/InvokeWebRequestUTF8)\u003cbr/\u003e[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.1-blue.svg)](https://github.com/PlagueHO/PSAuth)|[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/InvokeWebRequestUTF8)](https://www.powershellgallery.com/packages/InvokeWebRequestUTF8)\n[MeasureRows](MeasureRows/)|Module|[![PowerShell Gallery Version (including pre-releases)](https://img.shields.io/powershellgallery/v/MeasureRows)](https://www.powershellgallery.com/packages/MeasureRows)|[![PowerShell Gallery Platform Support](https://img.shields.io/powershellgallery/p/MeasureRows)](https://www.powershellgallery.com/packages/MeasureRows)\u003cbr/\u003e[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.1-blue.svg)](https://github.com/PlagueHO/PSAuth)|[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/MeasureRows)](https://www.powershellgallery.com/packages/MeasureRows)\n[MergeHashtable](MergeHashtable/)|Module|[![PowerShell Gallery Version (including pre-releases)](https://img.shields.io/powershellgallery/v/MergeHashtable)](https://www.powershellgallery.com/packages/MergeHashtable)|[![PowerShell Gallery Platform Support](https://img.shields.io/powershellgallery/p/MergeHashtable)](https://www.powershellgallery.com/packages/MergeHashtable)\u003cbr/\u003e[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.1-blue.svg)](https://github.com/PlagueHO/PSAuth)|[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/MergeHashtable)](https://www.powershellgallery.com/packages/MergeHashtable)\n[MergePSCustomObject](MergePSCustomObject/)|Module|[![PowerShell Gallery Version (including pre-releases)](https://img.shields.io/powershellgallery/v/MergePSCustomObject)](https://www.powershellgallery.com/packages/MergePSCustomObject)|[![PowerShell Gallery Platform Support](https://img.shields.io/powershellgallery/p/MergePSCustomObject)](https://www.powershellgallery.com/packages/MergePSCustomObject)\u003cbr/\u003e[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.1-blue.svg)](https://github.com/PlagueHO/PSAuth)|[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/MergePSCustomObject)](https://www.powershellgallery.com/packages/MergePSCustomObject)\n[SyncExtractOptions](SyncExtractOptions/)|Script|[![PowerShell Gallery Version (including pre-releases)](https://img.shields.io/powershellgallery/v/SyncExtractOptions)](https://www.powershellgallery.com/packages/SyncExtractOptions)|[![PowerShell Gallery Platform Support](https://img.shields.io/powershellgallery/p/SyncExtractOptions)](https://www.powershellgallery.com/packages/SyncExtractOptions)\u003cbr/\u003e[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.1-blue.svg)](https://github.com/PlagueHO/PSAuth)|[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/SyncExtractOptions)](https://www.powershellgallery.com/packages/SyncExtractOptions)\n[WriteLog](WriteLog/)|Module|[![PowerShell Gallery Version (including pre-releases)](https://img.shields.io/powershellgallery/v/WriteLog)](https://www.powershellgallery.com/packages/WriteLog)|[![PowerShell Gallery Platform Support](https://img.shields.io/powershellgallery/p/WriteLog)](https://www.powershellgallery.com/packages/WriteLog)\u003cbr/\u003e[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.1-blue.svg)](https://github.com/PlagueHO/PSAuth)|[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/WriteLog)](https://www.powershellgallery.com/packages/WriteLog)\n[Install-Dependencies](Install-Dependencies/)|Script|[![PowerShell Gallery Version (including pre-releases)](https://img.shields.io/powershellgallery/v/Install-Dependencies)](https://www.powershellgallery.com/packages/Install-Dependencies)|[![PowerShell Gallery Platform Support](https://img.shields.io/powershellgallery/p/Install-Dependencies)](https://www.powershellgallery.com/packages/Install-Dependencies)\u003cbr/\u003e[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.1-blue.svg)](https://github.com/PlagueHO/PSAuth)|[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/Install-Dependencies)](https://www.powershellgallery.com/packages/Install-Dependencies)\n[Import-Dependencies](Import-Dependencies/)|Script|[![PowerShell Gallery Version (including pre-releases)](https://img.shields.io/powershellgallery/v/Import-Dependencies)](https://www.powershellgallery.com/packages/Import-Dependencies)|[![PowerShell Gallery Platform Support](https://img.shields.io/powershellgallery/p/Import-Dependencies)](https://www.powershellgallery.com/packages/Import-Dependencies)\u003cbr/\u003e[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.1-blue.svg)](https://github.com/PlagueHO/PSAuth)|[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/Import-Dependencies)](https://www.powershellgallery.com/packages/Import-Dependencies)\n[PSOAuth](PSOAuth/)|Module|[![PowerShell Gallery Version (including pre-releases)](https://img.shields.io/powershellgallery/v/PSOAuth)](https://www.powershellgallery.com/packages/PSOAuth)|[![PowerShell Gallery Platform Support](https://img.shields.io/powershellgallery/p/PSOAuth)](https://www.powershellgallery.com/packages/PSOAuth)\u003cbr/\u003e[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.1-blue.svg)](https://github.com/PlagueHO/PSAuth)|[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/PSOAuth)](https://www.powershellgallery.com/packages/PSOAuth)\n[TestCredential](TestCredential/)|Module|[![PowerShell Gallery Version (including pre-releases)](https://img.shields.io/powershellgallery/v/TestCredential)](https://www.powershellgallery.com/packages/TestCredential)|[![PowerShell Gallery Platform Support](https://img.shields.io/powershellgallery/p/TestCredential)](https://www.powershellgallery.com/packages/TestCredential)\u003cbr/\u003e[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.1-blue.svg)](https://github.com/PlagueHO/TestCredential)|[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/TestCredential)](https://www.powershellgallery.com/packages/TestCredential)\n[PSNotify](PSNotify/)|Module|[![PowerShell Gallery Version (including pre-releases)](https://img.shields.io/powershellgallery/v/PSNotify)](https://www.powershellgallery.com/packages/PSNotify)|[![PowerShell Gallery Platform Support](https://img.shields.io/powershellgallery/p/PSNotify)](https://www.powershellgallery.com/packages/PSNotify)\u003cbr/\u003e[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.1-blue.svg)](https://github.com/PlagueHO/PSAuth)|[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/PSNotify)](https://www.powershellgallery.com/packages/PSNotify)\n[SqlPipeline](SqlPipeline/)|Module|[![PowerShell Gallery Version (including pre-releases)](https://img.shields.io/powershellgallery/v/SqlPipeline)](https://www.powershellgallery.com/packages/SqlPipeline)|[![PowerShell Gallery Platform Support](https://img.shields.io/powershellgallery/p/SqlPipeline)](https://www.powershellgallery.com/packages/SqlPipeline)\u003cbr/\u003e[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.1-blue.svg)](https://github.com/PlagueHO/PSAuth)|[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/SqlPipeline)](https://www.powershellgallery.com/packages/SqlPipeline)\n[OSMGeocode](OSMGeocode/)|Module|[![PowerShell Gallery Version (including pre-releases)](https://img.shields.io/powershellgallery/v/OSMGeocode)](https://www.powershellgallery.com/packages/OSMGeocode)|[![PowerShell Gallery Platform Support](https://img.shields.io/powershellgallery/p/OSMGeocode)](https://www.powershellgallery.com/packages/OSMGeocode)\u003cbr/\u003e[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.1-blue.svg)](https://github.com/PlagueHO/PSAuth)|[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/OSMGeocode)](https://www.powershellgallery.com/packages/OSMGeocode)\n\n\nHere are some high level descriptions. Please follow the links from the table or go into the subdirectories to get more detailed information.\n\n\n## AptecoPSFramework\n\nThis framework is mainly created for installing and using custom channels in Apteco Orbit and PeopleStage. The channel implementations are written in PowerShell and already implemented as \"Plugins\" in this module. But there is a function implemented so you can refer to your own channels that are not getting overwritten if you update this module.\n\n## ConvertStrings\n\nAllow you to manipulate strings like converting the string encoding or replacing strings. Random strings and hashed strings are also included.\n\n## MergePSCustomObject\n\nThis module merges two PSCustomObjects into one. It is able to handle nested structures like hashtables, arrays and PSCustomObjects. \n\n\n## ConvertUnixTimestamp\n\nConverts a `[DateTime]` into a numeric unix timestamp as `[UInt64]` and vice versa.\n\nTo get a unix timestamp from a `[DateTime]::Now` or `(Get-Date)` just do it like in these examples\n\n```PowerShell\nGet-Unixtime\nGet-Unixtime -InMilliseconds\nGet-Unixtime -InMilliseconds -Timestamp ( Get-Date ).AddDays(-2)\n```\n\nTo convert a timestamp back, just do it like here\n\n```PowerShell\nConvertFrom-UnixTime -Unixtime 1591775090\nConvertFrom-UnixTime -Unixtime 1591775090 -ConvertToLocalTimezone\nConvertFrom-UnixTime -Unixtime 1591775146091 -InMilliseconds\n( ConvertFrom-UnixTime -Unixtime $lastSession.timestamp ).ToString(\"yyyy-MM-ddTHH:mm:ssK\")\n```\n\n\n## EncryptCredential\n\nThis module is used to double encrypt sensitive data like credentials, tokens etc. They cannot be stolen pretty easily as it uses SecureStrings.\n\nExecute commands like\n\n```PowerShell\n\"Hello World\" | Convert-PlaintextToSecure\n```\n\nto get a string like\n\n```\n76492d1116743f0423413b16050a5345MgB8AEEAYQBmAEEAOABPAEEAYQBmAEYAKwBuAGQAegBxACsASQBRAGIAaQA0AEEAPQA9AHwANAAxAGEAYQBhADAAYwA3ADQAYwBiADkAYwAzADEAZgBkAGUAZQBkADQAOABhADIAMgA5AGUAMAAyADkANwBiADcAMQAyADgAOAAzADkAMwBiADAANAA0ADcAMwA3ADQANgAxADMAYwBmADQAZQAyADIAMwBkAGQAMQBhADUAMAA=\n```\n\nThis string can be decrypted by calling\n\n```PowerShell\n\"76492d1116743f0423413b16050a5345MgB8AEEAYQBmAEEAOABPAEEAYQBmAEYAKwBuAGQAegBxACsASQBRAGIAaQA0AEEAPQA9AHwANAAxAGEAYQBhADAAYwA3ADQAYwBiADkAYwAzADEAZgBkAGUAZQBkADQAOABhADIAMgA5AGUAMAAyADkANwBiADcAMQAyADgAOAAzADkAMwBiADAANAA0ADcAMwA3ADQANgAxADMAYwBmADQAZQAyADIAMwBkAGQAMQBhADUAMAA=\" | Convert-SecureToPlaintext\n```\n\nand get back\n\n```\nHello World\n```\n\n\n## ExtendFunction\n\nThis module can be used to extend existing functions/cmdlets with more scripting and possibly additional parameters like\n\n```PowerShell\nfunction Invoke-CoreWebRequest {\n    \n    [CmdletBinding()]\n    param (\n        [Parameter(Mandatory=$true)][string]$AdditionalString\n    )\n    DynamicParam { Get-BaseParameters \"Invoke-WebRequest\" }\n\n    Process {\n        Write-Host $AdditionalString\n        $updatedParameters = Skip-UnallowedBaseParameters -Base \"Invoke-WebRequest\" -Parameters $PSBoundParameters\n        Invoke-WebRequest @updatedParameters\n    }\n\n}\n```\n\n## InvokeWebRequestUTF8\n\nExecutes an `Invoke-WebRequst`, but converts the content afterwards into UTF8, if the correct encoding wasn't given back.\n\n## Install-Dependencies\n\nA small script that helps you to install scripts/modules/packages you need to load via a repository like PowerShellGallery or NuGet or a local repository.\n\nJust use\n\n```PowerShell\nInstall-Dependencies -Module \"WriteLog\" -LocalPackage \"System.Data.Sqlite\", \"Npgsql\" -Verbose\n```\n\n## Import-Dependencies\n\nA small script that helps you to import your installed modules and packages you have installed through PowerShellGallery, NuGet or a local repository.\n\nJust use\n\n```PowerShell\nImport-Dependencies.ps1 -Module \"WriteLog\" -LoadWholePackageFolder -Verbose\n```\n\nto load your `lib` subfolder or\n\n```Powershell\nImport-Dependencies.ps1 -Module \"WriteLog\" -LocalPackage \"System.Data.SQLite\", \"Npgsql\" -Verbose\n```\n\nto load specific folders\n\n\n## MeasureRows\n\nJust use\n\n```PowerShell\nMeasure-Rows -Path \"C:\\Temp\\Example.csv\"\n```\n\nor\n\n```PowerShell\n\"C:\\Temp\\Example.csv\" | Measure-Rows -SkipFirstRow\n```\n\nor\n\n```PowerShell\nMeasure-Rows -Path \"C:\\Temp\\Example.csv\" -Encoding UTF8\n```\n\nor even\n\n```PowerShell\n\"C:\\Users\\Florian\\Downloads\\adressen.csv\", \"C:\\Users\\Florian\\Downloads\\italian.csv\" | Measure-Rows -SkipFirstRow -Encoding ([System.Text.Encoding]::UTF8)\n```\n\nto count the rows in a csv file. It uses a .NET streamreader and is extremly fast.\n\n## MergeHashtable\n\nThis module merges two Hashtables into one. It is able to handle nested structures like hashtables, arrays and PSCustomObjects. \n\n## MergePSCustomObject\n\nThis module merges PSCustomObjects into one. It is able to handle nested structures like hashtables, arrays and PSCustomObjects.\n\n## OSMGeocode\n\nGeocode single or multiple addresses on the fly via OpenStreetMaps like \n\n```PowerShell\n$addr = [PSCustomObject]@{\"street\" = \"Schaumainkai 87\";\"city\" = \"Frankfurt\";\"postalcode\" = 60589;\"countrycodes\" = \"de\"}\n$addr | Invoke-OSM -Email \"user@example.com\" -AddressDetails -ExtraTags -ResultsLanguage \"de\"\n```\n\n## PSOAuth\n\nSupport of oAuth v2 in PowerShell! This module allows the oAuth flow to create your first api token for Microsoft Dynamics, Salesforce, CleverReach and much more...\nWe support redirect urls to local urls `http://localhost:54321` and app urls (handled via registry) `apttoken://localhost`. The local url is instantly starting up a\nbasic webserver on the port you have defined. This module can be used for debugging or server2server communication. Here you can see the two methods than can be used:\n\n```PowerShell\nimport-module PSOAuth -Verbose\n$oauthParam = [Hashtable]@{\n    \"ClientId\" = \"ssCNo32SNf\"\n    \"ClientSecret\" = \"\"     # ask for this at Apteco, if you don't have your own app\n    \"AuthUrl\" = \"https://rest.cleverreach.com/oauth/authorize.php\"\n    \"TokenUrl\" = \"https://rest.cleverreach.com/oauth/token.php\"\n    \"SaveSeparateTokenFile\" = $true\n}\nRequest-OAuthLocalhost @oauthParam\n```\n\nor\n\n```PowerShell\nimport-module PSOAuth -Verbose\n$oauthParam = [Hashtable]@{\n     \"ClientId\" = \"ssCNo32SNf\"\n     \"ClientSecret\" = \"\"     # ask for this at Apteco, if you don't have your own app\n     \"AuthUrl\" = \"https://rest.cleverreach.com/oauth/authorize.php\"\n     \"TokenUrl\" = \"https://rest.cleverreach.com/oauth/token.php\"\n     \"SaveSeparateTokenFile\" = $true\n}\nRequest-OAuthApp @oauthParam -Verbose\n```\n\n## PSNotify\n\nUse Telegram, Email, Teams and Slack to get notifications via commandline. This can be used to be notified when important things happen like\nsuccessful campaigns or maybe occured problems. Different channels can be bound together as groups so you can send the same message through\ndifferent channels.\n\n\n## SyncExtractOptions\n\nThis script is used to switch off or switch on some data sources in FastStats Designer to allow a build with only a few tables (like customer data)\nand then later do a bigger build with customer and transactional data.\n\nThis example just changes the behaviour of the extract options and saves it in the same xml\n\n```PowerShell\nSyncExtractOptions -DesignFile \"C:\\Apteco\\Build\\20220714\\designs\\20220714.xml\" -Include \"Bookings\", \"People\"\n```\n\n## SqlPipeline\n\nTo allow easier import of data into databases like PostgreSQL, SQLite, MariaDB/MySQL, SQLServer, Oracle and more there is a pretty handy\nmodule named `SimplySql`. As this module does not support pipeline input yet, I have created this wrapper with high flexibility. So\nthis module allows importing csv file import like\n\n```PowerShell\nImport-Module SqlPipeline, SimplySql\nOpen-SQLiteConnection -DataSource \".\\db.sqlite\"\nMeasure-Command {\n    import-csv -Path '.ac_adressen.csv' -Encoding UTF8 -Delimiter \",\" | Add-RowsToSql -TableName \"addresses\" -UseTransaction -Verbose\n}\nClose-SqlConnection\n```\n\nBut there is much more. Just go to that subdirectory to view the [README](SqlPipeline/) file.\n\n# TestCredential\n\nThis module helps you to test credentials before you use them. By default, this module asks 3x times before cancelling. It delivers a `$true` or `$false` back.\n\nUse this module in interactive mode -\u003e this one requests your user and password, uses the current user as default\n\n```PowerShell\nTest-Credential\n```\n\nDefine User and password beforehand\n\n```PowerShell\n$c = Get-Credential\nTest-Credential -Credentials $c\n```\n\nOR\n\n```PowerShell\n$c = Get-Credential\nTest-Credential -Credentials $c  -NonInteractive\n```\n\nOR\n\nGet-Credential | Test-Credential\n\n## WriteLog\n\nThis script allows to write log files pretty easy without any fuzz. It retries the write commands if parallel processes want to write into the same logfile.\n\nExecute commands like\n\n```PowerShell\nWrite-Log -message \"Hello World\"\nWrite-Log -message \"Hello World\" -severity ([LogSeverity]::ERROR)\n\"Hello World\" | Write-Log\n```\n\nThen the logfile getting written looks like\n\n```\n20220217134552\ta6f3eda5-1b50-4841-861e-010174784e8c\tINFO\tThis is a general information\n20220217134617\ta6f3eda5-1b50-4841-861e-010174784e8c\tERROR\tNote! This is an error\n20220217134618\ta6f3eda5-1b50-4841-861e-010174784e8c\tVERBOSE\tThis is the verbose/debug information\n20220217134619\ta6f3eda5-1b50-4841-861e-010174784e8c\tWARNING\tAnd please look at this warning\n\n```\n\nseparated by tabs.\n\nClick on the folder for more information.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapteco%2Faptecopsmodules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapteco%2Faptecopsmodules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapteco%2Faptecopsmodules/lists"}