Quantcast
Channel: Windows PowerShell forum

Attaching file to email when email contains recipient

Hi PS Experts,I realize that Send-MailMessage is the updated way to send email via Powershell but some of us don't have credentials to access a SMTP server.  So I will be using the comObject from...

View Article


Powershell - Read data from individual excel cell and place this data into a...

I'm trying to read data from an individual excel cell, based on the input of a serial number the user enters previously. Below is my code:#create excel object $excel = New-Object -ComObject...

View Article


issue in using foreach loop and break , unable to count the *.temp file...

i want to loop through subfolders and fetch the file name with a .temp extension and when i use foreach loop, it didnt work.how to use foreach to iterate through subfolders and find the existence of a...

View Article

Powershell Command Query

Need a command that will run an extract from a list of user accounts in AD, and tell us what OU they are in.Is this possible

View Article

Powershell Outook advancedsearch. Name of folder for found message.

So i have a very basic search that works really well. However I really need to know where the email is within the mailbox structure (eg \inbox\ebs\sandra)  $Term  = 'T drive eg the pheno-geno' $Scope =...

View Article


Remove OneDrive Powershell

Building a PowerShell script to remove OneDriveSetup from the registry. Each time I attempt to unload the UserHive, I get an "Error: Access is denied."How am I unable to unload this hive?##### Remove...

View Article

find and remove similar file

hi,Like a title i want to find a files similar like this exemple :ART-20200616102346-1070821.xmlbut just the end of the file like that : 1070821.xmlI start to write a script in power shell like that :...

View Article

Powershell - Scripting Help with Get-Childitem

Hi,I have a script that runs every morning at 4am that look to see if two files are located there and then proceeds to restore a SQL Database if these files exists. However once every 2 weeks, We get...

View Article


Powershell Combobox populate from xml and ComboBox 2 based on ComboBox 1...

This is the script I am using for my drop down box. the script created to rename computers based in location and department  so it ask users to choose their location (building and the floor) and the...

View Article


[Announcement] “Windows PowerShell” Forum will be migrating to a new home on...

This “Windows PowerShell” Forum will be migrating to a new home on Microsoft Q&A! We’ve listened to your feedback on how we can enhance the forum experience. Microsoft Q&A allows us to add new...

View Article

Using PS Script to Retrive Local Printer User Permissions on Windows 7

The PS Command Get-Printer is not recognized in Windows 7.I have used theget-wmiobject-classwin32_printer-Namespace"root\cimv2"|where {$_.Default-eq'True' } command to identified the Share Printer.I...

View Article

Copy snapshot of a managed disk to same subscription

Please help.I keep getting below this error.Line |  32 |  New-AzSnapshot -Snapshot $snapshotConfig -SnapshotName $snapshotName  …     |...

View Article

Get-ChildItem files with exclamation points

I have a folder that has a lot of files with an exclamation point in them and I am trying to move them to another folder. However, powershell sees the path fullname but for some reason will not move...

View Article


PowerShell New-VHD will not take VolumeID as Path argument

New-VHD -SizeBytes 16GB -Fixed -Path '\\?\Volume{a3d75r32-1fbf-46fa-ac84-795c1dm9afe2}\TMP.vhdx'It's interpreted as a relative path. New-VHD : Failed to create the virtual hard disk.The system failed...

View Article

Advanced Tab of Internet Options change registry key with PowerShell

Hi everyone,I want to uncheck “Check for Server Certificate Revocation ” and checked all tsl/ssl in the Advanced Tab of Internet Options with a PowerShell command.I searched Google but did’t find...

View Article


Mouse Click

I'm looking for mouse click function in powershell script  since last night and i can't find no one that work.I have been tried the script from link but don't work. Does anybody some powershell script...

View Article

Error '0x80073701' while trying to install Containers Windows feature

Dear Community,I'm facing an issue trying to install Windows Docker, more specifically its containers feature, to a Windows 2016 server.I tried installing Docker using the following set of commands on...

View Article


Remove ACL Entry from an OU

HiIs there a way I can remove a user (in this case "NT Authority\Authenticated Users") from an OU using Powershell. Inheritance is blocked.Ive attempted to the below but it doesnt seem to work: Any...

View Article

Invalid class problem

I am having a problem with this.PS C:\Users\administrator> new-vhd fu.vhdx -SizeBytes 10gb -Dynamic new-vhd : The operation on computer 'WIN10' failed: Invalid class At line:1 char:1+ new-vhd...

View Article

powershell. "Does a folder exist" command? (outlook not exchange)

I'm copying files from various folders in the mailbox to another folder in the same mailbox. (I am an end user, not an exchange admin).however I need to check if the folder structure I am copying the...

View Article


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