Execute PowerShell script on Many Machines
I have a power shell script that I can execute on a list of machines. The script will run the list of machines in parallel. The script appears to run fine. But, let's say I have 500 machines to run...
View ArticleQuery account privilegesprivileges for context running script
I am trying to enumerate the privileges for the account running a script to make sure it has Logon as Batch rights. Anyone know how to do this? Thanks! jlc
View ArticleMerge different CSV files into one CSV file in Powershell
Hi I am using below script to export the permission from share folders. ============= $a = (Get-Acl -Path '\\server1\depts') $a.Access | Select-Object FileSystemRights, AccessControlType,...
View ArticleWorking with Events Powershell
Hey guys,So I'm trying to create an event registration from a WMI notifier query. What I would like to happen is for the wmi notifier to recognize a change in a specific service's state - then in...
View ArticleTrouble installing SMTP on Server 2012 Standard Core
I asked this on the windows 2012 forum, where I was advised to ask this on this form.I have a Server core instance I am administrating via PowerShell remoting. It has IIS and Sql 2008R2 functioning...
View ArticleExtract data from a .PST file via PowerShell
Hey guys,I've inherited from the Symantec KVS vault administrator a .pst file with all my folders and documents.I've mounted the file in Outlook and I can see all me folders and in each folder all my...
View Articlemulti-threaded ping
I was given this script by a vendor to run on some of my servers. I get some exceptions when I run itException calling "Send" with "2" argument(s): "An exception occurred during a Ping request." +...
View ArticlePassing DateTime to Powershell Results in 00:00:00 Time
I have 2 basic powershell test scripts (test1.ps1 and test2.ps1) Test1.ps1 looks like this:$mytime =Get-DateWrite-Host"Passing in: $mytime" $myvar =Invoke-Expression"C:\temp\Test2.ps1 -reftime...
View ArticlePowershell to Enable "Protect from Accidental Deletion" on ALL OU's
Howdy folks...The client I am currently working with has partially set the "Protect from Accidental Deletion" attribute on their AD...I want to extend this feature to ALL organisation units (OUs) in...
View ArticleScript to copy folders matching the name of folders in another directory,...
Good afternoon guys,I am totally new to PowerShell (only discovered it a week or so ago), or scripting in general for that matter, and therefore am finding it very difficult to tailor scripts I have...
View ArticleProblem with looping...
Hi,I'm in the process of writing a script which will update groups based on AD Attributes (department). This works great and reads a CSV with a list of groups and departments and adds uses to the...
View Articlehow to send multiple csv file to winzip as attachement
HiI have multiple csv file and I want to send all of them as attachment in zip format.How can include all csv file in zip format.
View ArticleExcluding from Convert to Html
Good afternoon, I am using a powershell script to run a query on sql and grab the results and then save them to html. The problem I am running into is that in addition to the fields I need it's...
View Articlescripting in a trusted AD forests environment
HelloI'm in charge of a complex operation of Exchange 2010 cross forest migration (users and mailboxes). The process requires many steps in both forests such as:1. Deleteing mail contact in target...
View Article2 arrays in a foreach
HiI have 2 arrays:Array: $allDBNewContentDB_20130617_121431.BAK SecureStoreDB_20130617_121431.BAK sp2013DBconfig_20130617_121431.BAK SP2013_State_Service_20130617_121431.BAK...
View ArticleHow to Loop Through Central Management Server in SQL Server 2012 Using...
I am trying to learn PowerShell. I want to use it to gather information from a Central Management Server and input the information into a table in a database. In Windows PowerShell ISE I am trying to...
View ArticleHow to add Distribution Group email alias from CSV in office 365
Hello Forum! Hope someone can help me troubleshoot this or even let me know if its not possible. But, I used powershell to import distribution groups and set primary emails in Office 365. That worked...
View ArticleCreate a SQL domain user with powershell
HiIs it possible to create a SQL login for an existing domain\user using powershell?brBjorn
View ArticleLocal Administrators Group Listing
Thanks, Cyreli for giving me something to start with. When I ran your code, I did not get any entries for the Administrators, which was all I needed. A few tweaks & I got what I wanted. (Very...
View ArticleHelp understanding strings in PS
Folks I'm new to PowerShell though I have done some programming in other langs. Can someone help me understand the difference in the following:1. $EmpID = "123456"Get-ADUser -Filter "EmployeeID -eq...
View Article