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

Send prompt window to remote desktop users.

Hello,I have kind of a special question, and it is, if there is a way how to send a prompt window like this:[void][System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms');$DialogResult...

View Article


Use Powershell Command to Search A Folder Then Move Any Subfolders and Where...

Hi All,As a complete novice to the powershell world I am looking for some direction in a script to manage my work project data lifecycle.I have a share on our production server (\\PROD1\Projects) which...

View Article


Return list of values from invoke-command

Hi,I'm building a script to create IIS related stuff in my 4 web servers (they have no communication between them, so when I have to create a website, I have to create it 4 times!).I've started to...

View Article

Help? OnComplete API: You must provide a value expression on the right-hand...

My Cmdlet Scripting Agent runs and this is what happens. Am I using the -Domaincontroller command correctly?My script:<?xml version="1.0" encoding="utf-8"?><Configuration...

View Article

Remove permissions for a security group for all files and folders in a folder...

I found a script that adds rights to files and folders.We need to grant administrators rights to a set of folders for a specific project.ChangePermissions.ps1 # CACLS rights are usually # F =...

View Article


PowerShell Set-Acl recursively

Hi,I have the below script, works fine but when setting the ACL it only set's the ACL on the root folder and doesn't propagate down. How can I get it to set the ACL to all files and folders?1) imports...

View Article

declare webservice variable types

Hi,How can I load the object types from a web service in Powershell?$url = http://wserver/v1.asmx?WSDL$ws = New-WebServiceProxy -uri $url -Namespace myWS$wsObj = New-Object -TypeName...

View Article

Close Excel com object without saving changes?

Hi, I am trying to write a script which opens each of 31 excel workbooks, retrieves a value from a cell, and closes each workbook after retrieving.My code so far:$day=1 $excel = New-Object -ComObject...

View Article


Exchange Powershell return value from Get-command to variable.

HiI am trying to create a powershell-script for our monitoring-software.The script is supposed to establish a connection to our exchange-server mgmt-shell and execute this...

View Article


Save output of a command

Hi all,I am trying to save the output of a command so I can read it and decide weather it completed successfully or not.  I am having trouble running the command though. It's working but the switches...

View Article

PowerShell Script Get the User's Active Directory Fully Qualified Login Name...

I have a script which displays locked out accounts. It works great. I'd like to display the fully qualified Active Directory Login Name instead of the LastName, First Name:Example: Davis, SusanWant...

View Article

get-aduser. filter to find intern but not international, internet, etc

I'm writing a script to identify all interns in the copmany.  They all have the word intern in the description field of their AD account.  However it could say intern, engineering intern, intern for...

View Article

Runspace threading long running process;

We started using(ForEach-Parallel)http://gallery.technet.microsoft.com/scriptcenter/Foreach-Parallel-Parallel-a8f3d22b#contentfunction for running sql server queries against multiple machines. We have...

View Article


Path not found only when executed in batch

Hi,I want to check for file existence on another PC in the same network/domain.The directories of that PC are mapped on the server running the script.When executing the script online all works...

View Article

How to delete contents of a csv file except header using powershell

Hi,I am trying to delete all the content of my csv file except its header. currently I am using clear-content but using this headers are also getting deleted. Basically I need a command which deletes...

View Article


Get list of computers from OU that arent a member of a group?

Hi,I cant seem to figure this out, I am trying to retrieve a list of computers in a specific OU that dont belong to the SCCM_Internet Explorer 9 group. The code below is returning computers that are...

View Article

For each computer found, add it to a security group?

Hi,I am using the code below to get each computer that doesnt belong to the SCCM_Internet Explorer 9 group. Can I just add the following to the code below so that they each get...

View Article


Take ownership of a registry key, and change permissions

Hello,I am writing a powershell script to configure a W2008-R2 Server. In one of the steps, I need to take ownership of an existing registry key, and then give full control permissions to the...

View Article

how to run the ConvertToDateTime

Hi,how can i write this syntax correctly?Get-WmiObject win32_process -Filter "name = 'procname'" | select-object name,commandline,ConvertToDateTime(creationdate)i need that the ConvertToDateTime will...

View Article

PowerShell Syntax Problem.....

Trying to develop a PowerShell GUI to run some Exchange 2010 Cmdlets, IM having trouble getting the textbox / variable value to work correctly within the syntax.... This command works....Works...

View Article
Browsing all 21975 articles
Browse latest View live


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