< Back
Test-AdultContent
Post
NAME Test-AdultContent
SYNOPSIS
Get Adult and Racy score of an Web hosted Images.
SYNTAX
Test-AdultContent [[-URL] <String>] [<CommonParameters>]
DESCRIPTION
Function identifies any adult or racy content on a web hosted Image and flags them with a Boolean value
[$true/$false]
NOTE : You need to subscribe the "Computer Vision API" before using the powershell script from the following link
and setup an environment variable like, $env:MS_ComputerVision_API_key = "YOUR API KEY"
API Subscription Page - https://www.microsoft.com/cognitive-ser ... us/sign-up
PARAMETERS
-URL <String>
[Parameter(ValueFromPipeline=$True)]
[String] $Path,
Required? false
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS Root\\>"http://upload.wikimedia.org/wikipedia/c ... adella.jpg" | Test-AdultContent
isAdultContent isRacyContent URL
-------------- ------------- ---
False False http://upload.wikimedia.org/wikipedia/c ... adella.jpg
pass the Image URL to the function through a pipeline to get the results.
-------------------------- EXAMPLE 2 --------------------------
PS Root\\>(Invoke-WebRequest -Uri 'http:\\\\geekeefy.wordpress.com' -UseBasicParsing).images.src | Test-AdultContent
-ErrorAction SilentlyContinue |ft -AutoSize
isAdultContent isRacyContent URL
-------------- ------------- ---
False False https://geekeefy.files.wordpress.com/20 ... amp;crop=1
False False https://geekeefy.files.wordpress.com/20 ... amp;crop=1
False False
https://geekeefy.files.wordpress.com/20 ... amp;crop=1
False False https://geekeefy.files.wordpress.com/20 ... amp;crop=1
False False
https://geekeefy.files.wordpress.com/20 ... amp;crop=1
You can also pass a series of Image URL's to the Cmdlet, like in the above example I passed it Image URL's of all
images from my Blog homepage.
Please note that, API has a limitation of 20 requests per min, so you may see errors after the limitation is
breached
RELATED LINKS
SYNOPSIS
Get Adult and Racy score of an Web hosted Images.
SYNTAX
Test-AdultContent [[-URL] <String>] [<CommonParameters>]
DESCRIPTION
Function identifies any adult or racy content on a web hosted Image and flags them with a Boolean value
[$true/$false]
NOTE : You need to subscribe the "Computer Vision API" before using the powershell script from the following link
and setup an environment variable like, $env:MS_ComputerVision_API_key = "YOUR API KEY"
API Subscription Page - https://www.microsoft.com/cognitive-ser ... us/sign-up
PARAMETERS
-URL <String>
[Parameter(ValueFromPipeline=$True)]
[String] $Path,
Required? false
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS Root\\>"http://upload.wikimedia.org/wikipedia/c ... adella.jpg" | Test-AdultContent
isAdultContent isRacyContent URL
-------------- ------------- ---
False False http://upload.wikimedia.org/wikipedia/c ... adella.jpg
pass the Image URL to the function through a pipeline to get the results.
-------------------------- EXAMPLE 2 --------------------------
PS Root\\>(Invoke-WebRequest -Uri 'http:\\\\geekeefy.wordpress.com' -UseBasicParsing).images.src | Test-AdultContent
-ErrorAction SilentlyContinue |ft -AutoSize
isAdultContent isRacyContent URL
-------------- ------------- ---
False False https://geekeefy.files.wordpress.com/20 ... amp;crop=1
False False https://geekeefy.files.wordpress.com/20 ... amp;crop=1
False False
https://geekeefy.files.wordpress.com/20 ... amp;crop=1
False False https://geekeefy.files.wordpress.com/20 ... amp;crop=1
False False
https://geekeefy.files.wordpress.com/20 ... amp;crop=1
You can also pass a series of Image URL's to the Cmdlet, like in the above example I passed it Image URL's of all
images from my Blog homepage.
Please note that, API has a limitation of 20 requests per min, so you may see errors after the limitation is
breached
RELATED LINKS