Search found 12180 matches

by jvierra
Fri May 25, 2018 11:14 am
Forum: Windows PowerShell
Topic: AD new user
Replies: 1
Views: 13

Re: AD new user

You have to have RSAT installed and use "Import-Module ActiveDirectory" or be using WMF 5 or have the PSS cache include AD.

First go to the cache editor and be sure ActiveDirectory is checked.
by jvierra
Fri May 25, 2018 10:18 am
Forum: Windows PowerShell
Topic: Powershell Studio Script not returning data
Replies: 3
Views: 27

Re: Powershell Studio Script not returning data

It returns the complete matching CSV rows.

You can also do this:

Where{$_.'Open File (Path\executable)' -match $FileName} | Select -Expand 'Open File (Path\executable)'
by jvierra
Fri May 25, 2018 10:04 am
Forum: Windows PowerShell
Topic: Need some help in debugging the PowerShell code to set email signature ?
Replies: 7
Views: 48

Re: Need some help in debugging the PowerShell code to set email signature ?

Here (attached) is a complete example of how to generate a signature and all files. The issue that most users of this who have no Word training have is correctly creating the bookmarks. You must highlight the complete anchor text before defining it as a bookmark. The bookmark must then be given the ...
by jvierra
Fri May 25, 2018 9:50 am
Forum: Windows PowerShell
Topic: Need some help in debugging the PowerShell code to set email signature ?
Replies: 7
Views: 48

Re: Need some help in debugging the PowerShell code to set email signature ?

Part of your issue is that you are not using "dotx" files. You are using "DOTX" files which are not templates. You need to create a template with a DOTX extension. You are also not using any template. Templates are loaded like this: $doc = $msWord.Documents.Add($signatureTemplate) Not like this: [vo...
by jvierra
Fri May 25, 2018 9:30 am
Forum: Windows PowerShell
Topic: Need some help in debugging the PowerShell code to set email signature ?
Replies: 7
Views: 48

Re: Need some help in debugging the PowerShell code to set email signature ?

The script above is working 99% except there is always EmailAccount name (in the format Firstname.LastName@domain.com) displayed in front of the AD_Display Name which ruins all of the email signatures. If you used a template and bookmarks as I showed you before, you would not have this issue. The t...
by jvierra
Fri May 25, 2018 9:28 am
Forum: Windows PowerShell
Topic: Need some help in debugging the PowerShell code to set email signature ?
Replies: 7
Views: 48

Re: Need some help in debugging the PowerShell code to set email signature ?

". Running it as Login Script User Configuration (Enabled) > Policies > Windows Settings > Scripts > Logon" This code: # Set signature as default $emailOptions = $msWord.EmailOptions $emailSignature = $emailOptions.EmailSignature $emailSignatureEntries = $emailSignature.EmailSignatureEntries $emailS...
by jvierra
Fri May 25, 2018 8:34 am
Forum: Windows PowerShell
Topic: Need some help in debugging the PowerShell code to set email signature ?
Replies: 7
Views: 48

Re: Need some help in debugging the PowerShell code to set email signature ?

Please attach your code as a file. It cannot be copied easily as posted and is not readable. This is a forum issue that has not been fixed at this point so please use a file.
by jvierra
Fri May 25, 2018 8:25 am
Forum: Windows PowerShell
Topic: Need some help in debugging the PowerShell code to set email signature ?
Replies: 7
Views: 48

Re: Need some help in debugging the PowerShell code to set email signature ?

When posting large bits of code please post as an attached file. I have given you the correct answer for this task twice now. Why do you keep going back to the old Office method that was never correct to begin with? There is no need to create these files. They will be created automatically when you ...
by jvierra
Fri May 25, 2018 8:19 am
Forum: Windows PowerShell
Topic: Powershell Studio Script not returning data
Replies: 3
Views: 27

Re: Powershell Studio Script not returning data

Here is an example of how to use OpenFiles to get a specific file. $sb = { param($FileName) openfiles /v /query /fo CSV | select -skip 8 | ConvertFrom-Csv | Where{$_.'Open File (Path\executable)' -match $FileName} } Invoke-Command -Session $Session -ScriptBlock $sb -ArgumentList $FileName | Export-C...
by jvierra
Fri May 25, 2018 12:50 am
Forum: PowerShell GUIs
Topic: try/catch in jobs using job tracker
Replies: 9
Views: 89

Re: try/catch in jobs using job tracker

No. I think you are not understanding how this works. The only spot that is missing the parameter is the connect so maybe that would make you think that. The Try/Catch would work better if it was embedded. THis would allow only one point of return which is more in keeping with programming standards....