Quantcast
Channel: Windows PowerShell Forum
Browsing all 2562 articles
Browse latest View live

How to get parent container path of the AD user object?

Hi All, I would like to export all users parent ou -- can someone help me on this. I tried with below ps command but got full dn. get-aduser -filter *| select samaccountname, distinguishedname is there...

View Article


How to get currently-selected cell values in excel with PowerShell

It's easy to open up a given excel spreadsheet: $xl = New-Object -ComObject "Excel.Application" $wb = $xl.Workbooks.open("C:\Users\xxxxxxx\Desktop\excel.xlsx") Make the spreadsheet visible to the user:...

View Article


Powershell command to show IIS Application Pool?

Hello Community     Using Powershell 2.0 you can use Get-SPServiceApplicationPool to display the SharePoint Service Application Pools.     Is there a PowerShell command to show IIS Application Pools?...

View Article

how to use powershell to search the whole forest for active computers

currently i have a command to find computers account for the domain current query only retrieve records from the same domain how can i expand it to the whole forest as it contains multiple domain?...

View Article

This might work, but please let me know what would be the real way to do this?

# For any given "Morning Action Time" this script might test whether the current time is # within a set number of minutes--$MinutesTimeInterval--before or after the current time # Use: in a larger...

View Article


Enable Audit for C:\Windows

Please let me know how to enable Auditing for C:\Windows via Powershell or thru GPO? Running Windows 2008 SP2 32 bit. Here's the Code I have compiled but errors out for Windows folder only (Below...

View Article

Checking subnet mask setting on all computers in an IP range

I've googled this for a full day and can't seem to find anything useful so I'm flat out asking here.  We recently changed our network to a 21 which requires a different subnet mask to allow existing...

View Article

Add to Distribution Group Email Addresses from file

I have found quite a few posts and topics about adding recipients via a .csv, but I haven't found anything definitive on setting email addresses for a distribution group via a .csv or other file...

View Article


this is a wierd one - different data type being returned depending on whether...

Hello, PS 2 on Windows 7. I use the following line to grab data from the clipboard within scripts, without issue: $RawText = & {powershell –sta {add-type –a system.windows.forms;...

View Article


Calling an Oracle stored procedure with refcursor

below is my powershell code.  I am keep getting a error PLS-00306: wrong number or types of arguments in call to 'Get_info' the store procedure should return some information. it does expect any input...

View Article

powershell: sync code from TFS, build, publish to IIS

hello, I just would like to implement this use a script that could: sync code from TFS, build, publish/inplace upgrade to IIS. I would like it as a script so I could use windows scheduler to trigger it...

View Article

Image may be NSFW.
Clik here to view.

Extra space in write-host output

I have function in a module which returns a paths - function PoshPath([string] $tag) { switch ($tag) { "sql" { return $psscriptroot+"\scripts\sql" } "private" { return $psscriptroot+"\scripts\private"...

View Article

Use powershell to get users from remote forest

I have an environment with 2 forests which have a forest trust. I am building a script to get some Forest A information from Forest B server and create a new user on Forest B with this information....

View Article


How do I disable by default ActiveSync, POP3, IMAP, etc. for a set of new...

This is my script so far. It is working fine - I just want to be able to disable those protocols by default when creating the mailbox. $mailbox=import-csv C:\Downloads\NEWBIE.CSV ForEach ($mailbox in...

View Article

Image may be NSFW.
Clik here to view.

Powershell automate web ui

Good Day All I need some help automating a web action on very complicated webpage I've profiled the action on google chorme that I need to preform: send o.ActiveXObject?function(){for(var a in...

View Article


Find all Scheduled Tasks and Disable them using Powershell+CMD

Hey guys, I am new to PS and I am giving myself a headache trying to figure out how to do this. I want to: - Query list of sched tasks (SCHTASKS /QUERY /FO CSV) or similar - Use a pattern to put all of...

View Article

Import-module fail

I am using Windows 7, dont know why cannot import-module, Previously, I can import-module, like grouppolicy and etc. but now i will get the error PS C:\Users\xxx>Get-Module -ListAvailable Get-Module...

View Article


Help with Update-Help!

I have just upgraded to the latest version of Powershell 3, but my Update-Help won't work.  I am running this in an elevated Admin prompt.  This is the error message I get: PS C:\scripts>...

View Article

Speed up reading XML file

Hi all, i have 2 xml files, 1 generated from another powershell script and it is a SQL result (around 10k lines) and a static xml file (messages.xml around 2100 lines) i need generate a report, to do...

View Article

How to exclude Group members of a group in powershell?

Hi All, I would like to export all users from my domain except the members of particular group. Below is the script I used, but I did not get any result. Please Help Get-AdUser -filter * |?...

View Article
Browsing all 2562 articles
Browse latest View live


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