Such an easy task - Why can't I figure it out? Launching an EXE on a remote...
Hi All,First post, new member and very much a beginner at PowerShell.I want my PowerShell script (v3) to launch an EXE on a remote machine under specific user credentials. This application launches a...
View ArticleGathering HyperV VM Disk Information
I am trying to gather the following information about a VM's hard drive: Host NameVM NameLocation of the VM Drive (on the host)Size of the VM Drive (on the host)While my property names may not be the...
View ArticleRegEx Tip, Replace String set number of times
AllHere is another quick tip, last one lets say you have a string "AA124BB55HH657AAR555" now you want to replace the numbers (but only where there are 3 numbers together, not just 2) with say a #...
View ArticleNavigate through IE
Hello,I am very new to powershell and have little clue on exactly what I am doing. I am trying to navigate through a webpage but I am having some difficulties. The html code calls a lot of javascript....
View ArticleParse Fixed With Text File with regex replace with trimming option... (no...
Fixed Width text file111 2222 333 444444555 6666 777 8888 Desired output"111","2222","333","444444""555","6666","777","8888"$str ='111 2222 333 444444'$regex =...
View Articlefunction as InitializationScript
During a job, I would like to make a call to a certain function.As that function isn't in the same scope as the running code, this will fail.Therefore, I use the common refered syntax:$scriptblock = {...
View Articlereplace content of specific file in a directory
Hi PowerShell Guru's,I have an issue like this:Suppose in a folder i have 3 different type of files:Line.txtLine.sqlLine.htmI have the following code:$configFiles=get-childitem . *.xml -recforeach...
View Articlechange specific file extension using powershell
Hi PowerShell experts, I have a list of file in the my folder: exampleaa.txtab.txtac.txtad.txtNow i want to change only 2 file extension: ab.txtac.txt to ab.htm & ac.htm How do I choose specific...
View ArticleSearch registry DATA and get output KEY NAME?
Can we write powershell script to enter DEVID DATA and we will get an output of Key Name location?Like searchpath.ps1 06FDWhere VALUE "MatchingDeviceId" = DATA "ven_10de&dev_06fd"and get output:...
View ArticleTrying to check the current logged on user against a CSV, to find value of row
Hi,Real newb, sorry...I'm trying to fetch data out of a *.csv file. The data it will look for is the currentlylogged on user (well that is easy $env:username), but the *.csv has two columnswhere the...
View ArticleExporting HashTable/OrderedDictionary to CSV : (Key: Row1; Value: Row2)
Exporting HashTable/OrderedDictionary to CSV : (Key: Row1; Value: Row2)Desired Output:| col1 col2 col3 col4 ...... +-------------------------------------------- 1|LDClass LDName LDNoSDClass...
View ArticleTo run a software application
Need help in installing the software's using PowerShell.At my knowledge i have created a script but it need manual intervention to install. please help.Set-ExecutionPolicy RemoteSigned -ErrorAction...
View ArticleExport csv contents
Hi i am trying to remove the unwanted columns from csv.the problem is i am able to get the headers only, finding difficulties in bringing the contents from those columns
View ArticleIf file exists, copy specific text from source file to file that already exists
I want to start by saying sorry if this question has already been asked, and if it has been asked in a better way! I've been searching all day but just can't find the answer. I'm also new to...
View ArticleHTML PowerShell report - error - reserved future us?
Hello,I am trying to run an html report to pull quota data for file servers. I keep getting an error about the < character being reserved for future use. I've read about this, but thought if it...
View ArticleFormating
I've discovered that formatting is sort of a pain for me. I have this code that works and returns the information I need. $printers = Get-WmiObject -computer mgmg17ps -class "win32_printer" | select...
View ArticleChange Drive Letter
Currently, I have a USB3 disk that I insert into a server on a weekly basis.I want to get the label of this disk "Week1", "Week2" etc.. and pass that to a command that will change the drive letter to...
View ArticleAttaching LUNs in VMWare from NetApp SAN
Normal 0 false false false EN-AU X-NONE X-NONE MicrosoftInternetExplorer4Background: I am trying to add an existing datastore to a VM from a NetApp San. The datastore is a volume clone of a NetApp...
View ArticleGet-content (Joint path) problem
Hello,i am trying to write simple script which for some reason returns an error to me,here is the code that i have:param ( [string]$LogFile = (read-host "which file would you like to walk through"),...
View ArticleThe specified module "..." was not loaded
Hello,I want to manage iSCSI with Powershell cmdlets. But when I want to import-module MicrosoftiSCSITarget, it tells me:The specified module "MicrosoftiSCSITarget" was not loaded because no valid...
View Article