Quantcast
Browsing all 21975 articles
Browse latest View live

Export-Csv - How can you include quotes even for fields that are empty?

Hi All,I have the handy script below to export Users and their information.  Do you know if there is a way to include quotes for those that have no information in those fields?  Scratching my head on...

View Article


Calling an expression from within a command

I have a query that i need to to return from a remote domain in the same forest. Because I am trying to query from on domain to another domain I need to query the object using the DN. The two commands...

View Article


Share current folders on a drive

Looking for some help new to powershell.I am trying to use powershell to turn a current list of folders on a drive into hidden shares with the folder names, and give everyone full permissions to the...

View Article

How can I compute the number of fields in a CSV file that does not contain a...

How can I compute the number of fields in a CSV file that does not contain a header ?

View Article

Powershell parsing script

How hard would it be to use powershell and "parse" through a log file with the below raw data to return only the text User=data and awseg.I have some code that I wrote that goes through a log file and...

View Article


Need some scripting help

I need to look through all accounts in a specific OU, and look at a list of specific attributes (non-normal attributes), spit out a report of these settings (csv is fine, and preferred).  I then need...

View Article

Powershell run a command\filename based on dnshostname

I am trying to run test-connection and ping computers in AD  I am able to do this but I would like to run wolcmd if I can't ping the computer.  I would create a script with the wolcmd  mac ip etc based...

View Article

Apply impersonation to mailbox

I'm using migrationwiz to migrate some users and i need to grant admin privileges using this scriptGet-Mailbox -ResultSize Unlimited | Add-MailboxPermission -AccessRights FullAccess -Automapping $false...

View Article


Record multiple failed connection attempts in foreach

The script below serves the purpose of searching many machines in our environment to check to see whether or not the SQL Server service is running. What it does is search through AD to get the list of...

View Article


Combining scripts/functions to get CPU usage, memory usage and free disk space

Could you help me combine these three scripts to a format that's like this   ComputerName     CPUUsageAverage    MemoryUsage    C PercentFree xxx       12  50%          30% The way I execute this...

View Article

How do I omit 5 or so DCs in a Get-ADDomainController search?

Hello,We have about 110 Domain Controllers and sometimes I want the whole list with the exception of 5 or so such as the RODCs or DCs in a site, etc.  What is the best way to 'omit' the 5 or so...

View Article

Switching from PoSH 2.0 to PoSH 3.0 in the current session

Is there any way to switch between versions in the current session without starting a new one?-DEMPC

View Article

Need help converting batch to Powershell

Batch will create a record based on the number of the hostname. Example: If servername is "Hostname20" the record will be added with IP 20.20.20.20.if %lsv% EQU 08 set lsv=8 if %lsv% EQU 09 set lsv=9...

View Article


beginner question - how to "combine" two lines of powershell scripts?

Hi,Im trying to get a list of all the issued certificates for smartcard log on so for that I use:Get-QADUser John | Get-QADCertificate -Template '*Smartcard*Logon*' | Select-Object...

View Article

Issue with array and named properties

I am trying to get the value of the ApprovalNumber for the selected item in the drop down to be passed to the second function. If I use the .ValueMember property all I get back is "= ApprovalNumber". I...

View Article


scriptblock size/line limit in start-job?

Is there a size limit here? I have over 150+ lines in the block and it errors out after a certain line no matter how I rearrange the script.Any ideas? A get-job | receive-job -keep produces the...

View Article

Need to turn off the Windows 7 Automatic Driver Installation and Automatic...

Hi - I just started learning Powershell a couple months ago.  Posted once on this forum when I was just getting started and people were very helpful with directing me to links for the basics.I am...

View Article


Selecting Items From a List Box No Longer Works in Powershell Version 3.0

I've noticed that the script in this powershell tip of the week no longer seems to fully work in Powershell V3. The selection dialog will pop up as expected, with all of the elments populated, but the...

View Article

Copying files using the ForEach-Object commandlet

I want to create a script that copies files from a source directory on my local machine to a network drive that creates a folder path with the date in the name. I want to use a foreach loop to copy...

View Article

Output directory listing with yyyymmdd...

HiIs it possible to output a directory listing specifying the required 'columns' and format?i.e. I want to create a file containing the date in format yyyymmdd and relative path name e.g.20120131...

View Article
Browsing all 21975 articles
Browse latest View live


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