Quantcast
Channel: PowerShell General
Browsing all 10624 articles
Browse latest View live

sort-object does not produce numerically named folders is correct order

I have a bunch of folders that are named numerically. For example: 99910121000 When I run the following command is displays the folder as follows: PS C:\temp\test\sort> Get-ChildItem |...

View Article


How would I Scroll through multiple pages in a web site?

So I have this web site that I'm pulling data from.  I am able to open the web site and use the following below to display the web page in powershell: $web = New-Object system.Net.WebClient...

View Article


Install and Uninstall solution using Powershell

Proper way to install and uninstall solution in sharepoint(Farm /webapplication/ site scope).

View Article

open an application with administrator right

Currently, we set UAC enabled on PC, and need to launch an application with administrator rights. Are there ways to open an application with the 'Run as administrator' using powershell script.   any...

View Article

Looking for Excel Macros

Is there a way to leverage powershell to search directories for all excel spreadsheets with macros? Thanks

View Article


Powershell script to test RDP is available

I am looking to write a script to test a server to see if the RDP port is available. Is there a way to do so?

View Article

Image may be NSFW.
Clik here to view.

Export-CSV arrays/collections

  Why doesn’t Export-CSV have a “-Depth” parameter like the Export-XML command or “-ExpandProperty” parameter like the Select-Object command?      I understand that CSV represent a fixed table, and XML...

View Article

Powershell N00b

Hello Friends, I am completely new to power shell and I would love to learn it. I just do not know where to start. Any suggestions would be greatly appreciated!

View Article


Query Users with Specific Description, export to CSV, and Include Manager?

I have a script to query AD users with a specific word in their description and export to a CSV file. I am trying to add a manager field to the exported file; however, the manager field contains the...

View Article


Get-member not listing all properties

Hello All, I'm a little rusty on powershell and theres something bugging me so its no doubt a simple answer. If I run the following command, it doesn't show me all the properties i could select:...

View Article

Basic Else not working

This is a very basic script but I cannot get the Else to launch notepad. I have tried: & “C:\windows\notepad.exe"Invoke-Item “C:\Windows\notepad.exe"But it refuses to work when the condition is...

View Article

Parsing from one .csv into another

I'm trying to parse a live log file and pull only the current months info out of it, and create a new file from that parsed data. I can get the output I want to the screen with this. $strGetDate =...

View Article

Set-Acl Access denied

Hy all I created a powershellscript, which delete folder permissions and set new ones on the userprofile folder, which is stored on a fileserver. The permissions of the user are not inherited, they are...

View Article


Script to map properties in userprofile

I have one custom string type properties and one inbuilt pictureurl type properties in user profile service application. I want to map both properties using powershell script. Need help.

View Article

Use multiple columns from a CSV in the one command.

Hello all, I would like ot know if i can take 2 columns from 1 CSV file to create a parameter response in a powershell command. For example, I have a CSV file containing Ad user data which is ot be...

View Article


Create multiple new AD users form a CSV and then add them to a list of groups...

Hi guys, I'm a little stumped. I'm trying to write a script which creates a list of users form a CSV file and then also adds them to a list of groups which is also store din the CSV file. so far I have...

View Article

Passing a value from a function into the rest of the script

Hi, I am writing a form based script to automate our new user process. Within our organization we have several domains and so I decided to make the first part of the script a drop-down menu for the...

View Article


Strings the Thing

I want to run this command to set all possible owners for all resources on an MS cluster.  You don't have to know clustering to be able to help me. Here is the command, Get-ClusterResource |...

View Article

How to show the conntent of xml files using loop

Hello, I have some xml files in the folder. I need to read them and output one line with <MESSAGE> data for each xml file and format the a little bit the result. This is the example of the xml...

View Article

An alternative to Posh v3 | out-grid -passthru in Posh v2

Hello AllI need to read in a csv file and display to result to the user, I was therefore thinking about using Out-Gridview.Now the user needs to review the information display and then click OK to act...

View Article
Browsing all 10624 articles
Browse latest View live


Latest Images