| Topic |
 |
RE: Need Help Using .Net Remote Registry Manipulation If the *flowcontrol is missing I can just use new-regstring instead. I was also told that its not a given that the Network Card will be in the 0006 or 0007 subkey(sometimes we also have add-on cards quad cards), with this bunch of servers it just ... by edm365f31 in General PowerShell on 25 Oct 2010 07:52 AM
|
 |
RE: Need Help Using .Net Remote Registry Manipulation I've called .Net Reg class, did functions, if and for loops allover in my script, then I found this!! http://code.msdn.microsoft.com/PSRemoteRegistry Only to find out that I can update this advance nic property change on all our 300 servers in a one ... by edm365f31 in General PowerShell on 19 Oct 2010 07:57 AM
|
 |
UPdate a Config File I am running a script that will update a config file$FC = GC C:\File\Trivoli.configIn this config file i am grepping for this line property-set name="HonorProcessScheduledEndTime" value="true" If the value in this line is "true" I need to change the ... by edm365f31 in General PowerShell on 02 Sep 2009 01:27 PM
|
 |
RE: How to Stop Service and dependent services on remote machine I am searching but maybe one of the POSH Gurus here might have an easy simple answer that I missed.. by edm365f31 in General PowerShell on 30 Jun 2009 06:41 AM
|
 |
RE: How to Stop Service and dependent services on remote machine I know u can do this $colItems = gwmi win32_service | ? {$_.name -like "w32time*" -or $_.name -like "spooler*" -or $_.name -like "termservice*"} I am thinking about: if there is something equivalent to the cmdlet stop-service -force by edm365f31 in General PowerShell on 29 Jun 2009 01:56 PM
|
 |
RE: Compare arrays with -contain or -match Is there a way to replicate this when comparing columns in an Excel spreedsheet or csv file. Like diffing what exist and exist on sheets being compared. by edm365f31 in General PowerShell on 29 Jun 2009 08:43 AM
|
 |
How to Stop Service and dependent services on remote machine Is there a way to stop a service and its dependent service when using using wmi to query for the the service collection remotely.$colItems=Gwmi Win32_Service -comp $server | Where-Object{$_.name -eq "IMAService"}If ($colitems -eq "running") {$colite ... by edm365f31 in General PowerShell on 29 Jun 2009 08:36 AM
|
 |
Append a server name at the end of a text file I got to be missing something simple here (or do i need to use add-content here?)Tyring to append a server name to a new line at the end$server = 'tundra00'$path = 'c:\serverlist'out-file = "$path\servernames.txt" -inputobject $server -append -encod ... by edm365f31 in General PowerShell on 16 Jun 2009 08:56 AM
|
 |
RE: Powershell script that will log off ICA and RDP sessions. Noted thanks by edm365f31 in General PowerShell on 20 May 2009 01:58 PM
|
 |
RE: Powershell script that will log off ICA and RDP sessions. Brandon This one works right now not really clean but it does disconnects RDP and ICA, I notice that there is always an extra 3 sessions maybe a virtually or automatically opened. I only need to clean the write -host for maybe specific sessionstate, ... by edm365f31 in General PowerShell on 20 May 2009 02:01 PM
|
 |
RE: Powershell script that will log off ICA and RDP sessions. In our environment at the end of the day we need to log off all session, what ever their state are, but I need to log them off properly, enumerate the session user and maybe the state of the session I am logging off in the output. ON the weekend th ... by edm365f31 in General PowerShell on 19 May 2009 09:10 AM
|
 |
RE: How do I get all columns results in a Mysql Query I will test that out..thnx by edm365f31 in General PowerShell on 19 May 2009 08:49 AM
|
 |
Powershell script that will log off ICA and RDP sessions. Is there anybody that can provide me or point me to this type of script. I am working on a script that will log-off ICA Citrizx sesions but was told that I also need to be able to log-off rdp sessions. This script have not been tested yet, but if t ... by edm365f31 in General PowerShell on 19 May 2009 08:39 AM
|
 |
RE: How do I get all columns results in a Mysql Query I tried write-host $global:MLMresult.GetString(0)" " $global:MLMresult.GetString(1) It did not work consistently especially if I have different table to query which has diff number of columns. Edm by edm365f31 in General PowerShell on 19 May 2009 08:14 AM
|
 |
How do I get all columns results in a Mysql Query I created a Mysql function query how do I get all the columns result to the powershell console, right now i can only get the first row successfully, I want to be able to get all the columns available in my query and show it on the console or maybe s ... by edm365f31 in General PowerShell on 18 May 2009 11:26 AM
|
 |
RE: Convert String output to integer from srvinfo.exe uptime I was able to convert it this way it theres a better or shrter way keep me posted. Write-Host "Wmi Failed Getting Uptime with Srvinfo" -fore green $t = srvinfo \\$strComputer | Select-String -pattern "Time:" $tt = ($t.line).replace("System Up ... by edm365f31 in General PowerShell on 07 May 2009 09:34 AM
|
 |
How do you pass an argument to a function? I created a Reboot verification from previous post, I want this script to accept an argument to run local on the box or remote../verifyreboot.ps1 (local) ./verifyreboot.ps1 (remote) (strcomputer)if no arg passed script will write-host and exit. I ... by edm365f31 in General PowerShell on 07 May 2009 08:38 AM
|
 |
Convert String output to integer from srvinfo.exe uptime I am trying to create a Reboot verification script using wmi query if it fails i want to try RPC with srvinfo. Problem that I have is I get this output after a select-string and replace method.$t = srvinfo \\$strComputer | Select-String -pattern "T ... by edm365f31 in General PowerShell on 07 May 2009 08:41 AM
|
 |
Powershell Event Sink Is there a way to to set up an event sink in Powershell which gets called when an asynchronous operation is completed. I want to be able to grab errors on a box as it happens, and this event sink can sstart on start-up on run on a schedule. by edm365f31 in General PowerShell on 04 May 2009 08:45 AM
|
 |
RE: use robocopy in powershell and compress the file logs Thanks EB I got this script from Monad Out-zip Function, added some variables, still trying to figure out on how to zip a folder with files on it (file by file) not whole folder to a zip file. This out-zip function eliminate my use for Robocopy st ... by edm365f31 in General PowerShell on 23 Apr 2009 12:05 PM
|
 |
RE: use robocopy in powershell and compress the file logs robocopy does not have a native way of zipping files, Resource kit has compact and compress, I basically need to zip a log and copy it to a remote share, I want to do all of this in PS. this is the way I run robocopy now: this is not getting zip ... by edm365f31 in General PowerShell on 23 Apr 2009 08:38 AM
|
 |
use robocopy in powershell and compress the file logs Is there a way to robocopy files and compress it in powershell? by edm365f31 in General PowerShell on 23 Apr 2009 07:01 AM
|
 |
RE: Changing folder names Shay base on this script how do you get the size of each folder? by edm365f31 in General PowerShell on 21 Apr 2009 01:25 PM
|
 |
RE: Deleting Files and Folders within a shared directory older than x days I creatred a command line script based on your script and tested it through folders and it works great. We do have a clean script that clean servers but this command line script will be used for those dev boxes that are not part of the production cl ... by edm365f31 in General PowerShell on 21 Apr 2009 08:59 AM
|
 |
RE: Deleting Files and Folders within a shared directory older than x days Is this script still recursive and will save folder structure? I have a log folder in all our box \\strcomputer\c$\mylogs under this folders are different folder by jobs then date then logs. I don't want to delete the dir structure just log files ... by edm365f31 in General PowerShell on 21 Apr 2009 07:36 AM
|
 |
RE: Deleting Files and Folders within a shared directory older than x days Shay How do you include logging on this script? So you know what got deleted. by edm365f31 in General PowerShell on 20 Apr 2009 12:48 PM
|
 |
RE: Creating a live server inventory This is how I got the script right now. EB Thanks for the lead It still need some work but will serve as it is. I still need to grep out (all windows 500 600's) (All Linux 700 800's) I also thought about just creating a hash array? (dictionary) - no ... by edm365f31 in General PowerShell on 14 Apr 2009 09:50 AM
|
 |
RE: Creating a live server inventory this works for 3000 type box foreach ($hosttype in (gc C:\Powershell\Study\HostList\hosttypes.txt)) { foreach ($number in (1..199)) { $itr = "{0:00#}" -f $number $strServer = $hosttype.Replace('%xx%', $itr) Write-Host $strServer } } by edm365f31 in General PowerShell on 14 Apr 2009 05:38 AM
|
 |
RE: Creating a live server inventory this is what I have right now still need to add a logic that will create different group of host names csv, by All Servers, then separate them with windows and Linux. 500 600 3000 boxes are windows while the 700 and 800 boxes are Linux. Also the ... by edm365f31 in General PowerShell on 14 Apr 2009 05:19 AM
|
 |
RE: Creating a live server inventory This works and generates the list..will it better for this to be a function so I can maybe pass it to a pingit routine. Foreach ($hosttype in (gc C:\Powershell\Study\HostList\hosttypes.txt)) { foreach ($number in (1..99)) { $itr = "{0:0#}" -f $numbe ... by edm365f31 in General PowerShell on 14 Apr 2009 05:29 AM
|