PowerShell script to copy user
Does anyone know how to copy a users organizational unit? So far i have tried this: $SName = Read-Host "Please Enter the login initials of the source user " $Path = Get-QADUser -Identity $SName|Select...
View ArticleWhat's the commandlet to create a snapshot in Windows Server 2012?
I was reading on this forum that there *was* a commandlet called "New-VMSnapShot": http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/636c7463-16f1-4957-9953-93943728702c but...
View ArticleEliminating "Everyone" from all the shares and folders using powershell.
We have lots of shares from netapp which has millions of folders. I want to eliminate everyone right. only "everyone" not any other group or user from rights list. Just wanted to know if there is any...
View ArticleNeed help with PowerShell output to richtextbox
Can someone please explain to me why I'm unable to write the following to a RichTextBox? I'm getting input from a text box and then getting a list of services from a server using the following line:...
View ArticleSet-ACL on remote share breaks inheritance
I am trying to change permissions on a folder on a remote server share and it seems to break the inheritance already placed on the folder. This seems to only happen at the root of the share and not a...
View ArticleAbsolute begginer powershell question
Hello, I was just starting to use powershell and going through some online examples.The issue I am having is that the get command is not working .The set seems to be working fine.Is there something I...
View ArticleScript To Query AD to Locate Domain Admins
i'm currently looking for some assistance in generating a LDAP query or a Powershell Command to separately list: 1) All Domain Admins only 2)Exchange Admins Can any one provide some assistance....
View ArticleRunning function with "Write-Host" and redirect output to file does nothing.
Hello, I created this function: function TicketSolutionInformation { Write-Host "User has been created." -ForegroundColor Green } TicketSolutionInformation | Out-File -filepath ("123" + ".txt") -append...
View ArticleHow could I output error result to file by Powershell cmdlet
I made Powershell cmdlet sentences. How could I output error result of cmdlet to file ? cmdlet 2 >> c:\temp\error.txt was wrong.
View ArticleExchange Web Services PS Script worked with API 1.1 but now doesn't with...
Here is the code that works on my old workstation that has EWS API 1.1: $mailbox = 'XXXX@XXX.com' Import-Module -Name "C:\Program Files\Microsoft\Exchange\Web...
View ArticlePowerShell remoting from Windows 7 to Windows 2008 R2 fails
hello all, I have a script (which uses PSRemoteRegistry module) that collects registry information from remote servers running Windows Server 2008 R2. I have local administrator rights on these remote...
View Article$env: variabl
hello to you, how i have to do, to transport de value from the first variable (scripte) in the under script? # 1. scripte .... } $env:omp3 = $otag.$($ohash.Keys) # 2. scripte cls C:\MMC\.......ps1...
View ArticleParsing Exchange Server transport log for the largest email size sent and...
Hi, I'm currently investigating my email traffic statistics, how can I get the information of the largest email size ever sent and received in the Exchange Server ? or any script to export the...
View Articlebackup and restore a specific registry key in powershell
I am building a 2 scripts one to backup a large number of files and system settings and one to restore them after the system is re-imaged. I have everything set in the script but 1 thing I dont know...
View ArticleHow to divide the output in different sheets in a excel workbook
Hey guys :) PS noobie here. I got this script (stolen - didnt make it myself, just changed it a bit) that lists members in a specific active directory group in a xls (excel workbook) It lists the...
View ArticleI cant Pipe user to Get-ADcomputer ?
Hey! I want to get the managedby computer by from a list of names. But the $_ wont resolve to "Kenny Starfighter" that i am piping. "Kenny Starfighter" | % {Get-ADComputer -Filter 'managedby -eq...
View ArticleLooping trough multiple loops
My users have roaming profiles with folder redirection. Some users have the application data folder redirected while others have not. I wanted to search the DFS root for each user folder to see if the...
View ArticleIssue while running a SQL script with powershell
Hi All, I've a long SQL script of around 1000 lines. The result of this script is a table with one row. I'm trying to run this script on a remote DB and get the results. Below the powershell script I'm...
View ArticleNull valued expression
Hi all, new-ish to Powershell and have the following script calling a .csv file in the same directory to create 250 users for a test environment. Import-Module ActiveDirectory $Users = Import-Csv...
View ArticleExport/Import CliXML issue
Hi, I have a object of own class which store some properties. In script I send this object to PropertyGrid and everything works fine. To store values of properties I use Export-CliXML cmdlet. In the...
View Article