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

PowerShell 3 update-help (proxy issues?)

I am running the PowerShell 3.0, as an admin, but update-help is not working. I suspect it does not know that we have an outbound proxy that requires: port, host, username, password. However WinHTTP...

View Article


Unexpected Token Error in Powershell

I am getting the error below, and below that is my script. I'm not a pro at powershell and most of this script came from someone else. In ISE, and I don't know that this matters but thought I'd bring...

View Article


Logon Script Map network drive based on username

I want to map a specific network drive based on the username used to log in for example; this is what I have so far:$net = $(New-Object -ComObject WScript.Network) $net.MapNetworkDrive("y:",...

View Article

Variables -SearchBase

Im a little lost here.  Hopefully you can see with my code what I am trying to achieve:$Dept=@("Sales","Finance") $OU=@("ou=Sales,ou=Finance,ou=WS,dc=ads,dc=contoso,dc=net") #change -lt value to add...

View Article

Get-ChildItem - Include from array not returning files

Config value: <FileTypesToDelete>*.txt,*.log,*.mf</FileTypesToDelete>setting variable in script[string[]]$FileTypesToDelete = @($configfile.Settings.FileTypesToDelete) #$FileTypesToDelete...

View Article


Run code extracted from text

Is it possible to extract and run PowerShell code out of a text file without creating a new file?I have some files (not .ps1 files) containing lines of PowerShell intermixed with lines of other text....

View Article

Windows Update PowerShell Script

Hi All  I have this Windows update Powershell script below which works pretty much fine. I would like to add a csv file that will contain multiple Serves and do the updates on them. The issue is...

View Article

Install Office Add-on pre-determine 64x or 32x

Good afternoon all,I am looking to roll out a Microsoft Outlook add-on through group policy, there are two versions of the client, x64 & x32.Unfortunately my estate houses a number of 32 bit &...

View Article


Convert a "System.String" to a "System.Security.SecureString" in the PS code

I want to add a "System.Security.SecureString" to my Powershell ADDS command.-SafeModeAdministratorPassword<SecureString>This is what I have now:Import-Module ADDSDeployment Install-ADDSForest '...

View Article


PowerShell script error when running it in a MDT task sequence

When I run the following script on a computer it works perfectly but when I run the script as part of a MDT task sequence I get an error.The code is for automatically adding the computer being imaged...

View Article

Groups and permissions

I'm preparing a script where some local groups need to be created then domain groups added to them. Also it'll create some folder structure and assing my local groups with the right permissions. I...

View Article

Image may be NSFW.
Clik here to view.

Be our next Spring PowerShell Guru!

In the northern hemisphere at least, Spring is here! (apparently)And at TechNet Wiki, we're hoping you're all hatching new ideas for this month's TechNet Guru competition!We're looking for more shoots...

View Article

Find hostnames of slaved drives

I have about 200+ archived HDD's that I need to find the hostnames for, and I was wondering if someone can tell me it there is a good way to do this through Powershell, or if there is a different way...

View Article


How to add hash table values to SQL Table using Powershell

Hi, I have sharepoint list with four(column1, column2, column3,column4)columns.I am reading the list column values and adding to hashtable. Now I want to add values from hastable to SQL table with...

View Article

Signed Powershell Script

Hello,I have trouble with self signed Powershell scripts.I've created a CodeSign Certificate from the internal CA in my Domain.After that I've used this Certificate to sign PS scripts.When I call these...

View Article


Adding invalid hexadecimal values to XML

Hi guys,I have some code that needs to create an XML Text Node with a string value.$vArray = "*/New _test/","*/test/ssh?Name=.&amp;" for($i = 0; $i -lt $vArray.length; $i++) {...

View Article

Active Directory User information

Hi there,I'm new to PowerShell and would like to get assistance on the following requirements: Get the list of all Active Directory groups, their associated members along with information such as...

View Article


Code Singed Certificates not working

Hello Everyone, I have a code signed certificate for all my PowerShell scripts when I try and run any of my PowerShell scripts I get Do you want to run software from this untrusted publisher?File...

View Article

formating results from Get-qadgroup and get-qadgroupmember

Hello , I am stuck trying to build a script that searches our AD and extracts some specific information about groups. I have the search part working and both get-qadgroup and get-qadgroupmembers gives...

View Article

Powershell GUI Popup Box - Line Break

Building a GUI (IT Helpdesk Tool) to do daily tasks. One part is to grab computer information.I have the drop down displaying a list of all the computers.  On the "Get Computer Info" Button - it does a...

View Article
Browsing all 21975 articles
Browse latest View live


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