aww dangit
This commit is contained in:
parent
ddd1f02fed
commit
c0a406a590
BIN
Data/gamblecore.wav
Normal file
BIN
Data/gamblecore.wav
Normal file
Binary file not shown.
BIN
Data/xfiles.wav
Normal file
BIN
Data/xfiles.wav
Normal file
Binary file not shown.
|
|
@ -134,7 +134,7 @@ Function Find-ISMBusinessObject {
|
||||||
|
|
||||||
if (!$Query){
|
if (!$Query){
|
||||||
|
|
||||||
Write-Host "No results returned for the $BusinessObject Business Object!" -ForegroundColor yellow
|
#Write-Host "No results returned for the $BusinessObject Business Object!" -ForegroundColor yellow
|
||||||
|
|
||||||
} elseif ($Query.Edmx){
|
} elseif ($Query.Edmx){
|
||||||
|
|
||||||
|
|
@ -238,7 +238,7 @@ Function Find-ISMBusinessObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
catch {
|
catch {
|
||||||
write-warning "Failed querying for $BusinessObject!"
|
write-warning "Failed querying Spark!"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,14 +36,14 @@ function Get-Hostname ([string]$name) {
|
||||||
$sccmMatches = Get-SCCM_HostnameMatch $name
|
$sccmMatches = Get-SCCM_HostnameMatch $name
|
||||||
if ($SCCMMatches -and $SCCMMatches.Count -lt 2) {
|
if ($SCCMMatches -and $SCCMMatches.Count -lt 2) {
|
||||||
return $SCCMMatches,''
|
return $SCCMMatches,''
|
||||||
} elseif (!$SCCMMatches) { $errMsg += "No SCCM match found`n" }
|
} elseif (!$SCCMMatches) { $errMsg += "No SCCM name match found`n" }
|
||||||
elseif ($SCCMMatches.Count -ge 2) { $errMsg += "Many SCCM matches found`n" }
|
elseif ($SCCMMatches.Count -ge 2) { $errMsg += "Many SCCM matches found`n" }
|
||||||
|
|
||||||
# CMDB check should be absolute last resort
|
# CMDB check should be absolute last resort
|
||||||
$cmdbMatches = Find-ISMBO -bo cis -SearchQuery $name
|
$cmdbMatches = Find-ISMBO -bo cis -SearchQuery $name
|
||||||
if ($cmdbMatches -and $cmdbMatches.Count -lt 2) {
|
if ($cmdbMatches -and $cmdbMatches.Count -lt 2) {
|
||||||
return $cmdbMatches.Name,''
|
return $cmdbMatches.Name,''
|
||||||
} elseif (!$cmdbMatches) { $errMsg += "No CMDB match found`n" }
|
} elseif (!$cmdbMatches) { $errMsg += "No CMDB name match found`n" }
|
||||||
elseif ($cmdbMatches.Count -ge 2) {
|
elseif ($cmdbMatches.Count -ge 2) {
|
||||||
# Try more specific queries
|
# Try more specific queries
|
||||||
# Asset tag
|
# Asset tag
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ Function Get-ISMBusinessObject {
|
||||||
|
|
||||||
if (!$Query){
|
if (!$Query){
|
||||||
|
|
||||||
Write-Host "No results returned for the $BusinessObject Business Object!" -ForegroundColor yellow
|
#Write-Host "No results returned for the $BusinessObject Business Object!" -ForegroundColor yellow
|
||||||
|
|
||||||
} elseif ($Query.Edmx){
|
} elseif ($Query.Edmx){
|
||||||
|
|
||||||
|
|
@ -268,7 +268,7 @@ Function Get-ISMBusinessObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
catch {
|
catch {
|
||||||
write-warning "Failed querying for $BusinessObject!"
|
write-warning "Failed querying Spark!"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ BEGIN {
|
||||||
### If we have no BOMetaDataProperties then an invalid BusinessObject was supplied.
|
### If we have no BOMetaDataProperties then an invalid BusinessObject was supplied.
|
||||||
if (!$BOMetaDataProperties){
|
if (!$BOMetaDataProperties){
|
||||||
$ValidSyntax = $false
|
$ValidSyntax = $false
|
||||||
Write-Host "Unable to query Metadata for the $BusinessObject Business Object! Check the name and try again." -ForegroundColor yellow
|
Write-Host "Failed querying Spark!" -ForegroundColor yellow
|
||||||
} elseif ($BOMetaDataProperties.EntityType.count){
|
} elseif ($BOMetaDataProperties.EntityType.count){
|
||||||
$BOMetaDataProperties = $BOMetaDataProperties.EntityType[-1].Property.Name | Sort-Object
|
$BOMetaDataProperties = $BOMetaDataProperties.EntityType[-1].Property.Name | Sort-Object
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -244,6 +244,11 @@ Function Get-PC {
|
||||||
|
|
||||||
$comp,$msg = Get-Hostname $comp
|
$comp,$msg = Get-Hostname $comp
|
||||||
if ($msg -and -not $SHSPrinter) {
|
if ($msg -and -not $SHSPrinter) {
|
||||||
|
if ($SoundEnabled) {
|
||||||
|
$oopsSoundPath = Join-Path (get-item $PSScriptRoot).Parent.FullName 'Data\gamblecore.wav'
|
||||||
|
(New-Object Media.SoundPlayer $oopsSoundPath).Play()
|
||||||
|
}
|
||||||
|
|
||||||
Write-Host "`n$msg" -ForegroundColor Red
|
Write-Host "`n$msg" -ForegroundColor Red
|
||||||
|
|
||||||
$props = [Ordered]@{
|
$props = [Ordered]@{
|
||||||
|
|
@ -599,6 +604,10 @@ Function Get-PC {
|
||||||
|
|
||||||
if ($adTest) {
|
if ($adTest) {
|
||||||
Write-Warning "$comp is either disabled or off the domain"
|
Write-Warning "$comp is either disabled or off the domain"
|
||||||
|
if ($SoundEnabled) {
|
||||||
|
$oopsSoundPath = Join-Path (get-item $PSScriptRoot).Parent.FullName 'Data\xfiles.wav'
|
||||||
|
(New-Object Media.SoundPlayer $oopsSoundPath).Play()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Write-Progress -Activity "Looking up computer in AD" -Completed
|
Write-Progress -Activity "Looking up computer in AD" -Completed
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ Patch: 2024-09-13
|
||||||
-Refactor BatchInvokes uses Get-PCLocal so there is only one spot to update
|
-Refactor BatchInvokes uses Get-PCLocal so there is only one spot to update
|
||||||
-Fix shortened Spark! timeout since Spark! typically won't succeed after 5 seconds
|
-Fix shortened Spark! timeout since Spark! typically won't succeed after 5 seconds
|
||||||
-Fix bug when querying mobile devices
|
-Fix bug when querying mobile devices
|
||||||
|
-Fix Less helpful (and less confusing) ISM error messages
|
||||||
|
-Tip try setting $SoundEnabled = $true
|
||||||
|
|
||||||
Patch: 2024-09-12
|
Patch: 2024-09-12
|
||||||
-Fix Hostnames now check SCCM for a hostname match as a fallback
|
-Fix Hostnames now check SCCM for a hostname match as a fallback
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue