The organisation I work for have a range of different devices, mainly laptops, Surface Go and Surface Pro. We have a number of devices that we need to physically locate at our sites for servicing and auditing. These devices are spread throughout the community in residential houses and we would like to easily locate these devices physically but done of them have GPS.
I decided the easiest way to locate these is to rename the SSID's of access points in the houses to unique names associated with the houses then run netsh wlan show interfaces
in order to display the SSID, this would hopefully allow us to easily figure out which house the device is located in.
Is there an easy way to remotely run PowerShell through Microsoft Intune or anything similar?
Any help or other suggestions are very much appreciated.
TIA
Update
I have run winrm quickconfig
on a test client followed by Enter-PSSession HOSTNAME
I'm now receiving the following error in PowerShell....
PS C:\windows\system32> Enter-PSSession -TAM-5235
Enter-PSSession : A parameter cannot be found that matches parameter name 'TAM-5235'.
At line:1 char:17
+ Enter-PSSession -TAM-5235
+ ~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Enter-PSSession], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.EnterPSSessionCommand
PS C:\windows\system32> Enter-PSSession TAM-5235
Enter-PSSession : Connecting to remote server TAM-5235 failed with the following error message : The WinRM client
cannot process the request. If the authentication scheme is different from Kerberos, or if the client computer is not
joined to a domain, then HTTPS transport must be used or the destination machine must be added to the TrustedHosts
configuration setting. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not
be authenticated. You can get more information about that by running the following command: winrm help config. For
more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
PS C:\windows\system32>
currently looking at Connecting to remote server failed using WinRM from PowerShell for help.
It appears I need to explore Trusted Hosts on the clients