Search found 41 matches

by PS_Ross
Fri May 24, 2019 7:47 am
Forum: PowerShell GUIs
Topic: ConvertTo-DataTable with Message Tracking Logs
Replies: 7
Views: 619

Re: ConvertTo-DataTable with Message Tracking Logs

Disregard my previous post. I had an additional block code firing off in an "If" statement that was impacting this. My original code would have worked before I even posted here. Your solution does work though jvierra, thanks again.
by PS_Ross
Fri May 24, 2019 3:34 am
Forum: PowerShell GUIs
Topic: ConvertTo-DataTable with Message Tracking Logs
Replies: 7
Views: 619

Re: ConvertTo-DataTable with Message Tracking Logs

When I ran it without the "Name=Job1" line, it would continuously prompt me for the name, and if I left it blank, it would error out, so no, it was not optional. Here is the code I am using, line for line what you pasted above except added in "Name=Job1" $Job1 = @{ ArgumentList = @( $global:usercred...
by PS_Ross
Thu May 23, 2019 6:32 pm
Forum: PowerShell GUIs
Topic: ConvertTo-DataTable with Message Tracking Logs
Replies: 7
Views: 619

Re: ConvertTo-DataTable with Message Tracking Logs

Fair enough. I copied and pasted your code in, I had to add in the "Name = 'Job1' line btw. So now it runs as my previous code did, appears to give me the same result. I have attached a screen shot at the below link of my program with the loaded results. It appears that it is ignoring my select stat...
by PS_Ross
Thu May 23, 2019 4:41 pm
Forum: PowerShell GUIs
Topic: ConvertTo-DataTable with Message Tracking Logs
Replies: 7
Views: 619

Re: ConvertTo-DataTable with Message Tracking Logs

Thanks for that reply jvierra. Looks like I am missing something, below is a screenshot of the code working in debug mode... https://1drv.ms/u/s!AgBAbImA7NSluBvOfw6HqIDDu1zT The $results2 variable is still blank when I hover over it, although, my datagridview does still populate in my form with the ...
by PS_Ross
Thu May 23, 2019 1:03 pm
Forum: PowerShell GUIs
Topic: ConvertTo-DataTable with Message Tracking Logs
Replies: 7
Views: 619

ConvertTo-DataTable with Message Tracking Logs

I am trying to use ConvertTo-DataTable for my datagridview. I need to be able to sort the columns upon mouse click, this is the reason I have gone the route of ConvertTo-DataTable. Below is my working code, assume I have all the proper functions in an effort to keep the code short and understandable...
by PS_Ross
Thu May 23, 2019 6:03 am
Forum: Windows PowerShell
Topic: Passing arguments to Job
Replies: 4
Views: 1474

Re: Passing arguments to Job

In the jobscript, for the "Param", you have in your example "$Arg1" and "$Arg2", wouldn't that have to be the actual names of the arguments you listed in the "ArgumentList", in your example "$Path" and "$SearchFilter"? Or would literally "$Arg1" and "$Arg2" work?
by PS_Ross
Wed May 22, 2019 12:29 pm
Forum: Windows PowerShell
Topic: Passing arguments to Job
Replies: 4
Views: 1474

Passing arguments to Job

Using the "Button - Start-Job" control set in powershell studio, I am trying to pass multiple arguments to a job. I have a working script using one argument, but it seems to fail when I try to pass multiple arguments to it. Example given below using just one argument; Working code... $Creds = Get-Cr...
by PS_Ross
Tue Apr 16, 2019 5:54 am
Forum: Windows PowerShell
Topic: Using Start-Job with credentials
Replies: 13
Views: 2316

Re: Using Start-Job with credentials

I wound up taking a slightly different approach to this and using Powershell Studio's "Button - Start Job" control set. Below is my final code that is working (assume I have all the functions inserted correctly, to long to post them all). $Job1 = @{ Name = 'Job1' JobScript = { Param ($global:usercre...
by PS_Ross
Fri Apr 12, 2019 11:21 am
Forum: Windows PowerShell
Topic: Using Start-Job with credentials
Replies: 13
Views: 2316

Re: Using Start-Job with credentials

Ok, that is what I tried initially, however it didn't seem to work. When I run the exact code you have above and debug the program, I get errors, in this order... ERROR: A parameter cannot be found that matches parameter name 'AllowClobber'. ERROR: Cannot validate argument on parameter 'Session'. Th...
by PS_Ross
Fri Apr 12, 2019 8:28 am
Forum: Windows PowerShell
Topic: Using Start-Job with credentials
Replies: 13
Views: 2316

Re: Using Start-Job with credentials

Here is an example of what I have... $sb = { $splat = @{ ConfigurationName = 'Microsoft.Exchange' ConnectionUri = 'http://ServerName.doamin.com/PowerShell/' AllowClobber = $true } $s = New-PSSession @splat -Credential $global:usercred -Authentication Kerberos Import-PSSession $s (Get-MailboxDatabase...