Rename-Item: A positional parameter error
I am tring to write a quick interactive command that will rename all the jpgs in the current directory and came up with the following command:$i=1; gci | ? { ($_.Extension -eq ".JPG") -and...
View ArticleInstalling a SQL server on a remote system using Powershell 3
Hello, I am trying to make a skript which installs the SQL Server (2013 Express) remote on another mashine (Server 2012). The first thought was, to use the Invoke-command:Invoke-Command -ComputerName...
View ArticleIgnoring blank fields of csv file
Hi, I am new to powershell and I need some help if you are kind :)I have one script for adding users to my AD and I want to import a csv file. The script is working, but I want to add one user to more...
View ArticleDNS SERVER Backup Script
I am writing a DNS server backup script with additional options. Backing Up DNS Server DailyCreate a folder based on current dateCopy the backup from source to newly created folder based on...
View ArticleProcess in a disconnected session ends after 2 hours.
Hey guys.Im having some issues with users that needs to run a process for longer then 2 hours i a disconnected session.This is the command that we use. invoke-Command -ComputerName Post-1...
View ArticleHelp!! Passing listbox items to display in textbox
Hi, I am having trouble with the passing listbox items to display in a textbox.Firstly Please create a folder on called C:\Test and add a couple of .txt files in the folder. When executing the below...
View ArticleFind and Replace MS Word - MatchWholeWord
I'm new to PowerShell but I've written the following code to read-in the filenames of whatever images are contained in the script directory and it does a find and replace on the filename. My trouble is...
View ArticleIf statement not finding the right info
Hi thereim trying to find if a value matches on a certain attribute in Ad and exchange(an attribute that an address list is based on)so when i try this:(Get-ADuser user1 -Properties...
View ArticleGet_ChildItem word document and Destination
am having same issue with following codeGet-ChildItem –Path ‘R:\EDI_Development\Documentation\MacessEXP\Scripting\*’ –Recurse -Include TestPlan.doc | ForEach-Object { Copy-Item -Path $_.FullName...
View ArticleHow Do I [Split Replace RegEx]
I'm trying to modify or replace text in a string, which seems to me, it should be fairly east to do. But examples I've seen and read about appear to go off in other directions or end up with results...
View ArticleHow do I trim a line in a .txt file and append the result in the same file.
I have a .txt file of the following structure: License Applied to NGP Application Server:\\qafile2\Leonardo\Feature Data\License...
View ArticleIntroduction to Service Management Automation
Service Management Automation (SMA) is a new component in System Center for process automation.Read More
View ArticlePowerShell Command History Lesson Part 3: Group Policies
In the last lesson we looked at enabling logging for commands in a PowerShell module. This requires PowerShell 3.0 and later and must be enabled for whatever module you wish, every time. That's a lot...
View ArticleNOS 4.0 – Use Powershell To Offload Tape Backup At A Remote Site
NOS 4.0 introduced PowerShell as a third way of automating your Nutanix Infrastructure. Also apart of 4.0 was the ability to clone VM’s without having to active the whole protection domain. Pre 4.0...
View ArticleWindows Management Framework 5 Preview Introduces Package Manager And Network...
Microsoft announced the availability of the Windows Management Framework V5 Preview (WMF), which includes Windows PowerShell OneGet, a package manager in the spirit of yum and apt-get; a set of...
View ArticlePowershell_ISE.exe vs Powershell_ISE(x86).exe
I have prepared code to test ODP.NET by establishing a database connection:I have 64-bit and 32 -bit Oracle clients installed on my machine and when I am querying I was able to connect to the database...
View Articleshould I use PS for that task ?
HiI know it may be a lame question but I'm new to PS and I would appreciate if you guys with big experience could advice me if I should even process the following scenario using PS or something...
View ArticleHow to delete a character ?
Hi all, I know how to delete a character but I try first to understand why it's appearing in order to decide the way to delete it. I do not catch it yet. Here is the problem:I create a file with some...
View ArticleAssistance with remoting
Our normal users are not allowed to install fonts on their win 7 pc's.Is there a way I can remotely grant this ability using powershell remoting ?
View ArticleNeed to do a multi-key sort on a legacy text file that has no delimiters
I need to do a multi-key sort on a legacy text file that has no delimiters. This is a relatively simple task on Unix but the Windows Command Shell cannot sort based on multiple keys - for example -...
View Article