Search found 83 matches
- Fri Mar 20, 2009 6:55 am
- Forum: PowerShell
- Topic: Liat files open on a share by user and loaction
- Replies: 13
- Views: 9749
Liat files open on a share by user and loaction
Jim, could you provide an example on how you would call the fileclose method from the PS console?
- Fri Mar 20, 2009 6:43 am
- Forum: PowerShell
- Topic: Liat files open on a share by user and loaction
- Replies: 13
- Views: 9749
Liat files open on a share by user and loaction
Perhaps doing the string parsing and object construction inside of Posh? Would make it easier to read. Replaced :write-output -i $resultwith:$gblObject = @()foreach ($line in $result) { $myObject = '' | select Server,FileID,Path,Username,Locks,Permission $l = $line -split ',' $myObject.Server = $l[0...
- Mon Jan 12, 2009 8:46 am
- Forum: PowerShell
- Topic: Win32_LogicalDisk: returns sizes in gigabytes
- Replies: 2
- Views: 4912
Win32_LogicalDisk: returns sizes in gigabytes
For quick and dirty view this will definitely work. But it breaks down once you get comfortable with working with objects. You'll see the benefits later on down the road with the below code. Here, the same info is returned but as a PSCustom object that you can filter out using Select-object. I know ...
- Thu Dec 11, 2008 8:54 am
- Forum: PowerShell
- Topic: Bulk change the group names
- Replies: 4
- Views: 3198
Bulk change the group names
Gather your groups based on their name. Usage of wildcards are allowed.$grps = get-qadgroup companyname*Pipe to Set-QADgroup cmdlet$grps | set-qadgroup -samaccountname $_.samaccountname.substring(12) -whatif
- Thu Dec 11, 2008 7:59 am
- Forum: PowerShell
- Topic: Prompt for input
- Replies: 4
- Views: 20440
Prompt for input
The '[string]' is optional but it guarantees your variable will be a string type thru coercion or 'Casting'.
- Thu Oct 09, 2008 12:38 am
- Forum: PowerShell
- Topic: connecting to remote machine
- Replies: 5
- Views: 4049
connecting to remote machine
Sure. But your using the wrong slashes. use the backslash and it should work.ls servernameroot
- Mon Sep 08, 2008 4:46 am
- Forum: VBScript
- Topic: Remove URL shortcuts on remote PC's
- Replies: 5
- Views: 3231
Remove URL shortcuts on remote PC's
Yeah but I should of remembered that. Thx for the pick-me up JV.
- Mon Sep 08, 2008 4:33 am
- Forum: VBScript
- Topic: Remove URL shortcuts on remote PC's
- Replies: 5
- Views: 3231
Remove URL shortcuts on remote PC's
me = tunnel vision
- Fri Sep 05, 2008 3:43 am
- Forum: PowerShell
- Topic: E-Mail Script
- Replies: 3
- Views: 3200
E-Mail Script
The mailmessage object has a cc property that you can add once the object is created. $smtpmessage.cc.add("address@domain.com")
- Wed Aug 20, 2008 10:35 am
- Forum: VBScript
- Topic: Rename global groups by appending to name
- Replies: 13
- Views: 6448
Rename global groups by appending to name
Doh, it should be $_.Name.Substring(0,$_.name.length-2) forgot to type the property name first. so the line should be something like this. get-content c:groupname.txt | Get-QADGroup | % { Rename-QADObject -Identity $_.DN -NewName $($_.name.Substring(0,$_.name.length-2)) -WhatIf} joel.delatorre2008-0...