Last active
October 18, 2021 14:35
-
-
Save slydlake/e30fe7597263f0f44d8ddde78c885789 to your computer and use it in GitHub Desktop.
[Erstellt von/am setzten beim speichern] #powershell #VDS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Erstanlage setzen | |
AddHandlerCreateMode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function AddHandlerCreateMode { | |
try { | |
#Erstanalge setzen | |
$Prop["EPL_CREATE_DATE"].Value = ([datetime]::now) #.ToString("dd.MM.yyyy") | |
$_myServer = $vaultConnection.Server | |
$_myVault = $vaultConnection.Vault | |
$_myId = $vaultConnection.UserID | |
$_myTicket = $vaultConnection.Ticket | |
$_myIdKey = $vaultConnection.IdentityKey | |
# ab 2022 | |
$_user = $vault.AdminService.GetUserInfoByUserId($_myId) | |
$_name = $_user.User.Name | |
# bis 2021 | |
#$_userinfo = $vault.AdminService.GetUserInfoByUserId($_myId) | |
#$dsDiag.Inspect() | |
if ($dsWindow.Name -eq "FileWindow") { | |
#$Prop["EPL_CREATE_USER"].Value = $_name | |
} | |
if ($dsWindow.Name -eq "InventorWindow") { | |
$Prop["EPL_CREATE_USER"].Value = $_name | |
} | |
if ($dsWindow.Name -eq "AutoCADWindow") { | |
#$Prop["EPL_CREATE_USER"].Value = $_name | |
} | |
} | |
catch { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment