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

Image may be NSFW.
Clik here to view.

Parsing Get-WinEvent...

i'm trying to get the logon,logoff,connect, disconnect info from the above log.  Here is what i have so far: Get-WinEvent -logname "Microsoft-Windows-TerminalServices-LocalSessionManager/Operational" |...

View Article


How to get an ACE entry into Spreadsheet using get-ace

Hi folks. I'm working on a script to pull a server inventory including shares, share permissions, and other entries.I'm able to retrieve the share and ace entries, but when I try to write them to an...

View Article


Use a specfic string that is one of many strings output from a command as...

Hi, Sorry about a bad title. Didnt know how to title this question.The case is that I want to run this command in a script for users in different domains: Test-CsAddressBookWebQuery -TargetFqdn...

View Article

Copy-item including folder structure and not overwrite

Hi,I have a script that does a GCI on 4 folders, it then filters out specific file that do not need copying, it then creates the top level folder in the destination folder then copies the file and the...

View Article

Sort by folder size

Hello every one! I have this script:$log = ".\logfile.log" $startFolder = "C:\VMs" $colItems = Get-ChildItem $startFolder | Where-Object {$_.PSIsContainer -eq $True} | Sort-Object foreach ($i in...

View Article


What is the "file signature" of a 16-bit executable ?

What is the "file signature" of a 16-bit executable ?In other words, what do I need to know about the internals of a 16-bit executable (either a 16 bit xxx.exe or xxx.com file) to write a Powershell...

View Article

Using get -childitem to scan different drives but append one text file.

Folks,I need some help, I wrote the below to scan for certain files types on client machines but I cant get the script to scan anything other than the C$. Apologies I am kind of new to scripting and...

View Article

Image may be NSFW.
Clik here to view.

PowerShell to add a Certificate to "Trusted Root Certification Authorities"

Hi,I am trying to add a Certificate to the "Trusted Root Certification Authorities" using PowerShell, but haven't been able to accomplish it. I am using the following PowerShell snippet$pfx =...

View Article


Running PowerShell versions 4 & 3 side by side (sxs)??

Hi,I have noticed that PS version 4 seems to "replace" version 3. I.e. there is no way to access 3 once 4 is installed.  This differs to how version 2 & 3 operated, which allowed side by side...

View Article


Unable to enable HTTPS binding for Website using Powershell

Hi,I have been trying to enable HTTPS for a website in IIS, but I keep getting the following error:New-Item : Failed to create SSL binding. Error code 1312.At line:1 char:85+ Get-Item...

View Article

How to obtain verbose and debug log from powershell, without modifying code

Hello, I have the following issue: In a Xenapp citrix environment, i have published some applications that run a powershell scipt from the server. This powershell script run an executable. Normally,...

View Article

Convert to HTML - Help with formatting

Hello, I have a txt file which list Windows services, and when opened in notepad, word etc all the columns line up correctly.  I would like to add this txt file to an HTML report.  I'm aware...

View Article

Script to show access to all shared folders on a server

I was asked by management the other day to come up with a list of what departmental shares our Helpdesk has access to (not sure why, was just asked to come up with the list). This can be either via...

View Article


How to handle error from unsupported WMI query?

$deviceid = (gwmi win32_logicaldisk -filter "Name='$drvltr'").` GetRelated('Win32_DiskPartition').GetRelated('Win32_DiskDrive') | foreach { $_.PNPDeviceID } $predict = gwmi -Namespace root\wmi -class...

View Article

Importing multiple users for linked exchange accounts

This is for Exchange 2013 SP1 FYIOk, I am lost on this script...I am trying to do a linked mailbox from a different forest using a CSV file. I can re-export the CSV if I need to gather other...

View Article


DSC Package resource handling EXE (not MSI)

I am working through using the built-in Package resource provider for Desired State Configuration and I am having issues with using .EXE files with it (not MSI).I see no failures in Trace-xDscOperation...

View Article

AD objects have $ symbols as leading character

Hi,I hope this is the correct place to ask this questionI am fairly new to PowerShell and am trying to perform a Get-ADComputer lookup on a specific OU in my domain, however the OU's are named $Servers...

View Article


Offce 365: Assigning calendar permissions via security groups/bulk calendar...

I originally posted this in the 365 forums but was informed to post it here instead...I'm looking for a way to do bulk calendar sharing of individual calendars (not Public Folders) in Exchange Online....

View Article

Copy new and updated files

how can I do in powershell the followingI had SourceFoler  = d:\temp\SourceFolderTargetFoler = d:\temp\TargetFolderOtherFolder = d:\DiffernceFolderI want to copy new and updated files from source...

View Article

multiple AD domain recursing search from datatable

Hi all,Can someone help about this problem :I have a datatable in a datagridview, I want to search the username from the mail address.I'm able to find what I need if my datatable have only users in 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>