Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. blister911

    Create a folders based on username and set permissions to them

    So what part of your process isn't working as you want? Light travels faster than sound. That's why some people appear bright until you hear them speak.
  2. blister911

    How to output to two columns

    I would use a custom object then export the results. Not knowing how your data is structured, I can only give you an idea of what it would look like. $backups = @() #<Get Data somehow> Foreach ($backup in $backups) { $backupnode = GetBackupNode $backupnode = Get-BackupNode.hostname...
  3. blister911

    Waiting for open windows to close

    Instead of piping all the process to the stop command, you could put them into a variable and then loop through them to stop. Wait a bit and then check if they are stopped or still running. $processes = get-process | ? { $_.mainwindowtitle -ne "" -and $_.processname -ne "powershell" }...
  4. blister911

    Comparing a CSV to a Share

    I see a typo in the first code block: #get directories$path = "c:\temp\userdirs\" Should be: #get directories $path = "c:\temp\userdirs\" Light travels faster than sound. That's why some people appear bright until you hear them speak.
  5. blister911

    Comparing a CSV to a Share

    Matt Are you still in need of assistance? I've been away for a while, but I'd be willing to help out, now, if I can. If so, what would determine if a file was "old and need to be removed"? They don't show as a user in your AD user export? Assumptions I'm making until I hear from you: 1...
  6. blister911

    Help needed please: Assign variable to left hand side of an object definition

    Are you looking for something like this? New-Variable -name ("TrafficLight"+$xxvariablexx) Light travels faster than sound. That's why some people appear bright until you hear them speak.
  7. blister911

    How to sum a column

    Your code is a bit confusing. But if that is all that isn't working, try this: param ( [Parameter(Mandatory)] [String] $Path, [decimal] $days ) $text = get-content $path (Get-Content $path).Replace("`t", " ") | set-content "C:\anil\input555.txt" $path = "c:\anil\input555.txt"...
  8. blister911

    How to read special characters

    You could do the search and replace in one step. Mine are separate functions, because there are some times when I just want to be notified that there are special characters present and then prompt for what action to take; replace or leave. Anyway, here is how to do it on one step...
  9. blister911

    How to read special characters

    This is what I've done: 1. Create an array of all the special character you would like to identify with the double characters, such as the one you're trying to identify, at the beginning. 2. Search the specified string for any of the special characters 3. Replace the special character(s) with...
  10. blister911

    Cannot index into a null array error in PowerShell when renaming a folder against a SQL query

    I don't know SQL, however, I'm wondering if there needs to be a semi-colon at the end of your SQL select statement. $SqlQuery = "Select Alpha, siteid from MigrationStaging.Map.CashSiteId__ProteanAlpha where siteid = 'AiB3304';" Light travels faster than sound. That's why some people...
  11. blister911

    Rename-Item with Date and Time for excel file

    It's not the most elegant, but this should work Get-ChildItem "C:\Users\Documents\MicroApps\SCAPH_ACL_Project\1_SCAPH_Main\Final_Output_z.xlsx" | ForEach-Object {$_.LastWriteTime = Get-Date; Rename-Item -Path $_ -NewName "Final_Output_z.xlsx"} Light travels faster than sound. That's why...
  12. blister911

    Add a column to a Select output

    How about something like this? Import-Module ActiveDirectory $groups= "GROUP1","GROUP2","GROUP3" $memberships = @() foreach ($group in $groups) { $members = Get-ADGroupMember $group -Recursive foreach ($member in $members) { $user = Get-Aduser $member -Properties sn $record =...
  13. blister911

    Powershell - convert string to table or other object?

    What does the code that creates the output look like? Light travels faster than sound. That's why some people appear bright until you hear them speak.
  14. blister911

    remote exe execution through powershell script - not working as expected

    Prabhasb, does this work for you? $Username = 'MYDomain\Prabha-K' $Password = 'pas@123' $pass = ConvertTo-SecureString -AsPlainText $Password -Force $Cred = New-Object System.Management.Automation.PSCredential -ArgumentList $Username,$pass $server = "test01.MYDomain.com" $session_name =...
  15. blister911

    Need a PS script

    Chris, Most of us are willing to assist you with fixing logic/syntax, but I don't know if anyone is going to want to write the script for you. We've all been where you are. But you need to give it a shot, so you can learn how to do it. Then come back with something we can work from/with if...
  16. blister911

    Find then copy files from Network Server to local folder from a CSV file (Mac OS X)

    I think it might be a difference between our input files. My file names column has a header of "Name", which I reference in the script. Name <--- Header File1.jpg <--- File File2.gif <--- File File3.txt <--- File File4.doc <--- File Light travels faster than sound...
  17. blister911

    Find then copy files from Network Server to local folder from a CSV file (Mac OS X)

    AndiZu, I would do something like this. You may have to play with the paths to make it work. Disclaimer: I know almost nothing about the Mac OS, so I have no idea if these commands will work properly or not. Good luck! ## These are going to have to be changed to match your environment...
  18. blister911

    Sharepoint 2013 PS to populate fields in list based on other items in list

    Your code doesn't match your output, with regards to which fields you need, so I went with what you provided as output. I would do it like this: ## Set export location $export_location = "C:\Temp\SharePoint_Users.csv" ## Get all users and necessary attributes $users = Get-ADUser -Filter *...
  19. blister911

    Sharepoint 2013 PS to populate fields in list based on other items in list

    You could just get the manager information from AD when you're getting the user information. What is the code you are using to get the user information? Light travels faster than sound. That's why some people appear bright until you hear them speak.
  20. blister911

    Combination without repitition

    Dave, I don't think that would work, because you'd never get AA*. The first TLA would be ABC. Blue, It isn't very elegant, but try this: $List = "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z" $k = $list.count $res = @() for ($h=0; $h...

Part and Inventory Search

Back
Top