Share your folder where you have files. if you have multiple files or folder then you zip them. Who ever Admin performing this operation or activity should have access on both source and target to copy and pate the files from a Network share folder. $servers = Get-Content 'c:\temp\file.txt' Invoke-Command -ComputerName $servers -ScriptBlock { Copy-Item -Path '\\servername\folder\file.zip' -Destination "c:\\temp" -Verbose }
Hi..Today will discuss about small powershell command with that we will get multiple user's Samaccount (Accountname/Logonname/Useraccount), other attributes. Open your powershell ( windows 2008 server, R2 etc..) Start -> RUN -> type powershell then type below command to Load the module. Import-Module ActiveDirectory or you can directly open the from Start -> Administrative Tools -> then click on the Active Directory Module for Windows PowerShell this is will load the Module and Powershell command propmt will open. Now type below command to get the SamAccount of a Sercurity group Get-ADGroupmember -Identity "Distinguished Name of the Group" | export-csv -path c:\users\XXXX\desktop\filename.csv -notypeinfo Example:: domain name is bbntechinfo.com Group name is : DBA Users Ou name is : Health So Distinuguished name of the group is : "CN=DBA Users,OU=Health,DC=bbntechinfo,DC=com" if you want to see the Distinuguished name of group ...
Comments