Quantcast
Channel: Windows PowerShell forum
Browsing all 21975 articles
Browse latest View live

Updating a row in a datatable

Hi all,I have an in-memory datatable that is populated by importing a CSV file. It has the columns DisplayName, Alias, Windowsemailaddress and Status. I want to find a row with a certain alias, eg....

View Article


Powershell script to stop service, start service - scheduled task

I am trying to get this script to work on a windows 2008 R2 server to stop a service for example "spooler", then start the service.I want to get an email only if the task fails, but right now for...

View Article


Running a C# executable that requires parameters

I have a C# executable that I need to run within a PowerShell script. It has 3 parameters.When I would execute this inside of a .bat file, it looks like this:ConvertPPTXtoPDF.exe "M1-Overview\Slides\M...

View Article

Question regarding PowerShell shareutils

 was wondering if you might be able to help with a small problem I am trying to solve. I have two systems and I need to copy the directory share settings from one to another. The ShareUtils module...

View Article

getting Content db size using powershell is less than the actual size

Hi ,I am using this simple script to get the actual size of each content database$ContentDbs=get-spcontentdatabase -webapplication <web-app url/name>foreach($contentdb in $ContentDbs) {...

View Article


Sending Credentials in PowerShell

When executing a powershell script / commands on a remote computer, does it pass the credentials in clear text? I currently use PSExec to remotely install / remove third party software and need to get...

View Article

invoke-command without manual entry of password

I want to run the invoke-command with the target being remote Windows 2003 server. The server is not part of active directoy, therefore I need to use the 'credential' parameter. Is there any way to not...

View Article

Enable Vlan Identification PowerShell 3.0

I am using PowerShell 3.0 and Hyper-V 3.0, I add a new NIC at my VM  usingAdd-VMNetworkAdapter -VMName TEST -SwitchName LANNow I need to enable Virtual Lan Identification. How can I do that ?Tkx guys

View Article


import-csv multiple files form one folder

Hello,There is a way to import multiple csv file into one and parse them? Or how to import multiple different csv file?I have a task to accomplish. In one folder have multiple file in csv format with...

View Article


How to write powershell command execution with verbose logging into log file...

I'm written small tool in c# to execute powershell command.Need your help to write all the execution activities done by the tool to a log file and the powershell command execution details  written to...

View Article

Disk-Space-Report-Reports | Error at line 203 char 13

gallery.technet.microsoft.com/scriptcenter/Disk-Space-Report-Reports-98e64d65/view/Discussionsim using above ps1 fileand get this error:Exception calling "Send" with "1" argument(s): "Therewas an...

View Article

(How) Can I access a method existing in my FormApp which is hosting a PSHost...

Hello,I would like to implement a form application which is hosting a PSHost and executes own cmdlets. As far as this it is no Problem.But my form is using also other dlls and has instanciated objects...

View Article

import module failed "no assembly with that name was found"

I wanted to create and use a managed service account.In domain controller, I use New-ADServiceAccount to create a MSA (it created a gMSA in Server 2012)then use Add-AdComputerServiceAccount to tie a...

View Article


finding deviceid from a list

Hello,I have the following script that is not working. I'm trying to find some hardware id for some GPUs. I can find the hardware id but I can't manage to compare it with a predefined listThis is the...

View Article

Powershell script runs from command line but not as batch

Following is a sample of a powershell script that I can get to run fine from the powershell command line but not from within a software package that has the capacity to launch powershell scripts. Note...

View Article


Can I use powershell to do this?

I am looking for a way to automate the following scenario. I have a server running Visual Basic and a couple of clients running Visual Studio (C++) that talk to the server. I want to use powershell to...

View Article

Appending to a .csv

Hi,I am starting a Windows 7 migration and will be moving computers to a migration OU prior to the Windows 7 installation. I have written the following script but my export to .csv is only putting the...

View Article


Windows 7 and Office 2010 Activation

Hi,Is there a way to activate Windows 7 and Office 2010 without a KMS in place.  I have the licenses and would like to create a script to automate what is currently a manual process with the Office...

View Article

Excel & Powershell: Bulk Find and replace URL's used in forumlas

Hi, I'm working on creating a script that I will provide a list of SharePoint 2007 document libraries to which will do the following:In Excel, find formulas within cells that link to other workbooks +...

View Article

Network Connection Issue when create the Hyper-V VM using PowerShell

Hi guys,I am facing a really weird issue IN my notebook : My OS is W2012 with Hyper V 3.0 (of course).I have 2 Virtual Switches in Hyper-V, One for Internet (external) and one for LAN (private)When I...

View Article
Browsing all 21975 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>