Search found 11549 matches

by jvierra
Sat Dec 09, 2017 7:42 pm
Forum: Windows PowerShell
Topic: Parsing ini file and adding it to a CSV file
Replies: 4
Views: 127

Re: Parsing ini file and adding it to a CSV file

$txt = @' [Section_1] not need =1 Primary_need1=something1 Primary_need2=something2 Primary_need3=something3 Primary_Recovery_needed4=something4 Primary_Recovery_needed5=something5 Primary_Recovery_needed6=something6 not need =2 not need =3 '@ -split "`n" $data = $txt | Where-Object{ $_ -match 'Pri...
by jvierra
Sat Dec 09, 2017 7:54 am
Forum: PowerShell GUIs
Topic: PS GUI for Helpdesk/Desktop Support (Assistance required)
Replies: 5
Views: 132

Re: PS GUI for Helpdesk/Desktop Support (Assistance required)

I did take a look at you UI. Nice start. YOu seem to have a good sense of how to use PSS and your layout is good for a first try. Everything in a GUI happens in an event. All results from any PS command usually needs to be converted in some way to be used in a control. The link I posted has many ite...
by jvierra
Sat Dec 09, 2017 2:12 am
Forum: PowerShell GUIs
Topic: PS GUI for Helpdesk/Desktop Support (Assistance required)
Replies: 5
Views: 132

Re: PS GUI for Helpdesk/Desktop Support (Assistance required)

Your code has obvious syntax errors that you need to fix first. UserTools.psf (243, 128): ERROR: At Line: 243 char: 128 ERROR: + ... tial $cred | Select-Object _server, name, descropath | $datagridview1 ERROR: + ~~~~~~~~~~~~~~ ERROR: Expressions are only allowed as the first element of a pipeline. E...
by jvierra
Fri Dec 08, 2017 7:38 pm
Forum: PowerShell GUIs
Topic: unable to build application
Replies: 1
Views: 97

Re: unable to build application

You need to post product issues in the correct customer support forum.

Post here and provide all OS and version info: PowerShell Studio Product Support
by jvierra
Fri Dec 08, 2017 4:12 pm
Forum: Windows PowerShell
Topic: Parsing ini file and adding it to a CSV file
Replies: 4
Views: 127

Re: Parsing ini file and adding it to a CSV file

There is no command or tool that will convert an INI file to a CSV. You will have to write a script that does whatever conversions you need. As posted you have not provided any useful information on how the file needs to be converted. Once you can define that you will know how to write the script.
by jvierra
Fri Dec 08, 2017 10:53 am
Forum: PowerShell GUIs
Topic: need func conver employeenumber to samaccountname
Replies: 7
Views: 177

Re: need func conver employeenumber to samaccountname

$searcher = [adsisearcher]'(&(objectclass=user)(objectcategory=person)(employeeNumber=$userid))' I think you need double quotes around that string, otherwise $userid is not expanded to the actual value. Yes. In fact this is all that would be needed: $searcher = [adsisearcher]"(employeeNumber=$useri...
by jvierra
Fri Dec 08, 2017 12:16 am
Forum: PowerShell GUIs
Topic: need func conver employeenumber to samaccountname
Replies: 7
Views: 177

Re: need func conver employeenumber to samaccountname

mpeled wrote:
Thu Dec 07, 2017 11:56 pm
how can i work with "Get-ADUser" im get an error every time i try to use it in PowerShell GUI 2017
What is PowerShell GUI 2017?

Get-AdUser requires RSAT.
by jvierra
Thu Dec 07, 2017 4:36 pm
Forum: PowerShell GUIs
Topic: What's the best way (fast) get users by employeeNumber
Replies: 3
Views: 112

Re: What's the best way (fast) get users by employeeNumber

Hah! I just remembered that I have an old demo of how to get users and change attribute values.

See attached:
by jvierra
Thu Dec 07, 2017 3:09 pm
Forum: PowerShell GUIs
Topic: need func conver employeenumber to samaccountname
Replies: 7
Views: 177

Re: need func conver employeenumber to samaccountname

This line of code should work for you. You should check employeeID to make sure that it it is capitalized correctly. Get-ADUser -Filter {employeeID -eq $userid } | Select-Object SamAccountName Also if you have a large number of users in your Active Directory, then it could take a while for this lin...
by jvierra
Thu Dec 07, 2017 2:34 pm
Forum: PowerShell GUIs
Topic: need func conver employeenumber to samaccountname
Replies: 7
Views: 177

Re: need func conver employeenumber to samaccountname

You have to get the user object and set the properties you need to change.
Use your search to find examples. They are numerous.

You can also give up on ADSI and use RSAT and the AD CmdLets.