Search found 48 matches

by bhnuser
Mon Mar 16, 2020 6:08 am
Forum: Windows PowerShell
Topic: Import Modules from Server
Replies: 11
Views: 573

Re: Import Modules from Server

This script / tool should be used from our service employee. There are 15 people which should use this. For this reason, I ask for a solution. I have read that the WinRM session number can be increased but then is global. A possibility for only a specific user to expand (service user behind the tool...
by bhnuser
Fri Mar 13, 2020 6:12 am
Forum: Windows PowerShell
Topic: Import Modules from Server
Replies: 11
Views: 573

Re: Import Modules from Server

It's fixed now. Was an issue from our network. It runs now in few seconds. But i have an other question to pssession. If i create a session with New-PSSession then i can see a new process on the remote computer called "wsmprovhost.exe". This can opend only 5 times by default of winrm (MaxShellsPerUs...
by bhnuser
Wed Mar 11, 2020 6:52 am
Forum: Windows PowerShell
Topic: Import Modules from Server
Replies: 11
Views: 573

Re: Import Modules from Server

Thank you for the information. I found now my issue. I need write the full path till the .psd1-File. Strangely the normal Import-Module works without the full path. But i've now a new question. Is it possible to make the import faster? I mean, when i use Import-Module -Name ... it taks only 2,5 sec....
by bhnuser
Wed Mar 11, 2020 4:50 am
Forum: Windows PowerShell
Topic: Import Modules from Server
Replies: 11
Views: 573

Re: Import Modules from Server

I already use this for installed Modules on remote server. I can get the module (like ActiveDirectory, Exchange on prem, S4B) from our server. But how i said, this module are already installed. But i need now to import an Module, which is saved on our data storage in an folder. There are all .dll an...
by bhnuser
Wed Mar 11, 2020 4:33 am
Forum: Windows PowerShell
Topic: Import Modules from Server
Replies: 11
Views: 573

Re: Import Modules from Server

Sorry but regular users cannot remote. Why are you using a session to import a module from a third server? Just import the module. Yea, i tried to import the module with the regular command. But there i can not refer some credentials. So i hoped i can create a session to get the modules. Mybe this ...
by bhnuser
Wed Mar 11, 2020 3:45 am
Forum: Windows PowerShell
Topic: Import Modules from Server
Replies: 11
Views: 573

Import Modules from Server

Hello everybody, i'm a little desperate and my latin ends. I am just about to add a PowerShell module for a created GUI. The problem is that the module is located as a folder on a server in the network. As a domain admin, I have the option of my user executing a simple Import-Module -Name <path as U...
by bhnuser
Wed Jul 10, 2019 10:54 pm
Forum: Windows PowerShell
Topic: Add a Domain User to the Local Administrators Group
Replies: 5
Views: 3357

Re: Add a Domain User to the Local Administrators Group

Thank you for the help jvierra. I build now a workaround and it works fine. Here is the snippet: $localAdminUser = "WinNT://$($env:USERDOMAIN)/$($selectedUserLocalAdmin.SamAccountName)" Invoke-Command $ADSession -Scriptblock { param ([string]$t3 = $Computer, [string]$t4 = $username) ([ADSI]"WinNT://...
by bhnuser
Wed Jul 03, 2019 11:42 pm
Forum: Windows PowerShell
Topic: Add a Domain User to the Local Administrators Group
Replies: 5
Views: 3357

Re: Add a Domain User to the Local Administrators Group

Okay, I've read the article ready. But what about the syntax in PowerShell?
by bhnuser
Wed Jul 03, 2019 5:52 am
Forum: Windows PowerShell
Topic: Add a Domain User to the Local Administrators Group
Replies: 5
Views: 3357

Add a Domain User to the Local Administrators Group

Hello everybody, i need your help with my snippet. I would like, as the title says, to add a domain user to the Administrators group on a local machine on the network. The problem is that I run the script with a normal user without admin rights. Is it possible to pass an Admin user to the script bel...
by bhnuser
Tue May 21, 2019 11:58 pm
Forum: Windows PowerShell
Topic: Password as plain text in script
Replies: 3
Views: 1641

Re: Password as plain text in script

Thank you for your prompt reply. The password I would not like to deposit in any case as plain text in my script. With ConvertTo .... I have already worked but I can not find a solution. I have the SecureString, but it can be easily decrypted by PowerShell. So I can not think of a 100% solution for ...