header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Search
Search Area
Criteria Options
Search Topics From
Search By User
Search in Forum(s)
Included Forums: ALL
Topic
RE: Largest Directory Size??
You can also add: $lwt = (Get-Item $path).LastWriteTime $fulldate = $lwt.DateTime then change -value $fulldate for the lastwritetime object
by valdezdj in General PowerShell on 10 Nov 2010 10:27 AM
RE: Largest Directory Size??
Try this... Param( [string]$path = "C:\Scripts", [int]$first = 5 )# end param # *** Function Here *** function Get-DirSize ($path){ BEGIN {} PROCESS{ $size = 0 $folders = @() foreach ($file in (Get-Chil ...
by valdezdj in General PowerShell on 10 Nov 2010 10:17 AM
RE: Find Cell Value
Anyone, anyone, BUEHLER?!
by valdezdj in General PowerShell on 20 Oct 2010 12:26 PM
RE: Find Cell Value
Headbanger! Ha ha. This one got me stuck in the mud.
by valdezdj in General PowerShell on 19 Oct 2010 12:16 PM
RE: Find Cell Value
set-variable date -scope script $date = Read-InputBox -message "Enter a date that the diversion record was observed." -title "Daily Diversion Date" Function Get-TodayMeas{ $SRVR = "$ENV:COMPUTERNAME\XMAP7" $c = new-connection -server ...
by valdezdj in General PowerShell on 19 Oct 2010 11:43 AM
RE: Find Cell Value
Finally figured it out. I have to run a loop on each row to match the month then run another loop on each column to get the exact date in the cells. Here's the code for future reference. Maybe someone can provide some cleaning up tips, I don't think ...
by valdezdj in General PowerShell on 18 Oct 2010 07:31 AM
RE: Find Cell Value
Ok, my script is coming along. The script will now loop through columns in the excel spreadsheet but the value of the cell is 11/5/2010 12:00 am, and so here's my new script, but it doesn't match so the loop doesn't stop. $Row = 4 $Column = @(14 ...
by valdezdj in General PowerShell on 15 Oct 2010 12:47 PM
RE: Find Cell Value
function Find-DateCell($reqdate){ $reqdate = 11/5/2010 $sheetname = "2010-2011" $xl = new-object -comobject excel.application $xl.Visible = $true $wb = $xl.Workbooks.Open("C:\Scripts\Output\1400553.xls") $ws = $wb.WorkSheets.item($Sheetname) ...
by valdezdj in General PowerShell on 15 Oct 2010 09:30 AM
Find Cell Value
I'm using powershell to open a specified spreadsheet and find a date within the spreadsheet based on a user supplied variable. I would like the script to find the date in the spreadsheet, drop to the cell below and insert a value to the cell below t ...
by valdezdj in General PowerShell on 20 Oct 2010 12:25 PM
RE: Bug in PS ISE
For some reason the script was removed so here you go. $loc = Read-InputBox -message "Enter a location" -title "Division" set-variable path1 -scope script $script:path1 = "C:\Scripts\Output\computersping$loc.csv" set-variable path2 -scope g ...
by valdezdj in General PowerShell on 31 Aug 2010 09:35 AM
Bug in PS ISE
Ok, so i have this script that pings each computer in AD and exports the list to a csv file. But when I run the script in PS ISE it runs most of the script but then restarts itself into a never ending loop and I have to do a Ctrl+C to end the script ...
by valdezdj in General PowerShell on 31 Aug 2010 09:26 AM
RE: Metadata information from files
Sorry for the late update, but halr9000's version is nice and very powershellish but actually EBGreen's way works much better because I can do an Out-File xxx.xlsx and it puts each column results in separate columns in Excel. I know that you can do ...
by valdezdj in General PowerShell on 10 Aug 2009 01:28 PM
RE: Metadata information from files
SeaJhawk: Very nice script, I'll have to use that in the near future but for now EBGreen's suggestion will work. Thanks for all the replies about the alias'.
by valdezdj in General PowerShell on 05 Aug 2009 12:58 PM
RE: Metadata information from files
Can you tell me what the '?' and the '!' do?
by valdezdj in General PowerShell on 05 Aug 2009 12:53 PM
RE: Metadata information from files
Thank you EBGreen. That was just what I was looking for, I was having trouble getting the owner information. Thanks again for the quick response.
by valdezdj in General PowerShell on 05 Aug 2009 12:51 PM
Metadata information from files
I've found a few snippets on how to do this but I cannot customize them to fit what I'm looking for. I need a script that will do: gci "path" -recurse and then spit out something out for each file the name, the owner and the size of the file. I've b ...
by valdezdj in General PowerShell on 10 Aug 2009 01:29 PM
RE: gwmi "Invalid Parameter" error
Yeah that worked! I knew it was something easy.Thanks, for the help.
by valdezdj in Active Directory on 06 May 2009 11:37 AM
RE: gwmi "Invalid Parameter" error
I thought that might be it, that for some reason it didn't recognize win32reg_addremoveprograms, but I've done other scripts with that class and so I changed it to Win32_Product and same result.
by valdezdj in Active Directory on 06 May 2009 11:10 AM
gwmi "Invalid Parameter" error
I know this is probably something really easy that I'm missing but I haven't scripted in Powershell for awhile. Anyways, I'm hitting AD for computers in a certain OU and I'm getting computer names but not the data for the computers. I'm looking for ...
by valdezdj in Active Directory on 06 May 2009 11:12 AM
RE: Quest Powershell tools truncates results?
Poshoholic, Very nice post. Especially about truncating in arrays, sometimes you come along a post that teaches one something and this was that post. Thanks!
by valdezdj in Active Directory on 29 Jan 2009 12:43 PM
RE: Installing a software package
Yeah you're right but I fixed that in my final script that I ran. I wish it were that easy.
by valdezdj in General PowerShell on 29 Jan 2009 12:35 PM
RE: Installing a software package
Ok...forget the post about the credentials. I'm getting these errors: WmiObject : Generic failure At C:\Scripts\PowerShell\InstallOffice2K7.ps1:14 char:26 + $instproc = get-wmiobject  <<<< -class Win32_Product -computername $computer -credential $cr ...
by valdezdj in General PowerShell on 28 Jan 2009 09:12 AM
RE: Installing a software package
thanks for the quick response! I would like to pass credentials onto the remote computers, I don't feel like logging into each computer for the install(I'm the only one here with admin rights) How can I pass my username and password without the prom ...
by valdezdj in General PowerShell on 28 Jan 2009 08:40 AM
Installing a software package
Ok...so before I start testing this script I would like to get some feedback on if I'm on the right track. I'm trying to install a package on our computers in AD. I've already got the ones that have a ping in a spreadsheet, so is it really this easy ...
by valdezdj in General PowerShell on 28 Jan 2009 07:11 AM
RE: get-QADGroup
Not really sure why you're adding the -service in there, do you mean -SearchRoot? If you aren't then try that so it'll look something like this: Get-QADGroup -SearchRoot 'domain\GroupOU' |Select displayname, whatever, etc. I think that's what you' ...
by valdezdj in Active Directory on 29 Aug 2008 02:06 PM
RE: Rename 'My Computer' icon
Thanks!
by valdezdj in General PowerShell on 22 Aug 2008 02:59 PM
RE: Rename 'My Computer' icon
Sorry. Anyways, a bit more information on bginfo would be helpful. Thanks.
by valdezdj in General PowerShell on 22 Aug 2008 02:37 PM
RE: Rename 'My Computer' icon
System Restore! System Restore! System Restore! Damn it!
by valdezdj in General PowerShell on 22 Aug 2008 02:01 PM
RE: Rename 'My Computer' icon
It worked great as far as putting the computer name on My Computer but ever since I've done that I rebooted and my computer is freakishly slow. It seems like it goes in spurts. It will suddenly stop and then about 15 seconds later it will just do ev ...
by valdezdj in General PowerShell on 22 Aug 2008 12:19 PM
RE: Rename 'My Computer' icon
Thanks, that's all I needed. Worked great once I added it as a drive.
by valdezdj in General PowerShell on 22 Aug 2008 10:16 AM
Page 1 of 3123 > >>
Active Forums 4.3
right
footer   footer
footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
footer   footer