Support Forums

Search found 10191 matches

by jvierra
Sun Oct 11, 2009 2:20 pm
Forum: Windows PowerShell
Topic: list states of services running on another server
Replies: 8
Views: 770

list states of services running on another server

This code works perfectly for me. [Reflection.Assembly]::LoadWithPartialName("System.ServiceProcess") $server="myhost" $servicelist = "browser" foreach ($service in $servicelist) {     $svc = new-object System.ServiceProcess.ServiceController($service,$server)     $svc.name     $svc.status } The cod...
by jvierra
Sun Oct 11, 2009 3:55 am
Forum: Wish List and Feature Requests
Topic: Paste/Copy as HTML
Replies: 2
Views: 966

Paste/Copy as HTML

It would be advantageous if all Promal tools could copy to the clipboard as HTML. This is already avaiulable in PrimalForms editor. Here is an example: function OnApplicationLoad { #Note: This function runs before the form is created #TODO: Add snapins and custom code to validate the application loa...
by jvierra
Sun Oct 11, 2009 3:37 am
Forum: Windows PowerShell
Topic: How to delay the move-item
Replies: 11
Views: 1789

How to delay the move-item

Using the GPM RSOP object: function Get-Results( [string]$pc=$env:computername){ begin{ $gpm = New-Object -ComObject GPMGMT.GPM } #END-BEGIN process{ foreach($x In $input){ $temp = $x } if($temp){$pc=$temp} $rsop= $gpm.GetRSOP( $GpConst.RSOPModeLogging, "" , 0) $rsop.LoggingComputer = $pc ...
by jvierra
Sat Oct 10, 2009 4:47 am
Forum: Windows PowerShell
Topic: How to delay the move-item
Replies: 11
Views: 1789

How to delay the move-item

Here is an example of RSOP (GPRESULT) to a file using only script. Set oGpm = CreateObject("GPMGMT.GPM") Set oGpConst = oGpm.GetConstants() Set oRSOP = oGpm.GetRSOP( oGpConst.RSOPModeLogging, "" , 0) strpath = Left(Wscript.ScriptFullName, InStrRev(Wscript.ScriptFullName,"&qu...
by jvierra
Fri Oct 09, 2009 8:42 am
Forum: Windows PowerShell
Topic: How to delay the move-item
Replies: 11
Views: 1789

How to delay the move-item

sharique - you didn't see it yet? You forgot teh 'S' in $s. I have a rule for myself. I will have on dumb mistake for every three lines of code. That is why I make an issue out of careful naming of things. Wven -> $server in $servers is not very good a sit is hard to tell the difference betweent...
by jvierra
Fri Oct 09, 2009 6:26 am
Forum: Windows PowerShell
Topic: How to delay the move-item
Replies: 11
Views: 1789

How to delay the move-item

Here is teh command for remote gpresult. gpresult /S $s > file.txt where $s is the remote server name. The file will be created on the local machine. No need for remote process and n need for PowerShell. This can run from any prompt PowerShell or CMD. No need to move any files. The code will wa...
by jvierra
Fri Oct 09, 2009 5:38 am
Forum: Windows PowerShell
Topic: How to delay the move-item
Replies: 11
Views: 1789

How to delay the move-item

Just replace all of your code with this. YOu don't need to use WMI or the process you are using. Just use this function to start both processes. YOu seem to be at a loss as to what yhou ae doing. YOu are using PowerShell ot execute both DOS commands and PowerShell commands. You should just use Power...
by jvierra
Fri Oct 09, 2009 5:24 am
Forum: Windows PowerShell
Topic: How to delay the move-item
Replies: 11
Views: 1789

How to delay the move-item

Hah -found it. function Start-Process( [string]$pfile = 'cmd.exe', [string]$arguments = '/c dir' ){ $p = New-Object System.Diagnostics.Process; $p.StartInfo.UseShellExecute = $false; $p.StartInfo.RedirectStandardOutput = $true; $p.StartInfo.FileName = $pfile; $p.StartInfo.Arguments = $arguments [voi...
by jvierra
Fri Oct 09, 2009 2:37 am
Forum: VBScript
Topic: finding out softwares
Replies: 10
Views: 1640

finding out softwares

I highly recommend getting one of teh many books available on scripting. This will get you past many of these basic issues which seem to be getting you stuck repeatedly.


This is one good place to start:



by jvierra
Fri Oct 09, 2009 1:58 am
Forum: VBScript
Topic: finding out softwares
Replies: 10
Views: 1640

finding out softwares

As an example of how to set up for using the registry and getting most of teh file issues in place here is a partial re-write that may help you to see how to approach scripting issues. The following works and doesn't insert troubling code issues. If you take time to understand what is gouing on it s...

Go to advanced search