Registry Uninstall of 3rd party applications
While browsing the forums I found this thread. I'm wondering if it is possible to modify it so it will look into a CSV file that contains the names of the applications I want to remove?If this is...
View ArticleConnect-IscsiTarget AuthenticationType parameter is case sensitive
Hi Folks:The 'AuthenticationType' parameter of the Connect-IscsiTarget cmdlet must be UPPERCASE to work. The documentation at 'http://technet.microsoft.com/en-us/library/hh826098.aspx' for the...
View ArticlePowershell script to modify DNS not returning errors
I've modified a script to make DNS changes given a name/IP combo from a CSV file and it seems to be working, but is not throwing any errors (which I had thought it would do, but...
View ArticleWriting to a hashtable and storing to another hashtable
I am trying to break up an array into multiple arrays and use the data in the new arrays as values in a "temp" hashtable that will be added to a another hashtable. unfortunately, the resulting...
View ArticleAppending to file, getting error file is being used by another process;
I am using a function posted on stackoverflow to check if a file is locked and append contents from another process....
View ArticleSQL Server documentation using Powershell
Hi all I have been using SQL Power Doc to document my instances. https://sqlpowerdoc.codeplex.com/wikipage?title=Guide%20For%20PowerShell%20Beginners. I am in the process of running the conversion of...
View Articlecmd batch launch powershell script and getting environment variables set by...
Hi guys,I wrote a batch which - call a powershell script which set some environnment variables- then launch other commands Then I would like to be able to read the environement variable set by the ps...
View Articlesearch .docx and replace text with image
I've got a directory containing a series of images. The images will always be the same name and I need to insert them into placeholders in a Word document which will be a template. I thought of using...
View ArticleClear out old messages in Exchange 2010 journal mailbox after messages are...
# THIS IS THE FIRST COMMAND THAT I RUN IN A SEPARATE .PS1 FILE. THIS SEEMS TO WORK FINE: New-MailboxExportRequest JournalMailbox -FilePath '\\dfsdr.dc.pud\PowershellEmailArchive\Journal.pst' # NEXT I...
View ArticleCopying and Renaming file a variable
Good day everyone,I am new to powershell and I am trying to write a simple script that will take a file, copy the file into an archive folder and then rename the file with yesterdays date appended to...
View ArticlePrevious object in a pipe
Hi,is it possible to get the name of the group in the table:Get-DistributionGroup | get-distributiongroupmember |ft alias, @{label='Test1';expression={$_.($_.name)}}THX and best regardsChristian
View ArticleWSUS Reporting per group (GUID)
Hello Friends,I am using this script for WSUS reporting (cannot post links or images so please copy paste into browser to see script code: http://get-mailbox.net/get-wsusreport )I tweak the...
View ArticleAutomate a login script and exit Website - Problem with login in function
Hello All, I've started working on a script to login to a site automatically and have an output log file. The problem i have is the button (login nutton) line of code in my script, i'm not sure if it...
View ArticleTrouble with if else statement in script to add users to group
So I wrote this powershell script to add users to a distribution group and it's working fine, but we want a clean log to be able to see what was done. I'm trying to use an if else statement to...
View ArticleActive Directory Script-Find if users exist
Import-CSV "L:.\Users.txt" -header ("UserName") | % { $UserN = $_.UserName $ObjFilter = "(&(objectCategory=person)(objectCategory=User)(samaccountname=$UserN))" $User = Get-ADUser -Filter...
View Articleadd-pssnapin Microsoft.Exchange.Management.PowerShell.Admin
I have a script (below) that was designed to be used by people who do not have access to Exchange. The idea is to check if ActiveSync is enabled for the user, it gives the ability to enable or disable...
View ArticleParameter Binding Issue
I have an advanced function that that looks something like this:function Audit-System { [CmdletBinding()] param(...
View ArticleNot able to create table in database using powershell
HII have sql server 2012 express edition. Using power shell I try to create a database and then create a table. In the below script the database is created but fails to create the table. I get the...
View ArticleRun commands in parallel
Hi, I have a script that runs an application "CALCAPP.exe" using values from passing parameters: \\PRCServer09\APPS$\CalcApp.exe -f \\PRCServer09\Data$\dlymkt.xml -r \\PRCServer09\Rules$\mktRules.xml...
View ArticleExport users of multiple groups from import-csv or get-conent
Hi I am running below PS command to get the users details of all users which are in groups.csv file with their attributes. Import-Csv .\groups.csv | % { Get-ADGroupMember $_.group | Get-ADUser...
View Article