Hello,
If you need to add a custom path to your PSModulePath environment variable, you can do like that :
$herestring=@" `$env:psmodulepath+=";D:DropboxModules" "@ Add-Content -LiteralPath $profile -Value $herestring
That can be helpful if you store your custom modules on OneDrive, GoogleDrive or Dropbox.
This technique can also be used with a file share, for corporate module repository.