-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
U-AMERICAS\Trevor_Squillario
authored and
U-AMERICAS\Trevor_Squillario
committed
Jul 11, 2023
1 parent
8e031e3
commit cdd42bb
Showing
7 changed files
with
43 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
# | ||
# Generated by: Trevor Squillario <[email protected]> | ||
# | ||
# Generated on: 5/8/2023 | ||
# Generated on: 7/11/2023 | ||
# | ||
|
||
@{ | ||
|
@@ -12,7 +12,7 @@ | |
RootModule = 'DellOpenManage.psm1' | ||
|
||
# Version number of this module. | ||
ModuleVersion = '3.6.0' | ||
ModuleVersion = '3.6.1' | ||
|
||
# Supported PSEditions | ||
# CompatiblePSEditions = @() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
$AllDevices = Get-OMEDevice # Get all devices and store in variable | ||
$HostIPs = Get-Content "C:\Temp\hosts.txt" # Get context of text file | ||
$NewDevices = @() # Variable to hold devices found by IP | ||
foreach ($ip in $HostIPs) { # Loop through text file contents | ||
$IPMatch = $AllDevices | Where-Object {$_.NetworkAddress -EQ $ip} # Look for device with matching IP | ||
if ($IPMatch.Count -gt 0) { # Match found | ||
$DeviceMatch = $IPMatch.Identifier | Get-OMEDevice -FilterBy "ServiceTag" # Get Device object by Service Tag | ||
$NewDevices += $DeviceMatch # Add Device to array | ||
} | ||
} | ||
Get-OMEGroup "Test Group 01" | Edit-OMEGroup -Devices $NewDevices # Edit group and add devices from the array we created |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters