Is there any way to detect whether a machine is UEFI or BIOS with a powershell script (without using third party tools)?
I would like to use this in a Dism script to apply images and build disk partitions based on the type of machine.
Yeah Buddy!
Is there any way to detect whether a machine is UEFI or BIOS with a powershell script (without using third party tools)?
I would like to use this in a Dism script to apply images and build disk partitions based on the type of machine.
Yeah Buddy!
Ok I feel like this shouldn't be such a difficult thing to find, but all my research only turns up answers on how to check if you are currently using UEFI. I can determine whether it is being used. What I need to know is what system were incorrectly set to use Legacy BIOS but can be reconfigured to UEFI.
Is this possible?
Hi all,
I am looking for a script which can give me all the domain controllers, DNS servers, DHCP servers and WINS servers in a domain in a excel sheet with their location in the domain.
thanks in advance
Greetings,
Came across this the today which I cannot explain:
'xx,yy' -notmatch '^[~0-9a-zA-Z _\(\)-]+$' returns true whereas
'xx,yy' -notmatch '^[0-9a-zA-Z _\(\)-~]+$' returns false
All I did was move the tilde from the beginning to the end of the list of chars.
Cheers
David Z
Hi,
I am looking to find a way to find all Active & Disconnected sessions on all Windows servers in our Domain, we have about 800+ windows servers. And it's not practically possible to go to each server and run "qwinsta" command.
Below is the script i am using, but this is giving only the Active sessions, i am looking to show Disconnected sessions also. Any help on achieving is really appreciated.
# Import the Active Directory module for the Get-ADComputer CmdLethi, i tried to make exe file with instruction from link below
https://social.technet.microsoft.com/Forums/scriptcenter/en-US/c0e7575a-6983-453b-8959-c6d889ccc01f/stepbystep-to-wrap-a-vbs-into-an-exe?forum=ITCG
Unfortunately i am getting error "Command line option syntax error. Type Command /? for Help."
This vbs can add attachment automatically to new Outlook message when you drag and drop file on it
Option Explicit Dim objArgs, OutApp, oNameSpace, oInbox, oEmailItem, olMailItem Dim a, oAttachments, subjectStr, olFormatHTML olMailItem = 0 olFormatHTML = 2 Set objArgs = WScript.Arguments 'gets paths of selected files Set OutApp = CreateObject("Outlook.Application") 'opens Outlook Set oEmailItem = OutApp.CreateItem(olMailItem) 'opens new email oEmailItem.To = "" oEmailItem.cc = "" oEmailItem.bcc = "" For a = 0 to objArgs.Count - 1 Set oAttachments = oEmailItem.Attachments.Add(objArgs(a)) subjectStr = subjectStr & Right(objArgs(a),Len(objArgs(a))- (InStrRev(objArgs(a),"\"))) & ", " 'recreates the default Subject e.g. Emailing: file1.doc, file2.xls Next If subjectStr = "" then subjectStr = "No Subject " oEmailItem.Subject = "" oEmailItem.BodyFormat = olFormatHTML oEmailItem.Display
Hey everyone;
I am new here as obviously I am at my wits end with this old antiquated process that we have at one of our locations. Basically an applescript runs against a folder. This process breaks constantly as 1. It probably wasn't created very well from the start and 2. It is on an old apple mini server that I desperately want to get rid of and move the entire process over to a windows machine.
Is there anyone out there that has any experience or any suggestions with how I can get off of this unsupported applescript?
hi all,
looking to get a list or users OR devices that have a specific software. i see that there is a discovered apps section in Intune, but that can only be viewed once you have selected the device. was looking at different methods (even graph API), and no luck.
Has anyone have any suggestions or was able to achieve this (whether its a direct method or having to manipulate outputted csvs, etc.)
at a loss here, but need this asap..been trying all day
Note: all devices are AAD enrolled, (not joined to a domain)
I need to get the results of the first DROPDOWN box stored as a variable, and used in place of INSTANCE_NAME in the second DROPDOWN box.
Essentially, the SELECT query from the second box needs to be run against the MASTER database in the SLQ_INSTANCE that the first DROPDOWN box results in once a choice has been made.
I’ve tried a few variations and can’t seem to get it right. Any suggestions?
Thanks in advance!
#first DROPDOWN Box $label = New-Object System.Windows.Forms.Label $label.Location = New-Object System.Drawing.Point(10,20) $label.Size = New-Object System.Drawing.Size(280,20) $label.Text = 'SQL Server Name' $form.Controls.Add($label) $DropDownBox = New-Object System.Windows.Forms.ComboBox $DropDownBox.Location = New-Object System.Drawing.Size(10,40) $DropDownBox.Size = New-Object System.Drawing.Size(260,20) $DropDownBox.DropDownHeight = 200 $Form.Controls.Add($DropDownBox) $wksList= invoke-sqlcmd -query "select * from VIEW_NAME order by instance_name" -database DATABASE_NAME -serverinstance INSTANCE_NAME foreach ($wks in $wksList) { $DropDownBox.Items.Add($wks.Instance_Name) } #end foreach #end first DROPDOWN box #second DROPDOWN Box $label2 = New-Object System.Windows.Forms.Label $label2.Location = New-Object System.Drawing.Point(10,90) $label2.Size = New-Object System.Drawing.Size(280,20) $label2.Text = 'Database Name' $form.Controls.Add($label2) $DropDownBox2 = New-Object System.Windows.Forms.ComboBox $DropDownBox2.Location = New-Object System.Drawing.Size(10,110) $DropDownBox2.Size = New-Object System.Drawing.Size(260,20) $DropDownBox2.DropDownHeight = 200 $Form.Controls.Add($DropDownBox2) $wksList2= invoke-sqlcmd -query "select name from sys.databases where database_id>4 order by name" -database MASTER -serverinstance INSTANCE_NAME foreach ($wks in $wksList2) { $DropDownBox2.Items.Add($wks.name) } #end foreach #end second DROPDOWN box
Hi there,
I exported five Hyper-V VMs for importing them onto other servers. I was trying to import them with a script, but none of them successfully imported, cause they were in saved state - and the new servers are having other processor features. So I have to delete the saved state.
It's no problem to do so in the Hyper-V GUI, if you do an import, you are getting an incompatibility report with a command box to delete the saved state - then click OK and the VM is imported.
Unfortunately I couldn't find a way to do that in a powershell script. I found the cmdlet "remove-vmsavedstate", but that cmdlet want's a VM, that already exists in Hyper-V management.
I found the "compare-vm", which is showing me, that the VM I'm trying to import has incompatibilities.
But I found no way to resolve these incompatibilities ( delete saved state ) the scripted way with a VM that is only existing as export on disk.
Any ideas?
Yours Franz-Georg
fgc
MASTER WATER SOLUTION adalah SOLUSI untuk masalah air yang kotor, berbau, bercak putih, flek kuning, zat besi tinggi, mangan, kuning organic. "untuk masalah air apapun SEGERA HUBUNGI kami.."
filter air ?
Penjernih Air ?
Penyaring Air ?
filter air industri ?
Penyaring Air Industri ?
Penyaring Air Industri ?
Hi all,
I am trying to filter an array in power shell for elements which contain a specific pattern.
I used this command to do so,
$raw_data | where-object -Property ColumnName -EQ 'Pattern%'
and I am getting no results, can anyone help?
Thanks in advance!
Mike
Mike
sdszfsfsf
f
sf
sfs
af
af
f
f
fa
ff
af
f
Hello,
Using Powershell, I've constructed the following:
-join (($var1 +$var2+$var3|%{[char]$_})+$var4 | Get-Random)
I need some of the variables to disappear from time to time.
If I add
$var1 = $nulland try to loop it back to the -join statement, I get an error. Is there a way to have the variables disappear some other way?
Hi
I'm doing a build and capture in MDT I'd like to slip in a custom Windows 10 start menu for the Administrator account.
In order to do this i am trying to run the following powershell to delete a certain regkey that is preceded by a unique sid.
Remove-Item 'HKCU:\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount\*$start.tilegrid$windows.data.curatedtilecollection.tilecollection' -Force -Recurse Get-Process Explorer | Stop-Process
So my question is how do I automate the deletion of this regkey?Hello,
the below commands can be used to Disable the Open Another Mailbox from OWA
New-OwaMailboxPolicy -Name “DisableOpenAnotherMailbox”
Set-OwaMailboxPolicy “DisableOpenAnotherMailbox” –ExplicitLogonEnabled $false
But is there a command I can use to Disable the Open Another Mailbox from OWA only in case the users try to access a specific MB from OWA(that they might have delegation access on)
The Goal here is to make sue that no one can open specific mailbox from Owa except it's owner
Thanks
Hi,
I've the two department in my Org student and teachers and i want disable the Teachers ID to be searched by Student from address list, please help somebody to how to get this done in office365.
Thank you