Search found 12098 matches
- Thu Apr 26, 2018 11:36 am
- Forum: PowerShell GUIs
- Topic: Setting datatable columns to allow null values (AllowDBNull)
- Replies: 1
- Views: 20
Re: Setting datatable columns to allow null values (AllowDBNull)
Please post all of the code where you load the grid. Without that it is not possible to understand why this may be happening.
- Wed Apr 25, 2018 12:34 pm
- Forum: Windows PowerShell
- Topic: formatting contents in the body of email
- Replies: 2
- Views: 67
Re: formatting contents in the body of email
This will create a plain text body.
Code: Select all
$FileNames = Get-ChildItem -Path $failed_TXT_folder -File |
Where-Object {$_.CreationTime -gt (Get-Date).AddDays(-35) } |
Select Fullname, LastWriteTime |
Out-String
- Wed Apr 25, 2018 6:34 am
- Forum: PowerShell GUIs
- Topic: Powershell EXE not honoring parameters
- Replies: 8
- Views: 69
Re: Powershell EXE not honoring parameters
As I have noted more than once, you cannot pass objects to an EXE. The following line will not work: & .\source.exe -CredThing $Credentials Also the "&" is unnecessary and should not be used here. An EXE can only be passed strings. All objects will be converted to strings. You command effectively pa...
- Wed Apr 25, 2018 5:46 am
- Forum: PowerShell GUIs
- Topic: Powershell EXE not honoring parameters
- Replies: 8
- Views: 69
Re: Powershell EXE not honoring parameters
If you call an EXE with arguments they will be passed as text and not as objects.
If you pass a null object in all cases you will get that error.
You are creating "$credential" and passing "$output". Is that what you want to do.
If you pass a null object in all cases you will get that error.
You are creating "$credential" and passing "$output". Is that what you want to do.
- Wed Apr 25, 2018 5:29 am
- Forum: PowerShell GUIs
- Topic: Powershell EXE not honoring parameters
- Replies: 8
- Views: 69
Re: Powershell EXE not honoring parameters
You cannot pass objects on a command line. Command lines only accept text.
If you are calling a PS script then you can pass objects.
Call a script line this:
c:\temp\myscript.ps1 -ArgName $argument
You error says that you are trying to pass a null object.
If you are calling a PS script then you can pass objects.
Call a script line this:
c:\temp\myscript.ps1 -ArgName $argument
You error says that you are trying to pass a null object.
- Tue Apr 24, 2018 10:01 am
- Forum: PowerShell GUIs
- Topic: How to add a dynamically generated DV into a TextArea
- Replies: 1
- Views: 58
Re: How to add a dynamically generated DV into a TextArea
Sorry but this is a PowerShell GUI forum. Your code looks like JavaScript. The question is also very vague.
- Tue Apr 24, 2018 9:54 am
- Forum: Windows PowerShell
- Topic: OU Watcher
- Replies: 2
- Views: 58
Re: OU Watcher
Just turn on AD auditing.
- Fri Apr 20, 2018 12:04 pm
- Forum: PowerShell GUIs
- Topic: Adding text to a listbox
- Replies: 8
- Views: 238
Re: Adding text to a listbox
If you load the CSV to a DataTable the sort and relation can be defined and the lists will be automatic.
- Fri Apr 20, 2018 12:04 pm
- Forum: PowerShell GUIs
- Topic: Adding text to a listbox
- Replies: 8
- Views: 238
Re: Adding text to a listbox
Relational filtering:
$systemtarget = $ESPSDetails | where{$_.MissionPartner -eq 'System2' }| select target -unique
$systemtarget = $ESPSDetails | where{$_.MissionPartner -eq 'System2' }| select target -unique
- Fri Apr 20, 2018 12:01 pm
- Forum: PowerShell GUIs
- Topic: Adding text to a listbox
- Replies: 8
- Views: 238
Re: Adding text to a listbox
The following code makes no sense. It loads the same thing into both list boxes incorrectly. Else { $ESPSDetails = Import-Csv $textbox1.Text $Platforms = $ESPSDetails | select Target | Sort Target -Unique $MissionPartners = $ESPSDetails | select MissionPartner | Sort MissionPartner -Unique Load-List...