Guest User

Untitled

a guest
Jun 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. $a = "1", "Computer Name", "2"
  2. $b = "3", "4", "Full Computer Name Here"
  3.  
  4. foreach ($line in $a) {
  5. foreach ($line2 in $b) {
  6. where "*$line*" -like "*$line2*"
  7. }
  8. }
  9.  
  10. $a = "1","Computer Name","2"
  11. $b = "3","4","Full Computer Name Here"
  12. foreach ($line in $a ) {
  13. $b -match $line
  14. }
  15.  
  16. foreach ($line in $a) {
  17. $b | Where-Object { $_ -like "*${line}*" }
  18. }
  19.  
  20. foreach ($line in $a) {
  21. foreach ($line2 in $b) {
  22. if ($line2 -like "*${line}*") { $line2 }
  23. }
  24. }
  25.  
  26. foreach ($line in $a) {
  27. $b -like "*${line}*"
  28. }
Add Comment
Please, Sign In to add comment