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

Query account privilegesprivileges for context running script

I am trying to enumerate the privileges for the account running a script to make sure it has Logon as Batch rights. Anyone know how to do this? Thanks! jlc

View Article


How can I recode a regular expression used to parse a string?

I want to code some parsing using regular expressions where I can later go in and change the suite of characters that I want to associate (or not associate) with a word-like entity.  In other words, I...

View Article


How to override powershell memory limit in remote session

Hi,I am trying to run a memory allocation tool (testlimit64 from sysinternals suite) on multiple windows VMs remotely. The VMs run windows server 2012, patched up to date.The machine i'm running the...

View Article

Inbox mail count

 I need to identify the number of mails in each inbox folder of every mailbox on exchange 2007.This command outputs the number of items. However, this is different to the actual number of mails in each...

View Article

How to Recursively Copy a Folder Except for Certain Child Folders?

I tried the following in PS1: Copy-Item C:\Clean -Destination C:\NewClean -Recurse -Container -Exclude CVSUnfortunately it also copied all of the CVS directories. Is there a way to exclude certain...

View Article


get the SQL database users Powershell

Hi!I'm trying to figure out how to get the users of a SQL database using powershell.I have allready figured out how to backup and restore sql databases with powershell but now i want to find what users...

View Article

check exists

function get-checkdrive($server) { write-verbose "check drive -started" $check= 'D:\' # no escape $testobj=get-wmiobject win32_volume -filter "DriveLetter= 'D:'" -computername $server $caption=...

View Article

Resetting smartcard PIN via Powershell

We use smartcards (gemalto) to store certs for VPN authentication. We have requirement to provision multiple smart cards every month as we hire new staff. With some help from internet and my PowerShell...

View Article


Some Storage CMDLets do not work under WinPE

I have built a custom WinPE based on W2012 and included Powershell and a number of the Powershell CMDLets such as SMB, DISM, and Storage. Everything works fine. When you boot the WinPE disk and do a...

View Article


Get-Childitem bug in Powershell v. 3.0 ?

Let's assume that you don't have folder c:\temp if you try to give this command: gci c:\temp output is: gci : Cannot find path 'C:temp' jadajada however if you give following command: gci -r c:\temp...

View Article

Image may be NSFW.
Clik here to view.

How to propagate CmdletBinding parameters through Invoke-Command?

I have a set of scripts with the CmdletBinding attribute applied that run scripts on other servers.For example, I have a Stop-MyServices that stops my services on all my servers:function...

View Article

Execute PowerShell script on Many Machines

I have a power shell script that I can execute on a list of machines. The script will run the list of machines in parallel.  The script appears to run fine.  But, let's say I have 500 machines to run...

View Article

bcdedit

Hallo everyone,I got a really annoying issue about the bcdedit /store command for changing the tftp window- and blocksize.As soon as I'm going to use the command bcdedit /store...

View Article


Import Users via PowerShell to AD using CSV

Hi Guys,I am trying to import users from a CSV into active directory. I have the following script but it doesn't do anything.Import-CSV "C:\PowerShell\User\import\Intake2013.csv" | ForEach-Object...

View Article

Report on issued certificates

Hi,Is there a PowerShell script that I can use to generate a daily report of the issued certificates? format:  .csvI want to run a schedule task that would copy the file to another location.Windows...

View Article


Azure Powershell module not connecting to any service

I created a free trial subscription in Windows Azure, and installed Azure Powershell module in a Windows server 2008 machine.I download and import my publish settings file executing the following...

View Article

Restrict PowerShell cmdlets

I need to restrict powershell cmdlets by active directory group membership.  I saw the article(s) on using RBAC.  Can you use RBAC without exchange and use AD groups instead?

View Article


Getting Outlook folder permissions for all Exchange users

I have a script that will pull permissions for all Exchange mailboxes for the calendar folder. This works quite well for just the calendar folders. However, I need to search all folders (not just...

View Article

Script to identify the ownership of file and last person who edit the file ?

Hi,Can anyone please assist me with the Powershell script to parse .CSV file containing absolute path of the file location ?So that it generates second column which list the owner of the file and also...

View Article

Sql Server connectivity and script execution using Powershell

Iam designing a powershell script that can execute some sql scripts that is placed inside a folder. Actually this must be done remotely. I am able to connect to the particular server remotely using...

View Article
Browsing all 21975 articles
Browse latest View live


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