"Get-UserProfiles" is not recognized as the name of a cmdlet

I am trying to create a package for SAP which also copies the Landscape.XML file into the profiles of all users on that PC. I tried using the Get-UserProfiles function, but it always runs into the same error:
““Get-UserProfiles” is not recognized as the name of a cmdlet”

Here is the code i want to run:

$ProfilePaths = Get-UserProfiles | Select-Object -ExpandProperty ‘ProfilePath’
ForEach($Profile in $ProfilePaths){
Copy-File -Path “$Files*” -Destination “$Profile\AppData\Roaming\SAP\Common” -recurse

Try this:

[array]$Profiles = Get-UserProfiles -ExcludeDefaultUser

Thank you! It works.
With the -ExcludeDefaultUser parameter the issue i described doenst appear anymore.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.