I saved above script in notepad and given name as "WindowsProfiles.ps1"
If i try to type Get-WindowsProfiles.ps1 then it gives me below error
PS D:> Get-WindowsProfiles.ps1 Get-WindowsProfiles.ps1 : The term 'Get-WindowsProfiles.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path correct and try again. At line:1 char:1 + Get-WindowsProfiles.ps1 + ~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Get-WindowsProfiles.ps1:String) , CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
if i run script without "Get-" then it gives me result
but my main question is how i can run same script for multiple servers
You need to login in order to comment or like this post: apply here