Support Forums

Search found 10622 matches

by jvierra
Fri Apr 21, 2017 10:22 am
Forum: Windows PowerShell
Topic: Convert string to hex for registry
Replies: 16
Views: 172

Re: Convert string to hex for registry

What is "011"? It is a string.

Your question is a nit ambiguous since we have no idea what you are trying to do and your nomenclature is conflicted.

Are you asking how to convert a byte array into a string. Note that the registry encodes Unicode strings as byte arrays.
by jvierra
Fri Apr 21, 2017 9:51 am
Forum: Windows PowerShell
Topic: Convert string to hex for registry
Replies: 16
Views: 172

Re: Convert string to hex for registry

Do not use "$input". It is a reserved work.

Bytes are not hex. They are numbers.

$stringBytes="30,00,31,00,31,00"
$bytes = $stringBytes -spit ',' | %{ [int]$_}
New-ItemProperty -Path $path -Name $AttrName -Value $bytes -PropertyType REG_BINARY
by jvierra
Fri Apr 21, 2017 9:43 am
Forum: Windows PowerShell
Topic: Problems with collection via Invoke-Command
Replies: 10
Views: 63

Re: Problems with collection via Invoke-Command

Why do you need to use "Invoke-Command".

"DepartmentNumber" is not an array: https://msdn.microsoft.com/en-us/librar ... 91(v=vs.85).aspx
by jvierra
Fri Apr 21, 2017 9:40 am
Forum: Windows PowerShell
Topic: Making data grid item a hyperlink
Replies: 3
Views: 97

Re: Making data grid item a hyperlink

Not sure what you are trying to ask.

To get a hyperlink column you will have to create a column that is designed as a hyperlink an bind the column to the field you want as a hyperlink.
by jvierra
Wed Apr 19, 2017 1:48 pm
Forum: Windows PowerShell
Topic: How to have PowerShell to not truncate in the table for logon hours?
Replies: 3
Views: 158

Re: How to have PowerShell to not truncate in the table for logon hours?

Get-Aduser -Identity $name -Property * -Server $DC1 | Select -expand logonhours | %{$_ -join ','}
by jvierra
Wed Apr 19, 2017 1:39 pm
Forum: PowerShell GUIs
Topic: MF Project
Replies: 2
Views: 47

Re: MF Project

$form2.Close()
Don't add any code after that line.

In PowerShell you cannot "switch" forms. You can only close the currently displayed form.
by jvierra
Tue Apr 18, 2017 3:54 pm
Forum: PowerShell GUIs
Topic: creating Multi-form
Replies: 1
Views: 69

Re: creating Multi-form

Create a new MF project and add the existing file to the project.

You can also create a template from the existing form and use it to create new forms in the MF project.
by jvierra
Tue Apr 18, 2017 11:26 am
Forum: PowerShell GUIs
Topic: Functions not highlighted in PowerShell Studio editor
Replies: 8
Views: 219

Re: Functions not highlighted in PowerShell Studio editor

Suggestion: Start by creating a new simple module with PSS. Add one function. Deploy to modules folder and rebuild cache. It should work.
by jvierra
Tue Apr 18, 2017 11:24 am
Forum: Windows PowerShell
Topic: Responsive forms with remote event log
Replies: 3
Views: 105

Re: Responsive forms with remote event log

That's the design. No muss. No fuss.

Good luck.
by jvierra
Tue Apr 18, 2017 6:27 am
Forum: PowerShell GUIs
Topic: Functions not highlighted in PowerShell Studio editor
Replies: 8
Views: 219

Re: Functions not highlighted in PowerShell Studio editor

I cannot reproduce your issue, All modules in the PSModulePath show up correctly colorized and support auto-complete etc. Perhaps you module has some issues.

I can add any new module and rebuild the cache and it shows the functions correctly. The cache must be rebuilt after the module is added.

Go to advanced search