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

Help with AD query

Hi I need help with a script I want to query a specific server  "blah.com" for a list of shares which begin with the name xx and from the shares get the AD groups that has access to those shares and...

View Article


String Targeting for Get-Childitem

Hello Everyone,There is a application that exports recorded calls and it exports it as a file name with the users extension. We have two departments that use the application and it exports to the same...

View Article


Kubernetes Worker node for Windows

Hi,Iam new to scripting please help me We have an script for joining windows worker node for kubernetes cluster Script :===============Param(    [parameter(Mandatory = $true)] [string] $masterIp )...

View Article

Turning a ps1 function into a module with separate ps1 files calls

The purpose of this post is to "Understand" what is required to perform the action. Here is the scenario- FunctionA.ps1- FunctionB.ps1- FinalFunction.ps1 (that calls the two first functions...

View Article

output to txt or csv

 Hi,I am calling a list of servers and checking the log status for each but when I try to output I get nothingI have tried >, and out-file and export-csv ...thanks$servers = get-content "c:\file...

View Article


Acrobat and Powershell -- the basics of opening and working with PDFs with...

 I've been refreshing/expanding my understanding of how to use the Acrobat Interapplication Communication OLE Automation in Powershell to work with PDFs. I'd appreciate any feedback on the following...

View Article

Merge HTML files

Hello Everyone, I have a powershell script  that generates me an HTML file. The last line of the script is the following: ConvertTo-HTML -head $head -PostContent  $VAR1,$VAR2,$VAR3,$VAR4,$VAR5...

View Article

Creating Log File by Exporting Console Message to a TXT File

Hi Folks,I need help in creating a log.txt file that would store a particular ps1's console output messages. Can you please help how I can go by doing so ?Get-ADUser -Identity ABC | Out-Null Write-Host...

View Article


SQL Query- No characters are allowed after a here-string header but before...

I was testing out this powershell script and i cannot understand why is there a @ before the SQL query ?At line:4 char:15+ $SqlQuery = @'Select top 10 * from database.dbo.table'@;+               ~ No...

View Article


Change emailaddresses in AD with the help of the Samaccountname

I need to be sure that the field email has been filled in.The emailaddress syntax is samaccountname@domain.comI have pieced together the following script. When instead of set-aduser i test it with...

View Article

Show a list from a choice on WIndows.Form

HiI'm trying to work around a script Under Windows.Form and I'm a little bit stuck.I'd like to be able a specific list appears depending on the choice made from the first list, which means that at the...

View Article

Windows Activation Status for one or more servers

Hello,I am working with the below script and need to add a server name to the script so that one server at a time is requested, the command lines areImport-Module...

View Article

Using a script to export hostname, description and current OS

Could anybody help me write a script to export the hostname, description, current OS and if possible last logged in user (via SCCM) into a csv file.Thanks

View Article


Script to loop through all mail profiles?

Hi all,I have found a powershell script that loops through outlook registry key and searches for outlook profiles.  I'm trying to find out if any users in the organization may have added any external...

View Article

TCP error code 10061: No connection could be made because the target machine...

I executed following command in powershell in windows server 2016 instance in order to configure AD FS to authenticate users stored in an LDAP directory.$vendorDirectory = New-AdfsLdapServerConnection...

View Article


Querying web service from Powershell

Hi,I've managed to query many web services from PowerShell but this one is throwing me.I can access it through SOAPUI but its gives us two interfaces with the prefix of basicHttpBinding_XXXXXXWhen I...

View Article

How to incorporate Powershell with Excel?

Hi all,i am new to powershell, I have a report in excel that was analyze manually all this while, i would like to try automate this report by using a powershell as i can see that the report is...

View Article


delegate 'Create all child objects' permission in OU

I am using below script to delegate 'Create all child objects'  permission in OU. It is working fine but Inheritance Type is getting set to  'This Object only'. How Can I set the Inheritance Type to...

View Article

How to update Contact object Attribute

Hey, I'm trying to figure out how to update Contact object attribute like Description, Address from CSV file.This my CSV file it has Description & Mail column. I want PS to Identify it from CSV...

View Article

Question about powershell and regex with variables.

We are indexing emails and we receive the following subject:Bericht over zaaknr., 1409, 21-11-2018 11:33 test emailWith the folowing scripts we try to retrieve the nr 1409 from the...

View Article
Browsing all 21975 articles
Browse latest View live


Latest Images