Hi Guys
I want to create simple script that will show specific service like that below
param(
[Parameter(Mandatory=$True)]
[string]$ComputerName
)
get-service -ComputerName $ComputerName | where {$_.name -eq ‘WinDefend’} | Format-Table Machinename, Name, Status -AutoSize
My question is:
How to add mandatory option for service name?
Also when I import computer list and run this script on some workstations it is asking me for privilages
How to skip that and mark that specific device needs privileges
I will be very grateful for help
Raf