Support Forums

Search found 10354 matches

by jvierra
Wed Feb 22, 2017 11:14 am
Forum: Windows PowerShell
Topic: Elevate/De-elevate
Replies: 6
Views: 109

Re: Elevate/De-elevate

If the elevated process launches a program that prints then print it to a file that the normal users session can submit to the printer. Just save the print file to a common location.
by jvierra
Wed Feb 22, 2017 11:00 am
Forum: PowerShell GUIs
Topic: Which control to use
Replies: 7
Views: 131

Re: Which control to use

Hi sheetal - welcome to the Sapien/ScriptingAnswers forum This is how to get your computer info as objects. You can display the easily in a DataGridView $computers = Get-AdComputer -Filter * | Select -Expand Name #OR $computers = Get-Content computers.txt $compinfo = Get-WmiObject win32_operatingsys...
by jvierra
Wed Feb 22, 2017 9:53 am
Forum: PowerShell GUIs
Topic: Contextmenustrip and the datagridview
Replies: 3
Views: 67

Re: Contextmenustrip and the datagridview

There is an event that is generated on the menuitem when the menu is opened/clicked. Just reference the selected cell or row in the event.

$test1ToolStripMenuItem_Click={
Write-Host $datagridview1.SelectedRows[0]
}

The menu always opens where the pointer is pointing.
by jvierra
Wed Feb 22, 2017 9:18 am
Forum: Windows PowerShell
Topic: Elevate/De-elevate
Replies: 6
Views: 109

Re: Elevate/De-elevate

Why? Just print. You cannot execute an impersonated session as a normal user. You can allow a user to use other credentials to launch a session but that session cannot impersonate the launching user

Use a job to run the elevated session and retrieve the data for the user to print.
by jvierra
Wed Feb 22, 2017 7:41 am
Forum: PowerShell GUIs
Topic: Async Progress Bar and compiled Forms Script
Replies: 3
Views: 60

Re: Async Progress Bar and compiled Forms Script

It appears that some of your code is missing. A function must be called to work.
by jvierra
Tue Feb 21, 2017 5:15 pm
Forum: PowerShell GUIs
Topic: React to System Hotkey
Replies: 10
Views: 75

Re: React to System Hotkey

And you learned something about both PSS and coding forms. You are on a roll.
by jvierra
Tue Feb 21, 2017 4:55 pm
Forum: PowerShell GUIs
Topic: React to System Hotkey
Replies: 10
Views: 75

Re: React to System Hotkey

As noted earlier, you must use the event to add the code. It cannot be defined inside of an event handler. Double click on the KeyDown event in the properties browser and then add the "contents' to the new event: Only paste this into the handler. if ($_.Control -and $_.KeyCode -eq 'G') { Write-...
by jvierra
Tue Feb 21, 2017 2:48 pm
Forum: PowerShell GUIs
Topic: React to System Hotkey
Replies: 10
Views: 75

Re: React to System Hotkey

Also note that you can event on any control that has a title like a button. Place notepad in a button event called Notepad and type the "Text" property like "&Notepad". This will fire the button event code when the user types <alt+n> - case does not matter. You can tag any le...
by jvierra
Tue Feb 21, 2017 2:44 pm
Forum: PowerShell GUIs
Topic: React to System Hotkey
Replies: 10
Views: 75

Re: React to System Hotkey

Ha. Didn't notice the small q.
by jvierra
Tue Feb 21, 2017 1:16 pm
Forum: Windows PowerShell
Topic: aduser filter single qoute with wildcard.
Replies: 2
Views: 52

Re: aduser filter single qoute with wildcard.

Works for me.

Go to advanced search