Search found 6 matches

by DanielJohnson
Tue Feb 02, 2021 11:54 pm
Forum: PowerShell
Topic: powershell scripting.
Replies: 1
Views: 2949

powershell scripting.

Hello, I am fairly new to powershell scripting. With that said, I have a script that creates a CNAME record in dns. The script runs fine when clicking the 'Run' button in Powershell Studio 2020. I added this script to a larger config script, and now the script fails. After doing some troubleshooting...
by DanielJohnson
Tue Feb 02, 2021 11:54 pm
Forum: PowerShell
Topic: Can someone help me understand why the following three lines in a PS Studio
Replies: 0
Views: 12921

Can someone help me understand why the following three lines in a PS Studio

Can someone help me understand why the following three lines in a PS Studio script do not work. But, they do work when run in PS ISE or as a PS command-line? $TextFile = "C:\TextList.txt" #There are 85 lines of text in this file $FileTextLines = Get-Content -Path $TextFile $LineCT = $FileT...
by DanielJohnson
Tue Feb 02, 2021 11:53 pm
Forum: PowerShell
Topic: Identity $textboxGroup.Text
Replies: 1
Views: 3567

Identity $textboxGroup.Text

Hello, I need to put a msgbox indicating if the command below was executed successfully or not $buttonGrant_Click={ #$GroupTest = $textboxCheckGroup.Text $textboxResultado.Lines = Add-ADGroupMember -Identity $textboxGroup.Text -Members $textboxLogin.Text } Example: If the command execute successfull...
by DanielJohnson
Tue Feb 02, 2021 11:52 pm
Forum: PowerShell
Topic: Hello, I have created a script
Replies: 1
Views: 3747

Hello, I have created a script

Hello, I have created a script which works just as I want as an exe. To run as an exe you need to provide a parameter to the install location of XML files. I want to create this as a service and when i have the service will only start the exe. How can I configure the MSI build to start my service as...
by DanielJohnson
Tue Feb 02, 2021 11:51 pm
Forum: PowerShell
Topic: How would I be able to capitalize the first letter in a textbox?
Replies: 1
Views: 4540

How would I be able to capitalize the first letter in a textbox?

How would I be able to capitalize the first letter in a textbox?

For example:
textboxFirstname.text = 'john' -> 'John'

textboxLastname.text = 'doe' -> 'Doe'
by jvierra » Mon Dec 14, 2020 2:21 am
$letter = $textboxLastname.text[0]
Go to full post
Top
by DanielJohnson
Mon Feb 01, 2021 3:33 am
Forum: PowerShell
Topic: ListView items set forecolor
Replies: 4
Views: 4594

Re: ListView items set forecolor

Here is another way to add colored items: $items=@( [PSCustomObject]@{ Text = 'This is red';Color='Red'} [PSCustomObject]@{ Text = 'This is blue'; Color = 'Blue' } [PSCustomObject]@{ Text = 'This is green'; Color = 'Green' } ) $listbox1.Items.AddRange($items) Thanks! You helped me a lot.